/* Joy Land – Family Resort Design System */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&family=Outfit:wght@400;500;600;700&display=swap');

:root {
  --jl-forest: #2f5d50;
  --jl-forest-deep: #1e3d34;
  --jl-sage: #7a9e8e;
  --jl-mist: #e8f0ec;
  --jl-sand: #f3eee6;
  --jl-cream: #faf8f4;
  --jl-aqua: #4a8f9f;
  --jl-aqua-soft: #d7eef3;
  --jl-gold: #c4a35a;
  --jl-gold-soft: #e8d9b0;
  --jl-ink: #24312c;
  --jl-muted: #5f6f68;
  --jl-white: #ffffff;
  --jl-danger: #b44a3c;
  --jl-success: #2f7d5a;
  --jl-warning: #c4892a;
  --jl-radius: 18px;
  --jl-radius-sm: 12px;
  --jl-shadow: 0 18px 50px rgba(30, 61, 52, 0.12);
  --jl-shadow-soft: 0 8px 24px rgba(30, 61, 52, 0.08);
  --jl-font: 'Tajawal', 'Outfit', sans-serif;
  --jl-container: min(1120px, calc(100% - 2rem));
  --jl-header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--jl-font);
  color: var(--jl-ink);
  background:
    radial-gradient(1200px 500px at 100% -10%, rgba(74, 143, 159, 0.12), transparent 55%),
    radial-gradient(900px 420px at 0% 0%, rgba(47, 93, 80, 0.10), transparent 50%),
    linear-gradient(180deg, var(--jl-cream), var(--jl-sand) 40%, var(--jl-mist));
  line-height: 1.7;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.container { width: var(--jl-container); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(250, 248, 244, 0.88);
  border-bottom: 1px solid rgba(47, 93, 80, 0.08);
}
.header-inner {
  height: var(--jl-header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand {
  display: flex; align-items: center; gap: .75rem;
  font-weight: 800; font-size: 1.35rem; color: var(--jl-forest-deep);
  letter-spacing: -.02em;
}
.brand-logo {
  display: inline-flex; align-items: center; gap: .7rem;
}
.brand-logo__mark {
  width: 46px; height: 46px; object-fit: contain;
  border-radius: 50%;
  background: rgba(250, 248, 244, .92);
  box-shadow: 0 8px 22px rgba(30, 61, 52, .16);
  flex: 0 0 auto;
}
.brand-logo__text {
  display: flex; flex-direction: column; line-height: 1.15;
}
.brand-logo__ar {
  font-weight: 800; font-size: 1.2rem; color: inherit;
}
.brand-logo__en {
  display: block; margin-top: .15rem;
  font-size: .72rem; font-weight: 500; color: var(--jl-muted);
  letter-spacing: .04em;
}
.brand--footer .brand-logo__mark {
  background: rgba(255,255,255,.1);
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
}
.brand--footer .brand-logo__en { color: rgba(255,255,255,.72); }
.brand--admin .brand-logo__mark {
  width: 40px; height: 40px;
  background: rgba(255,255,255,.12);
  box-shadow: none;
}
.brand--admin .brand-logo__ar { font-size: 1.05rem; color: #fff; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px;
  background: linear-gradient(145deg, var(--jl-forest), var(--jl-aqua));
  display: grid; place-items: center; color: white; font-size: .85rem; font-weight: 800;
  box-shadow: 0 8px 20px rgba(47, 93, 80, .25);
}
.nav-desktop { display: none; gap: 1.25rem; align-items: center; }
.nav-desktop a { color: var(--jl-muted); font-weight: 500; transition: color .2s; }
.nav-desktop a:hover, .nav-desktop a.active { color: var(--jl-forest-deep); }
.header-actions { display: flex; align-items: center; gap: .6rem; }
.lang-switch select, .currency-switch select {
  border: 1px solid rgba(47,93,80,.15); background: white; border-radius: 999px;
  padding: .35rem .75rem; color: var(--jl-ink);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border: 0; border-radius: 999px; padding: .85rem 1.35rem; font-weight: 700;
  cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--jl-forest), #3a7463);
  color: white; box-shadow: 0 10px 24px rgba(47, 93, 80, .28);
}
.btn-secondary {
  background: white; color: var(--jl-forest-deep);
  border: 1px solid rgba(47,93,80,.15);
}
.btn-gold {
  background: linear-gradient(135deg, var(--jl-gold), #d4b56e);
  color: var(--jl-forest-deep);
}
.btn-ghost { background: transparent; color: var(--jl-forest); }
.btn-block { width: 100%; }
.btn-sm { padding: .55rem 1rem; font-size: .92rem; }

/* Hero */
.hero {
  position: relative; min-height: min(92vh, 820px);
  display: grid; align-items: end;
  color: white; overflow: hidden;
}
.hero-media {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(30,61,52,.15) 0%, rgba(30,61,52,.55) 55%, rgba(30,61,52,.88) 100%),
    url('/assets/images/hero.jpg') center/cover no-repeat,
    linear-gradient(135deg, #2f5d50, #4a8f9f);
  transform: scale(1.02);
  animation: heroZoom 18s ease-in-out infinite alternate;
}
@keyframes heroZoom { from { transform: scale(1); } to { transform: scale(1.06); } }
.hero-content {
  position: relative; z-index: 2; padding: 4.5rem 0 3rem;
  max-width: 720px;
  animation: fadeUp .8s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.hero-brand {
  font-size: clamp(2.6rem, 8vw, 4.4rem);
  font-weight: 800; line-height: 1.1; margin: 0 0 .75rem;
  text-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.hero-title {
  font-size: clamp(1.25rem, 3.4vw, 1.8rem);
  font-weight: 500; margin: 0 0 .75rem; color: rgba(255,255,255,.95);
}
.hero-lead {
  margin: 0 0 1.5rem; color: rgba(255,255,255,.86); font-size: 1.05rem; max-width: 36rem;
}

/* Booking bar */
.booking-bar {
  position: relative; z-index: 3; margin-top: -2.5rem; margin-bottom: 2rem;
}
.booking-panel {
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(47,93,80,.08);
  border-radius: calc(var(--jl-radius) + 6px);
  box-shadow: var(--jl-shadow);
  padding: 1.25rem;
}
.booking-grid {
  display: grid; gap: .85rem;
  grid-template-columns: 1fr;
}
.field label {
  display: block; font-size: .88rem; color: var(--jl-muted); margin-bottom: .3rem; font-weight: 500;
}
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid rgba(47,93,80,.14); border-radius: var(--jl-radius-sm);
  padding: .8rem .95rem; background: var(--jl-cream); color: var(--jl-ink);
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--jl-sage);
  box-shadow: 0 0 0 4px rgba(122, 158, 142, .18);
}

/* Sections */
.section { padding: 4rem 0; }
.section-head { margin-bottom: 2rem; max-width: 40rem; }
.section-kicker {
  color: var(--jl-aqua); font-weight: 700; font-size: .92rem; margin-bottom: .4rem;
}
.section-title {
  margin: 0 0 .6rem; font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--jl-forest-deep); line-height: 1.25;
}
.section-desc { margin: 0; color: var(--jl-muted); }

.grid-2 { display: grid; gap: 1.25rem; }
.grid-3 { display: grid; gap: 1.25rem; }
.grid-4 { display: grid; gap: 1rem; }

/* Cabin cards - interaction containers */
.cabin-card {
  background: white; border-radius: var(--jl-radius); overflow: hidden;
  box-shadow: var(--jl-shadow-soft); border: 1px solid rgba(47,93,80,.06);
  display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s;
}
.cabin-card:hover { transform: translateY(-4px); box-shadow: var(--jl-shadow); }
.cabin-card-media {
  aspect-ratio: 16/11; background: linear-gradient(135deg, var(--jl-sage), var(--jl-aqua));
  position: relative; overflow: hidden;
}
.cabin-card-media img { width: 100%; height: 100%; object-fit: cover; }
.cabin-badge {
  position: absolute; top: .85rem; inset-inline-start: .85rem;
  background: rgba(250,248,244,.92); color: var(--jl-forest-deep);
  padding: .3rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 700;
}
.cabin-card-body { padding: 1.2rem 1.25rem 1.35rem; display: flex; flex-direction: column; gap: .65rem; flex: 1; }
.cabin-card h3 { margin: 0; font-size: 1.25rem; color: var(--jl-forest-deep); }
.meta-row { display: flex; flex-wrap: wrap; gap: .5rem .85rem; color: var(--jl-muted); font-size: .92rem; }
.price-row { display: flex; align-items: baseline; gap: .5rem; margin-top: auto; }
.price { font-size: 1.35rem; font-weight: 800; color: var(--jl-forest); }
.price-old { text-decoration: line-through; color: #9aa7a1; font-size: .95rem; }
.price-note { color: var(--jl-muted); font-size: .85rem; }
.card-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; }

/* Facility tiles */
.facility-tile {
  padding: 1.25rem; border-radius: var(--jl-radius);
  background: linear-gradient(180deg, white, rgba(232,240,236,.65));
  border: 1px solid rgba(47,93,80,.07);
  transition: transform .2s;
}
.facility-tile:hover { transform: translateY(-3px); }
.facility-icon {
  width: 48px; height: 48px; border-radius: 14px; margin-bottom: .8rem;
  display: grid; place-items: center;
  background: var(--jl-aqua-soft); color: var(--jl-aqua); font-size: 1.3rem;
}
.facility-tile h3 { margin: 0 0 .35rem; font-size: 1.05rem; color: var(--jl-forest-deep); }
.facility-tile p { margin: 0; color: var(--jl-muted); font-size: .92rem; }

/* Privacy band */
.privacy-band {
  background:
    linear-gradient(120deg, rgba(47,93,80,.92), rgba(74,143,159,.88)),
    url('/assets/images/pool.jpg') center/cover;
  color: white; border-radius: calc(var(--jl-radius) + 8px);
  padding: 2.5rem 1.5rem; overflow: hidden;
}
.privacy-band h2 { margin: 0 0 .6rem; font-size: clamp(1.5rem, 3vw, 2rem); }
.privacy-band p { margin: 0; max-width: 36rem; color: rgba(255,255,255,.9); }

/* Gallery */
.gallery-grid {
  display: grid; gap: .75rem;
  grid-template-columns: repeat(2, 1fr);
}
.gallery-item {
  aspect-ratio: 1; border-radius: var(--jl-radius-sm); overflow: hidden;
  background: var(--jl-sage); cursor: pointer;
}
.gallery-item:nth-child(1) { grid-column: span 2; aspect-ratio: 16/9; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery-item:hover img { transform: scale(1.04); }

/* Reviews */
.review-card {
  background: white; border-radius: var(--jl-radius); padding: 1.35rem;
  border: 1px solid rgba(47,93,80,.07); box-shadow: var(--jl-shadow-soft);
}
.stars { color: var(--jl-gold); letter-spacing: .08em; margin-bottom: .5rem; }
.review-card p { margin: 0 0 .8rem; color: var(--jl-muted); }
.review-author { font-weight: 700; color: var(--jl-forest-deep); }

/* Map / contact */
.map-frame {
  border: 0; width: 100%; min-height: 320px; border-radius: var(--jl-radius);
  background: var(--jl-mist);
}

/* Footer */
.site-footer {
  margin-top: 3rem; background: var(--jl-forest-deep); color: rgba(255,255,255,.85);
  padding: 3rem 0 1.5rem;
}
.footer-grid { display: grid; gap: 1.5rem; }
.site-footer h4 { color: white; margin: 0 0 .8rem; }
.site-footer a { color: rgba(255,255,255,.78); }
.site-footer a:hover { color: var(--jl-gold-soft); }
.footer-bottom {
  margin-top: 2rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between;
  font-size: .9rem; color: rgba(255,255,255,.65);
}
.demo-banner {
  background: #fff4d6; color: #6a4f12; text-align: center; padding: .55rem 1rem;
  font-size: .9rem; border-bottom: 1px solid #ecd89a;
}

/* Floating actions */
.float-actions {
  position: fixed; inset-inline-end: 1rem; bottom: 1rem; z-index: 90;
  display: flex; flex-direction: column; gap: .65rem;
}
.float-btn {
  width: 54px; height: 54px; border-radius: 50%; border: 0; display: grid; place-items: center;
  box-shadow: var(--jl-shadow); cursor: pointer; color: white; font-weight: 700;
}
.float-whatsapp { background: #25D366; }
.float-book { background: var(--jl-forest); width: auto; border-radius: 999px; padding: 0 1.1rem; height: 48px; }
.mobile-book-bar {
  display: none; position: fixed; inset-inline: 0; bottom: 0; z-index: 95;
  background: rgba(250,248,244,.96); backdrop-filter: blur(12px);
  border-top: 1px solid rgba(47,93,80,.1); padding: .75rem 1rem;
}

/* Page chrome */
.page-hero {
  padding: 2.5rem 0 1.5rem;
  background: linear-gradient(180deg, rgba(47,93,80,.08), transparent);
}
.page-hero h1 { margin: 0 0 .4rem; color: var(--jl-forest-deep); font-size: clamp(1.8rem, 4vw, 2.6rem); }
.breadcrumb { color: var(--jl-muted); font-size: .92rem; margin-bottom: .5rem; }
.panel {
  background: white; border-radius: var(--jl-radius); padding: 1.25rem;
  border: 1px solid rgba(47,93,80,.07); box-shadow: var(--jl-shadow-soft);
}
.filters { display: grid; gap: .75rem; margin-bottom: 1.25rem; }
.status-pill {
  display: inline-flex; align-items: center; padding: .25rem .65rem; border-radius: 999px;
  font-size: .8rem; font-weight: 700;
}
.alert {
  padding: .9rem 1rem; border-radius: var(--jl-radius-sm); margin-bottom: 1rem;
}
.alert-success { background: #e8f6ef; color: var(--jl-success); }
.alert-error { background: #fdecea; color: var(--jl-danger); }
.alert-info { background: var(--jl-aqua-soft); color: var(--jl-forest-deep); }

/* Booking wizard */
.wizard-steps {
  display: flex; gap: .5rem; overflow-x: auto; margin-bottom: 1.25rem; padding-bottom: .25rem;
}
.wizard-step {
  white-space: nowrap; padding: .45rem .85rem; border-radius: 999px;
  background: white; color: var(--jl-muted); font-size: .88rem; border: 1px solid rgba(47,93,80,.1);
}
.wizard-step.active { background: var(--jl-forest); color: white; border-color: var(--jl-forest); }
.wizard-step.done { background: var(--jl-mist); color: var(--jl-forest); }
.price-summary dt { color: var(--jl-muted); }
.price-summary dd { margin: 0; font-weight: 700; }
.price-summary .row { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .45rem; }
.price-summary .total { border-top: 1px solid rgba(47,93,80,.1); padding-top: .7rem; margin-top: .5rem; font-size: 1.15rem; }

/* Admin */
.admin-body { background: #f4f7f5; }
.admin-shell { display: grid; min-height: 100vh; grid-template-columns: 1fr; }
.admin-sidebar {
  background: var(--jl-forest-deep); color: rgba(255,255,255,.86); padding: 1.25rem 1rem;
}
.admin-sidebar a {
  display: block; padding: .65rem .85rem; border-radius: 10px; margin-bottom: .2rem;
  color: rgba(255,255,255,.78);
}
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,.1); color: white; }
.admin-main { padding: 1.25rem; }
.stat-grid { display: grid; gap: .85rem; grid-template-columns: repeat(2, 1fr); }
.stat-card {
  background: white; border-radius: var(--jl-radius-sm); padding: 1rem;
  border: 1px solid rgba(47,93,80,.08);
}
.stat-card .label { color: var(--jl-muted); font-size: .85rem; }
.stat-card .value { font-size: 1.5rem; font-weight: 800; color: var(--jl-forest-deep); }
.table-wrap { overflow-x: auto; background: white; border-radius: var(--jl-radius); border: 1px solid rgba(47,93,80,.08); }
table.data { width: 100%; border-collapse: collapse; min-width: 720px; }
table.data th, table.data td { padding: .85rem 1rem; text-align: start; border-bottom: 1px solid rgba(47,93,80,.08); }
table.data th { background: var(--jl-mist); color: var(--jl-forest-deep); font-weight: 700; }

/* Calendar */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-cell {
  min-height: 42px; border-radius: 8px; background: white; border: 1px solid rgba(47,93,80,.08);
  font-size: .8rem; padding: .35rem; text-align: center;
}
.cal-cell.available { background: #e8f6ef; }
.cal-cell.booked { background: #fdecea; }
.cal-cell.blocked { background: #eee; color: #888; }
.cal-cell.maintenance { background: #fff4d6; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(20,30,26,.92); z-index: 200;
  display: none; align-items: center; justify-content: center; padding: 1rem;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: min(1100px, 100%); max-height: 90vh; border-radius: 12px; }

/* Mobile nav */
.nav-toggle {
  display: inline-flex; width: 42px; height: 42px; border-radius: 12px; border: 1px solid rgba(47,93,80,.15);
  background: white; align-items: center; justify-content: center; cursor: pointer;
}
.mobile-nav {
  display: none; position: absolute; inset-inline: 0; top: var(--jl-header-h);
  background: rgba(250,248,244,.98); border-bottom: 1px solid rgba(47,93,80,.08);
  padding: 1rem; flex-direction: column; gap: .75rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: .55rem 0; color: var(--jl-forest-deep); font-weight: 600; }

@media (min-width: 720px) {
  .booking-grid { grid-template-columns: repeat(3, 1fr) auto; align-items: end; }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .filters { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
  .gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; min-height: 100%; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 980px) {
  .nav-desktop { display: flex; }
  .nav-toggle { display: none; }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .admin-shell { grid-template-columns: 260px 1fr; }
  .booking-grid { grid-template-columns: repeat(6, 1fr) auto; }
  .detail-layout { display: grid; grid-template-columns: 1.4fr .8fr; gap: 1.5rem; align-items: start; }
}

@media (max-width: 719px) {
  .mobile-book-bar { display: flex; gap: .75rem; align-items: center; }
  .float-book { display: none; }
  body { padding-bottom: 72px; }
  .hero-content { padding-bottom: 4rem; }
}
