/* ================================
   JNS Retreats – Revamped Styles
   Light theme • Centered • Compact gaps
   ================================ */

/* ---------- Theme & Spacing Tokens ---------- */
:root{
  /* Colors */
  --bg: #f7f9fc;           /* page background */
  --surface: #ffffff;      /* cards/surfaces */
  --text: #19223a;         /* main text */
  --muted:#5b6b88;         /* secondary text */
  --accent: #0ea5e9;       /* sky */
  --accent-2:#f59e0b;      /* amber */
  --border: rgba(25,34,58,.12);
  --shadow: 0 10px 24px rgba(22, 28, 45, .10);

  /* Shape */
  --radius-lg: 22px;
  --radius-md: 18px;

  /* Layout */
  --container-max: 1280px;

  /* Vertical rhythm (compact = ~1 paragraph) */
  --space-1: 8px;
  --space-2: 12px;    /* primary gap */
  --space-3: 16px;
  --space-4: 20px;
  --section-gap: 16px; /* spacing between major blocks */
}

/* ---------- Base Reset ---------- */
*{ box-sizing: border-box }
html, body{ margin:0; padding:0 }
img{ max-width:100%; display:block; border-radius: var(--radius-md); }
a{ color:inherit; text-decoration:none }

/* ---------- Body & Containers ---------- */
body{
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
  background:
    radial-gradient(1200px 800px at 70% -10%, #eef4ff 0%, var(--bg) 60%, #edf2f8 100%);
  color: var(--text);
  line-height: 1.6;

  /* Center page content on desktop by default */
  display:flex; flex-direction:column; align-items:center; text-align:center;
  min-height:100vh;
}

.container{
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding: 18px 24px;                 /* slightly tighter */
}

/* ---------- Navigation ---------- */
.nav{
  position: sticky; top:0; z-index: 40;
  backdrop-filter: saturate(150%) blur(10px);
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.8));
  border-bottom: 1px solid var(--border);
}
.nav-inner{
  display:flex; align-items:center; justify-content:center; gap: var(--space-2);
  padding: 12px 24px; flex-wrap: wrap;
}
.brand{ font-weight:800; letter-spacing:.3px; display:flex; align-items:center; gap:10px; justify-content:center }
.badge{
  font-size:.75rem; padding:3px 8px;
  background: rgba(14,165,233,.10);
  border:1px solid rgba(14,165,233,.35);
  border-radius:999px; color: var(--accent);
}
.nav-actions{ display:flex; gap: var(--space-2); flex-wrap: wrap; justify-content:center }

/* ---------- Buttons ---------- */
.btn, button{
  cursor:pointer;
  padding:12px 16px;
  border-radius:16px;
  border:1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.84));
  color:var(--text);
  transition: transform .18s ease, box-shadow .18s ease;
  box-shadow: var(--shadow);
}
.btn:hover{ transform: translateY(-1px); box-shadow: 0 14px 28px rgba(22,28,45,.12) }
.btn.primary{
  background: linear-gradient(180deg, rgba(14,165,233,.20), rgba(14,165,233,.10));
  border-color: rgba(14,165,233,.45);
  color:#08313f;
}
.btn.sun{
  background: linear-gradient(180deg, rgba(245,158,11,.22), rgba(245,158,11,.12));
  border-color: rgba(245,158,11,.45);
  color:#3a2402;
}

/* ---------- Hero ---------- */
.hero{
  position:relative; overflow:hidden;
  border-radius: var(--radius-lg);
  margin: 12px auto var(--section-gap);
  background:
    radial-gradient(1200px 700px at 10% -30%, rgba(14,165,233,.12), transparent 60%),
    radial-gradient(1000px 600px at 100% 20%, rgba(245,158,11,.10), transparent 60%),
    linear-gradient(140deg, #f4f7fb 0%, #eef3f8 100%);
  box-shadow: var(--shadow);
  min-height: clamp(360px, 55vh, 560px);   /* compact hero */
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image, none);
  background-size: cover;
  background-position: center;
  filter: saturate(110%) contrast(104%) brightness(102%);
  opacity: 0.65; /* changed to 65% opacity */
  transform: scale(1.02);
}
.hero-inner{
  position:relative; z-index:1;
  padding: clamp(32px, 6vw, 56px);
  display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center;
}
.hero-inner [style*="display:flex"]{ justify-content:center } /* center CTA row */

