:root {
  --black: #060606;
  --panel: #101010;
  --panel2: #161513;
  --gold: #d4af37;
  --gold-2: #f2d77e;
  --gold-dim: rgba(212, 175, 55, .35);
  --text: #f4efe3;
  --muted: #a89f8c;
  --danger: #e06c6c;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--black);
  color: var(--text);
  font-family: 'Cairo', system-ui, sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: 'El Messiri', 'Cairo', serif; font-weight: 600; }
a { color: var(--gold); text-decoration: none; }
img, video { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea {
  font-family: inherit;
  background: var(--panel2);
  border: 1px solid #2c2921;
  color: var(--text);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 1rem;
  width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold-dim); }
input[type="date"] { color-scheme: dark; }
::placeholder { color: #6f6858; }

.gold-grad {
  background: linear-gradient(135deg, #b8912c 0%, #f2d77e 45%, #d4af37 60%, #9a7b24 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 13px 30px; font-size: 1.05rem; font-weight: 700;
  border: 1px solid var(--gold); transition: .25s;
}
.btn-gold { background: linear-gradient(135deg, #c39a2e, #e9cd72); color: #171205; border: none; }
.btn-gold:hover { filter: brightness(1.1); transform: translateY(-2px); }
.btn-line { background: transparent; color: var(--gold); }
.btn-line:hover { background: rgba(212,175,55,.12); }

/* ===== Header ===== */
header {
  position: fixed; inset-inline: 0; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 22px; transition: background .3s, box-shadow .3s;
}
header.scrolled { background: rgba(6,6,6,.92); box-shadow: 0 1px 0 rgba(212,175,55,.25); backdrop-filter: blur(8px); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 42px; width: 42px; object-fit: cover; border-radius: 50%; border: 1px solid var(--gold-dim); }
.brand .n { font-family: 'El Messiri', serif; font-size: 1.25rem; color: var(--gold); }
nav.main-nav { display: flex; gap: 22px; }
nav.main-nav a { color: var(--text); font-size: .98rem; opacity: .85; }
nav.main-nav a:hover { color: var(--gold); opacity: 1; }
@media (max-width: 640px) { nav.main-nav { display: none; } }

/* ===== Hero ===== */
.hero {
  min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 90px 20px 40px; position: relative;
  background:
    radial-gradient(ellipse 60% 45% at 50% 30%, rgba(212,175,55,.10), transparent 70%),
    radial-gradient(ellipse 40% 30% at 80% 80%, rgba(212,175,55,.05), transparent 70%),
    var(--black);
}
.hero img.logo { width: min(320px, 64vw); border-radius: 18px; box-shadow: 0 0 80px rgba(212,175,55,.22); }
.hero h1 { font-size: clamp(2rem, 6vw, 3.4rem); margin-top: 26px; }
.hero .latin { font-family: 'Playfair Display', serif; letter-spacing: .5em; color: var(--muted); font-size: clamp(.8rem, 2.4vw, 1.05rem); margin-top: 6px; text-transform: uppercase; }
.hero .tag { color: var(--muted); font-size: clamp(1rem, 2.8vw, 1.25rem); margin-top: 14px; }
.hero .cta { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; justify-content: center; }
.hero .scroll-hint { position: absolute; bottom: 22px; color: var(--gold-dim); font-size: 1.6rem; animation: bob 2s infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* ===== Sections ===== */
section { padding: 72px 20px; max-width: 1180px; margin: 0 auto; }
.sec-title { text-align: center; margin-bottom: 14px; font-size: clamp(1.6rem, 4.5vw, 2.4rem); }
.sec-sub { text-align: center; color: var(--muted); margin-bottom: 40px; }
.divider { width: 90px; height: 2px; margin: 14px auto 0; background: linear-gradient(90deg, transparent, var(--gold), transparent); border: none; }

/* ===== Gallery ===== */
.filters { display: flex; gap: 10px; justify-content: center; margin-bottom: 30px; flex-wrap: wrap; }
.chip {
  border: 1px solid #332f24; background: var(--panel); color: var(--muted);
  border-radius: 999px; padding: 8px 22px; font-size: .95rem; transition: .2s;
}
.chip.active { background: linear-gradient(135deg, #c39a2e, #e9cd72); color: #171205; border-color: transparent; font-weight: 700; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; grid-auto-rows: 170px; grid-auto-flow: dense; }
@media (min-width: 700px) { .gallery { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); grid-auto-rows: 240px; } }
.g-item { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid #221f18; cursor: pointer; background: var(--panel); }
.g-item:nth-child(6n+1) { grid-row: span 2; }
.g-item:nth-child(8n+4) { grid-column: span 2; }
.g-item img, .g-item video { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.g-item:hover img, .g-item:hover video { transform: scale(1.06); }
.g-item .v-badge {
  position: absolute; bottom: 10px; inset-inline-start: 10px; z-index: 2;
  background: rgba(0,0,0,.65); border: 1px solid var(--gold-dim); color: var(--gold);
  border-radius: 999px; padding: 4px 12px; font-size: .8rem; display: flex; gap: 6px; align-items: center;
}
.g-empty { text-align: center; color: var(--muted); padding: 50px 0; grid-column: 1/-1; }

/* ===== Lightbox ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.94);
  display: none; align-items: center; justify-content: center; flex-direction: column; padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox img, .lightbox video { max-width: min(1100px, 94vw); max-height: 80vh; border-radius: 12px; box-shadow: 0 0 60px rgba(212,175,55,.15); }
.lb-title { color: var(--muted); margin-top: 14px; }
.lb-btn {
  position: absolute; background: rgba(20,20,20,.8); color: var(--gold); border: 1px solid var(--gold-dim);
  width: 46px; height: 46px; border-radius: 50%; font-size: 1.3rem; display: flex; align-items: center; justify-content: center;
}
.lb-close { top: 18px; inset-inline-end: 18px; }
.lb-prev { inset-inline-start: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { inset-inline-end: 14px; top: 50%; transform: translateY(-50%); }

/* ===== About ===== */
.about-card {
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid #26231b; border-radius: 18px; padding: clamp(24px, 5vw, 48px);
  text-align: center; font-size: 1.1rem;
}
.about-card .addr { margin-top: 18px; color: var(--gold); }

/* ===== Booking ===== */
.book-wrap { max-width: 640px; margin: 0 auto; }
.book-form { display: grid; gap: 14px; background: var(--panel2); border: 1px solid #26231b; border-radius: 18px; padding: clamp(20px, 4vw, 36px); }
.book-form label { font-size: .92rem; color: var(--muted); margin-bottom: -8px; }
.form-msg { text-align: center; padding: 12px; border-radius: 10px; display: none; }
.form-msg.ok { display: block; background: rgba(80,160,90,.12); color: #9ed69e; border: 1px solid rgba(80,160,90,.35); }
.form-msg.err { display: block; background: rgba(224,108,108,.1); color: var(--danger); border: 1px solid rgba(224,108,108,.35); }

/* ===== Contact ===== */
.contact-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); max-width: 760px; margin: 0 auto; }
.contact-card {
  display: flex; align-items: center; gap: 14px; padding: 20px;
  background: var(--panel2); border: 1px solid #26231b; border-radius: 16px; transition: .2s;
}
.contact-card:hover { border-color: var(--gold-dim); transform: translateY(-3px); }
.contact-card .ic { font-size: 1.7rem; }
.contact-card .t { color: var(--muted); font-size: .85rem; }
.contact-card .v { color: var(--text); font-weight: 700; direction: ltr; text-align: end; }

footer { text-align: center; padding: 34px 20px; color: #5d5747; border-top: 1px solid #1c1a14; font-size: .9rem; }
footer a.admin-link { color: #454032; font-size: .8rem; }

.wa-float {
  position: fixed; bottom: 20px; inset-inline-start: 20px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%; background: #22c15e;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 22px rgba(34,193,94,.45);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* ===== Admin ===== */
.admin-shell { max-width: 1080px; margin: 0 auto; padding: 90px 18px 60px; }
.login-card { max-width: 380px; margin: 12vh auto 0; background: var(--panel2); border: 1px solid #26231b; border-radius: 18px; padding: 34px 28px; text-align: center; }
.login-card img { width: 110px; border-radius: 12px; margin-bottom: 16px; }
.login-card h2 { margin-bottom: 18px; }
.login-card form { display: grid; gap: 12px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.tab { border: 1px solid #332f24; background: var(--panel); color: var(--muted); border-radius: 10px; padding: 9px 18px; font-size: .95rem; }
.tab.active { background: linear-gradient(135deg, #c39a2e, #e9cd72); color: #171205; border-color: transparent; font-weight: 700; }
.pane { display: none; }
.pane.active { display: block; }
.card { background: var(--panel2); border: 1px solid #26231b; border-radius: 16px; padding: 22px; }
.drop {
  border: 2px dashed #3a3527; border-radius: 16px; padding: 46px 20px; text-align: center; color: var(--muted);
  transition: .2s; cursor: pointer;
}
.drop.over { border-color: var(--gold); background: rgba(212,175,55,.06); color: var(--gold); }
.up-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; background: var(--panel); border: 1px solid #26231b; border-radius: 10px; padding: 10px 14px; }
.up-row .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.up-row .bar { flex: 2; height: 8px; background: #26231b; border-radius: 99px; overflow: hidden; }
.up-row .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #c39a2e, #e9cd72); }
.up-row .st { font-size: .85rem; min-width: 74px; text-align: center; }
.up-row .st.err { color: var(--danger); }
.up-row .st.ok { color: #9ed69e; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.m-item { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid #26231b; aspect-ratio: 1; background: var(--panel); }
.m-item img, .m-item video { width: 100%; height: 100%; object-fit: cover; }
.m-item .del {
  position: absolute; top: 8px; inset-inline-end: 8px; background: rgba(0,0,0,.7); color: var(--danger);
  border: 1px solid rgba(224,108,108,.4); border-radius: 8px; padding: 4px 10px; font-size: .8rem;
}
.m-item .kind { position: absolute; bottom: 8px; inset-inline-start: 8px; background: rgba(0,0,0,.65); color: var(--gold); border-radius: 6px; padding: 2px 8px; font-size: .72rem; }
.inq { display: grid; gap: 4px; background: var(--panel); border: 1px solid #26231b; border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.inq .top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.inq .nm { font-weight: 700; color: var(--gold-2); }
.inq .meta { color: var(--muted); font-size: .88rem; }
.inq .actions { display: flex; gap: 8px; }
.inq .actions a, .inq .actions button { font-size: .8rem; border-radius: 8px; padding: 4px 12px; border: 1px solid #3a3527; background: transparent; color: var(--muted); }
.inq .actions a:hover { color: var(--gold); border-color: var(--gold-dim); }
.inq .actions button:hover { color: var(--danger); border-color: rgba(224,108,108,.4); }
.settings-form { display: grid; gap: 14px; max-width: 560px; }
.settings-form .row { display: grid; gap: 6px; }
.settings-form label { color: var(--muted); font-size: .9rem; }
.admin-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; flex-wrap: wrap; gap: 10px; }
.admin-top h1 { font-size: 1.5rem; }
.logout { background: transparent; border: 1px solid #3a3527; color: var(--muted); border-radius: 10px; padding: 8px 16px; font-size: .9rem; }
.logout:hover { color: var(--danger); border-color: rgba(224,108,108,.4); }
.toast {
  position: fixed; bottom: 24px; inset-inline: 0; margin: 0 auto; width: fit-content; max-width: 90vw;
  background: #1d1a12; border: 1px solid var(--gold-dim); color: var(--gold-2);
  padding: 12px 26px; border-radius: 999px; z-index: 200; display: none; text-align: center;
}
.toast.show { display: block; }