/* ---------- Typography ---------- */
.kicker{ color:var(--muted); font-weight:600; letter-spacing:.18em; text-transform:uppercase }
.h1{ font-size: clamp(32px, 5vw, 52px); line-height:1.12; margin: 10px 0 8px; font-weight:900 }
.h2{ font-size: clamp(24px, 3.4vw, 36px); line-height:1.15; font-weight:800; margin:0 }
.sub{
  font-size: clamp(16px, 2vw, 19px);
  color:#334155;
  max-width: 860px;
  margin-inline:auto;
}

/* ---------- Sections (compact) ---------- */
.section{
  margin: var(--section-gap) 24px;
  padding-block: 12px;                 /* compact */
}

/* ---------- Tiles (two big links on home) ---------- */
.tiles{
  display:grid; grid-template-columns: repeat(2, 1fr);
  gap: 12px;                            /* compact */
  margin: var(--section-gap) auto;
  justify-items: center;
}
.tile{
  position:relative; isolation:isolate; overflow:hidden;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.92));
  border:1px solid var(--border);
  display:grid; grid-template-rows: 1fr auto;
  box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease;
}
.tile:hover{ transform: translateY(-3px); border-color: rgba(14,165,233,.35) }
.tile::before{
  content:""; position:absolute; inset:0;
  background-image: var(--img); background-size:cover; background-position:center;
  opacity:.28; filter: saturate(108%) contrast(104%) brightness(102%); transform: scale(1.03);
}
.tile::after{ content:""; position:absolute; inset:0; background: linear-gradient(180deg, transparent 52%, rgba(255,255,255,.92) 100%) }
.tile-content{ position:relative; z-index:1; padding: 18px; text-align:left; color:var(--text) }
.tile-footer{ position:relative; z-index:1; display:flex; justify-content:center; align-items:center; gap: 10px; padding: 14px 18px }

/* ---------- Cards (lists/notes/forms) ---------- */
.cards{
  display:grid; grid-template-columns: repeat(2, 1fr);
  gap: 12px;                             /* compact between cards */
  justify-items:center; align-items:start;
}
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.92));
  border:1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  max-width: 980px;
  margin-inline:auto;
  padding: 16px;                          /* compact inside card */

  /* Internal, consistent rhythm: ≈1 paragraph gap */
  display:flex; flex-direction:column; gap: var(--space-2);
}
.card > *{ margin:0 }                     /* gaps control spacing */
.hr{
  height:1px;
  background: linear-gradient(90deg, transparent, rgba(25,34,58,.16), transparent);
  margin: 10px 0;                         /* slightly under 1em */
}

/* Lists remain readable (left aligned), but centered as a block */
.list{ text-align:left; display:inline-block; margin-inline:auto; padding-left:18px; color:#334155 }
.list li{ margin:4px 0 }

/* ---------- Gallery ---------- */
.gallery{
  display:grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px;                              /* compact */
  justify-items:center; align-items:center;
}
.gallery img{
  width:100%; height:auto;
  aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius-md);
}

/* ---------- Footer ---------- */
.footer{
  border-top:1px solid var(--border);
  color:#4b5a79;
  padding: 16px;                          /* compact */
  margin-top: var(--section-gap);
  background: transparent;
}

/* ---------- Forms ---------- */
.form{ display:grid; gap: 10px; max-width: 860px; margin-inline:auto }
.form-row{ display:grid; grid-template-columns: repeat(3, 1fr); gap:10px; align-items:end }
.input, select, input[type="date"], input[type="number"], textarea{
  width:100%; padding:12px; border-radius:12px; border:1px solid var(--border);
  background: rgba(255,255,255,.85); color: var(--text); outline:none;
}
label.small{ font-size:.85rem; color: var(--muted) }
textarea{ min-height: 90px; resize: vertical }
.small{ font-size:.9rem; color: var(--muted) }
.notice{
  background: rgba(245,158,11,.10);
  border:1px solid rgba(245,158,11,.35);
  color:#8a4b00; padding:12px 14px; border-radius:14px
}

/* ---------- Lightbox ---------- */
.lightbox-backdrop{ position:fixed; inset:0; display:none; place-items:center; background:rgba(0,0,0,.85); z-index:60 }
.lightbox-backdrop.active{ display:grid }
.lightbox-img{ max-width:92vw; max-height:86vh; border-radius:16px }

/* ---------- Responsive ---------- */
@media (max-width: 1024px){
  .tiles{ grid-template-columns: 1fr }
  .cards{ grid-template-columns: 1fr }
  .hero{ margin: 10px auto var(--section-gap) }
}
@media (max-width: 720px){
  .nav-inner{ flex-direction:column; gap:8px; padding:10px 12px }
  .brand, .nav-actions{ width:100%; justify-content:center }
  .nav-actions{ flex-wrap:wrap; gap: 10px }
  .nav-actions .btn, .btn{ width:100%; max-width:420px }

  .tile-content{ padding:16px }
  .tile-footer{ padding:12px 16px }
  .h1{ font-size: clamp(28px, 7vw, 44px) }
  .h2{ font-size: clamp(22px, 5.2vw, 34px) }
  .sub{ font-size: 16px }
  .gallery{ grid-template-columns: repeat(2, 1fr) }
}

/* Contact row + icons */
.contact-actions{
  display:flex; justify-content:center; flex-wrap:wrap; gap:12px;
  margin-top: 8px; margin-bottom: 6px;
}
.contact-actions .btn{
  display:inline-flex; align-items:center; gap:8px; padding-inline:14px;
}
.icon{ width:18px; height:18px; display:inline-block; }
.icon path, .icon circle{ vector-effect: non-scaling-stroke; 

}

/* WhatsApp accent button */
.btn.whatsapp{
  background: linear-gradient(180deg, rgba(37,211,102,.95), rgba(18,140,126,.92));
  border-color: rgba(18,140,126,.85);
  color: #ffffff;               /* white text/icons for contrast */
}
.btn.whatsapp:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(18,140,126,.28);
}
.btn.whatsapp:focus-visible{
  outline: 2px solid #25D366;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(37,211,102,.25);
}

/* Email accent button (blue) */
.btn.email{
  background: linear-gradient(180deg, rgba(14,165,233,.95), rgba(3,105,161,.92));
  border-color: rgba(3,105,161,.85);
  color:#ffffff; /* white text/icons */
}
.btn.email:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(3,105,161,.28);
}
.btn.email:focus-visible{
  outline: 2px solid #0EA5E9;  /* sky-500 */
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(14,165,233,.25);
}

/* Call accent button (teal) */
.btn.call{
  background: linear-gradient(180deg, rgba(20,184,166,.95), rgba(15,118,110,.92));
  border-color: rgba(15,118,110,.85);
  color:#ffffff; /* white text/icons */
}
.btn.call:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15,118,110,.28);
}
.btn.call:focus-visible{
  outline: 2px solid #14B8A6;  /* teal-500 */
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(20,184,166,.25);
}

/* Pill-shaped contact buttons (desktop) */
.contact-actions .btn{
  border-radius: 999px;         /* pill */
  padding-inline: 16px;
}

/* Icon-only pills on mobile */
@media (max-width: 720px){
  .contact-actions{
    gap: 10px;
  }
  .contact-actions .btn{
    width: 52px;                /* big tap target */
    height: 52px;
    padding: 0;                 /* icon centered */
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .contact-actions .btn span{   /* hide text, keep aria-label on link */
    display: none;
  }
  .contact-actions .icon{
    width: 22px;
    height: 22px;
  }
}

/* Fix: center tile content on home (badge + heading + copy) */
.tiles .tile .tile-content{
  text-align: center !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;  /* vertical center within the content row */
  gap: 6px;
}

/* Stack helper for left column in form */
.form .stack { display: grid; gap: 10px; }

/* Centered contact actions + icon sizing */
.contact-actions{
  display:flex; justify-content:center; flex-wrap:wrap; gap:12px;
  margin: 6px 0 10px;
}
.contact-actions .btn{
  display:inline-flex; align-items:center; gap:8px; padding-inline:14px;
}
.icon{ width:18px; height:18px; display:inline-block; }
.icon path, .icon circle{ vector-effect: non-scaling-stroke; 

}


/* ---------- Hero Typography Overrides (Darker Palette) ---------- */
.hero .kicker{
  display:inline-block;
  font-size: clamp(24px, 6.5vw, 80px);
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;

  /* Gradient text */
  background: linear-gradient(135deg, #ff8a00 0%, #e52e71 50%, #7b61ff 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;

  /* Optional glow for readability */
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.hero .h1 {
  color: #0f172a;               /* slate-900 */
  text-shadow: 0 1px 2px rgba(255,255,255,0.15);
}

.hero .sub {
  color: #0f172a;               /* slate-800 */
  text-shadow: 0 1px 2px rgba(255,255,255,0.12);
}

.hero strong {
  color: #08061d;               /* emphasis matches kicker */
}

/* Lighten the hero image so dark text stays readable */
.hero::before{
  filter: saturate(104%) contrast(96%) brightness(108%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 50% at 50% 20%, rgba(255,255,255,0.08), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.22));
  pointer-events: none;
}

/* ---------- Tile Typography ---------- */
.tiles .tile .pill { color: #0e7490; }
.tiles .tile .h2 { text-shadow: 0 1px 2px rgba(255,255,255,0.18); color:#0f172a; }
.tiles .tile .small { color: #374151; }

/* ---------- Hero Button Overrides (Darker Variants) ---------- */
.hero .btn.primary {
  background: linear-gradient(180deg, rgba(14,116,144,.92), rgba(8,47,73,.88));
  border-color: rgba(14,116,144,.75);
  color: #f8fafc; /* light slate text */
}
.hero .btn.primary:hover {
  background: linear-gradient(180deg, rgba(21,94,117,.95), rgba(8,47,73,.92));
}

.hero .btn.sun {
  background: linear-gradient(180deg, rgba(67,56,202,.90), rgba(49,46,129,.88)); /* deep indigo */
  border-color: rgba(49,46,129,.75);
  color: #f8fafc;
}
.hero .btn.sun:hover {
  background: linear-gradient(180deg, rgba(55,48,163,.95), rgba(30,27,75,.92));
}
/* ---------- Hero CTA Buttons (Darker Variants) ---------- */
/* Scoped to the hero so nav and other buttons keep their current look */
.hero .btn{
  border-color: rgba(15,23,42,.28);
  box-shadow: 0 8px 22px rgba(2,6,23,.18);
}

.hero .btn.primary{
  background: linear-gradient(180deg, #0b5564, #0a4a58); /* deep teal */
  color: #f8fafc; /* near-white text for contrast */
  border-color: rgba(8,62,74,.55);
}
.hero .btn.primary:hover{
  background: linear-gradient(180deg, #0f6b7d, #0b5c6c);
  transform: translateY(-2px);
}
.hero .btn.primary:focus-visible{
  outline: 2px solid #0e7490;  /* teal focus */
  outline-offset: 2px;
}

.hero .btn.sun{
  background: linear-gradient(180deg, #7a4c0f, #6a410d); /* deep amber/bronze */
  color: #f8fafc;
  border-color: rgba(122,76,15,.6);
}
.hero .btn.sun:hover{
  background: linear-gradient(180deg, #8a5713, #7a4c0f);
  transform: translateY(-2px);
}
.hero .btn.sun:focus-visible{
  outline: 2px solid #9a6b1d;  /* amber focus */
  outline-offset: 2px;
}

/* === FINAL CARD HEIGHT ALIGNMENT (Pueblo Bonito + Jayco) === */
/* Pueblo Bonito: Executive & Junior in #suites */
#suites .cards{ align-items: stretch !important; }
#suites .card{ display:flex !important; flex-direction:column !important; }
#suites .card > img{
  aspect-ratio: 16 / 9;
  width: 100%; height: auto; object-fit: cover; display:block;
}
#suites .card-actions{ margin-top: auto !important; } /* pin buttons to bottom */

/* Jayco: Built for the Route Less Traveled & Inviting by Design in #about */
#about .cards{ align-items: stretch !important; }
#about .card{ display:flex !important; flex-direction:column !important; }
#about .card > img{
  aspect-ratio: 16 / 9;
  width: 100%; height: auto; object-fit: cover; display:block;
}
#about .card .card-actions{ margin-top: auto !important; }

/* === Visibility & label safeguards for #reserve on mobile/tablet === */
@media (max-width: 1024px){
  #reserve .contact-actions .btn span{ display:inline !important; }
}
@media (max-width: 720px){
  #reserve .contact-actions{ justify-content: center !important; gap:12px !important; }
  #reserve .contact-actions .btn{
    width: 100% !important;
    max-width: 520px !important;
    padding: 12px 16px !important;
    height: auto !important;
    border-radius: 12px !important;
    justify-content: center !important;
  }
  #reserve .contact-actions .btn span{ display:inline !important; }
}

/* Ensure slideshow shows active slide regardless of any other rules */
.slideshow .slide.show{ display:block !important; }
