/* =====================================================================
   Xcaret Mexico — Independent Travel Guide
   Editorial Vanilla HTML · Vanilla CSS (no frameworks) · ES/EN bilingual
   Palette: cenote turquoise + jungle green + Riviera sand + warm amber
   ===================================================================== */

:root {
  /* Palette */
  --primary:        #0d6480;            /* cenote deep water */
  --primary-light:  #1a8aaa;
  --primary-deep:   #064858;
  --accent:         #d97706;            /* jungle sunset/amber */
  --accent-2:       #b45309;
  --jungle:         #0f5132;            /* deep jungle green */
  --jungle-light:   #198754;
  --bg:             #fffdf7;            /* warm cream */
  --bg-2:           #f5f1e8;            /* sand */
  --card:           #ffffff;
  --card-2:         #fbf8ee;
  --line:           #e7dfc9;
  --text:           #14202b;
  --muted:          #5a6b78;
  --footer-bg:      #0a4150;            /* deep cenote header on dark */
  --footer-text:    #d6e5ec;

  /* Typography */
  --font-display:    'Playfair Display', 'Times New Roman', serif;
  --font-body:       'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Spacing & radii */
  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 18px;
  --shadow-1:  0 1px 2px rgba(20, 32, 43, .08), 0 4px 12px rgba(20, 32, 43, .04);
  --shadow-2:  0 4px 16px rgba(20, 32, 43, .12);
}

/* ============== Base ============== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text);
  margin: 0 0 .6em;
  line-height: 1.2;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1em; }
a  { color: var(--primary); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ============== Reveal animation (progressive enhancement) ============== */
.js-reveal .reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
.js-reveal .reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============== Nav ============== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 253, 247, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 700;
  color: var(--primary-deep);
}
.nav-brand-mark {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--primary), var(--jungle));
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-brand-mark svg { width: 18px; height: 18px; }
.nav-links {
  display: flex; align-items: center; gap: 26px;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  color: var(--text); font-weight: 500; font-size: .95rem;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--primary); border-bottom-color: var(--accent); }

.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-lang-btn {
  font-family: var(--font-body); font-weight: 600;
  font-size: .82rem; letter-spacing: .05em;
  background: var(--bg-2); color: var(--primary-deep);
  border: 1px solid var(--line); padding: 8px 14px; border-radius: 100px;
  cursor: pointer; transition: all .2s ease;
}
.nav-lang-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.nav-hamburger {
  display: none;
  background: transparent; border: none; cursor: pointer;
  padding: 8px; color: var(--primary-deep);
}
.nav-hamburger svg { width: 24px; height: 24px; }

/* Mobile drawer */
.mobile-drawer {
  display: none;
  position: fixed; inset: 0; z-index: 60;
  background: rgba(20, 32, 43, .5);
}
.mobile-drawer.is-open { display: block; }
.mobile-drawer-panel {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: min(86vw, 320px); background: var(--bg);
  padding: 24px; box-shadow: -8px 0 32px rgba(0, 0, 0, .15);
  display: flex; flex-direction: column; gap: 4px;
  transform: translateX(100%); transition: transform .25s ease;
}
.mobile-drawer.is-open .mobile-drawer-panel { transform: translateX(0); }
.mobile-drawer header {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 18px; border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.mobile-drawer ul { list-style: none; padding: 0; margin: 0; }
.mobile-drawer ul a {
  display: block; padding: 14px 8px;
  border-bottom: 1px solid var(--line); color: var(--text); font-weight: 500;
}
.mobile-drawer .close-btn {
  background: transparent; border: none; cursor: pointer;
  color: var(--muted); padding: 8px;
}
.mobile-drawer .close-btn svg { width: 22px; height: 22px; }

@media (max-width: 880px) {
  .nav-links, .nav-actions .nav-lang-btn { display: none; }
  .nav-actions .nav-lang-btn.mobile-show { display: inline-flex; }
  .nav-hamburger { display: inline-flex; }
}

/* ============== Hero ============== */
.hero {
  position: relative;
  min-height: min(86vh, 720px);
  display: flex; align-items: center;
  background: linear-gradient(135deg, rgba(10, 65, 80, .82), rgba(6, 72, 88, .7) 50%, rgba(15, 81, 50, .72)),
              url('../images/hero.jpg') center/cover no-repeat;
  color: #fff;
  padding: 90px 0 80px;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 75% 30%, rgba(15, 81, 50, .35), transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(217, 119, 6, .18), transparent 60%);
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: 1180px; margin: 0 auto; padding: 0 24px;
}
.hero-eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase;
  color: #ecf6b9; border: 1px solid rgba(236, 246, 185, .4);
  padding: 7px 14px; border-radius: 100px;
  margin-bottom: 22px;
  background: rgba(0, 0, 0, .15);
}
.hero-heading {
  color: #fff;
  font-size: clamp(2.4rem, 5.4vw, 4.2rem);
  line-height: 1.08; max-width: 920px;
  margin: 0 0 22px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .25);
}
.hero-subheading {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  max-width: 760px;
  color: rgba(255, 255, 255, .94);
  margin-bottom: 32px;
  line-height: 1.6;
}
.hero-cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-weight: 600; font-size: .98rem;
  padding: 13px 26px; border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer; transition: all .2s ease;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-2); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: #fff; }
.btn svg { width: 16px; height: 16px; }

/* ============== Section base ============== */
.section { padding: 84px 0; }
.section-tight { padding: 56px 0; }
.section-heading { text-align: center; max-width: 760px; margin: 0 auto 50px; }
.section-eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 14px;
}
.section-h2 { margin: 0 0 12px; }
.section-sub { color: var(--muted); font-size: 1.05rem; max-width: 640px; margin: 0 auto; }

/* ============== Intro ============== */
.intro-grid {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: center;
}
.intro-image-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-2);
}
.intro-image-wrap::before {
  content: '';
  position: absolute; left: -16px; top: -16px;
  width: 100px; height: 100px;
  background: var(--accent);
  border-radius: 50%;
  z-index: -1;
  opacity: .35;
}
.intro-image { width: 100%; height: 380px; object-fit: cover; display: block; }
.intro-body p { font-size: 1.02rem; line-height: 1.72; color: var(--text); }

@media (max-width: 760px) {
  .intro-grid { grid-template-columns: 1fr; gap: 36px; }
  .intro-image { height: 280px; }
}

/* ============== Stats bar ============== */
.stats-bar {
  background: linear-gradient(135deg, var(--primary-deep), var(--jungle));
  color: #fff;
  padding: 50px 0;
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
  text-align: center;
}
.stat-item { padding: 0 8px; }
.stat-number {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  color: var(--bg);
  display: block; margin-bottom: 6px;
  letter-spacing: -.01em;
}
.stat-label {
  font-size: .82rem; font-weight: 500; text-transform: uppercase; letter-spacing: .1em;
  color: rgba(255, 255, 255, .8);
}
@media (max-width: 700px) { .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 26px; } }

/* ============== Articles grid ============== */
.articles-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px;
}
.article-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.article-card-image { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.article-card-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s ease;
}
.article-card:hover .article-card-image img { transform: scale(1.04); }
.article-card-eyebrow {
  position: absolute; top: 14px; left: 14px;
  background: rgba(10, 65, 80, .85);
  color: #fff;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em;
  padding: 6px 12px; border-radius: 100px;
  backdrop-filter: blur(4px);
}
.article-card-body { padding: 22px 24px 24px; flex: 1; display: flex; flex-direction: column; }
.article-card-title { font-size: 1.32rem; line-height: 1.3; margin: 0 0 10px; }
.article-card-desc { color: var(--muted); font-size: .96rem; margin: 0 0 16px; line-height: 1.55; }
.article-card-detailed {
  overflow: hidden;
  max-height: 0; opacity: 0;
  transition: max-height .5s ease, opacity .4s ease .05s, margin .4s ease;
}
.article-card.open .article-card-detailed {
  max-height: 1200px; opacity: 1; margin-top: 18px;
}
.article-card-detailed p { font-size: .95rem; line-height: 1.68; color: var(--text); margin-bottom: 12px; }
.article-card-detailed p:last-child { margin-bottom: 0; }

.article-toggle {
  margin-top: auto;
  align-self: flex-start;
  background: transparent; color: var(--primary);
  border: 1px solid var(--primary); padding: 9px 18px;
  border-radius: 100px;
  font-size: .85rem; font-weight: 600;
  cursor: pointer; transition: all .2s ease;
}
.article-toggle:hover { background: var(--primary); color: #fff; }
.article-toggle .arrow {
  display: inline-block; margin-left: 4px; transition: transform .25s ease;
}
.article-card.open .article-toggle .arrow { transform: rotate(180deg); }

@media (max-width: 760px) { .articles-grid { grid-template-columns: 1fr; gap: 22px; } }

/* ============== Tips ============== */
.section-tips { background: var(--bg-2); }
.tips-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px;
}
.tip-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 26px 28px;
}
.tip-card-title {
  font-family: var(--font-display); font-weight: 700; font-size: 1.18rem;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.tip-card-title svg { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; }
.tip-card-body { color: var(--text); font-size: .95rem; line-height: 1.68; margin: 0; }

@media (max-width: 700px) { .tips-grid { grid-template-columns: 1fr; gap: 16px; } }

/* ============== Seasonal ============== */
.seasonal-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.season-card {
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  color: #fff;
  display: flex; flex-direction: column;
  min-height: 240px;
  position: relative;
  overflow: hidden;
}
.season-card::before {
  content: '';
  position: absolute; right: -40px; top: -40px;
  width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}
.season-spring { background: linear-gradient(135deg, #2d6a4f, #52b788); }
.season-summer { background: linear-gradient(135deg, #9d4b00, #e07b39); }
.season-autumn { background: linear-gradient(135deg, #7f4f24, #b5752a); }
.season-winter { background: linear-gradient(135deg, #0d6480, #3aa3c4); }
.season-card-icon svg { width: 36px; height: 36px; margin-bottom: 18px; opacity: .85; }
.season-card-name {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; margin-bottom: 4px;
}
.season-card-period {
  font-size: .82rem; font-weight: 600; opacity: .85;
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 16px;
}
.season-card-desc { font-size: .92rem; line-height: 1.55; opacity: .95; }

@media (max-width: 1020px) { .seasonal-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px)  { .seasonal-grid { grid-template-columns: 1fr; } }

/* ============== Newsletter ============== */
.section-newsletter {
  background: linear-gradient(135deg, var(--bg-2), #ede2c8);
}
.newsletter-card {
  max-width: 760px; margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  box-shadow: var(--shadow-1);
  text-align: center;
}
.newsletter-card h2 { margin-bottom: 12px; }
.newsletter-card p { color: var(--muted); margin-bottom: 24px; }
.newsletter-form { display: flex; flex-direction: column; gap: 14px; }
.newsletter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.newsletter-input {
  font-family: var(--font-body); font-size: .98rem;
  background: #fff; color: var(--text);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 12px 20px;
  outline: none; transition: border-color .2s ease;
}
.newsletter-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13, 100, 128, .12); }
.newsletter-consent {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: .88rem; color: var(--muted);
  text-align: left;
}
.newsletter-consent input { margin-top: 4px; }
.newsletter-submit { align-self: center; }
.newsletter-error { color: #b91c1c; font-size: .9rem; margin-top: 8px; display: none; }
.newsletter-success {
  padding: 28px 24px;
  background: var(--jungle);
  color: #fff;
  border-radius: var(--radius);
  font-size: 1.05rem;
  display: none;
}
.newsletter-success.is-visible { display: block; }
.newsletter-success svg { width: 26px; height: 26px; margin-bottom: 12px; }

@media (max-width: 600px) {
  .newsletter-card { padding: 30px 22px; }
  .newsletter-row { grid-template-columns: 1fr; }
}

/* ============== FAQ ============== */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-bottom: none;
}
.faq-item:first-child { border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }
.faq-item:last-child  { border-bottom: 1px solid var(--line); border-bottom-left-radius: var(--radius); border-bottom-right-radius: var(--radius); }
.faq-question {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  background: transparent;
  border: none; cursor: pointer;
  padding: 20px 24px;
  text-align: left;
  font-family: var(--font-body);
  font-size: 1.02rem; font-weight: 600;
  color: var(--text);
  transition: background .2s ease;
}
.faq-question:hover { background: var(--bg-2); }
.faq-icon {
  width: 18px; height: 18px; color: var(--primary); flex-shrink: 0;
  transition: transform .3s ease;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height .35s ease;
}
.faq-item.open .faq-answer { max-height: 400px; }
.faq-answer-inner { padding: 0 24px 22px; color: var(--muted); line-height: 1.7; font-size: .96rem; }

/* ============== Footer ============== */
.footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 60px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}
.footer-col h4 {
  font-family: var(--font-body); font-weight: 700;
  color: #ecf6b9;
  font-size: .82rem; text-transform: uppercase; letter-spacing: .12em;
  margin: 0 0 16px;
}
.footer-col p { font-size: .92rem; color: rgba(255, 255, 255, .78); line-height: 1.6; margin: 0 0 10px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a {
  color: rgba(255, 255, 255, .85); font-size: .92rem;
  transition: color .2s ease;
}
.footer-col a:hover { color: var(--accent); }
.footer-contact-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: rgba(255, 255, 255, .85);
  font-size: .92rem;
}
.footer-contact-link::before {
  content: ''; display: inline-block;
  width: 14px; height: 14px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ecf6b9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/><polyline points='22,6 12,13 2,6'/></svg>") no-repeat center / contain;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding-top: 20px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-size: .84rem; color: rgba(255, 255, 255, .6);
}

@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* ============== Cookie banner ============== */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px;
  background: var(--text); color: #fff;
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: none; align-items: center; gap: 18px;
  flex-wrap: wrap;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, .25);
  z-index: 70;
  max-width: 760px; margin: 0 auto;
}
.cookie-banner.is-visible { display: flex; }
.cookie-banner p { margin: 0; font-size: .9rem; color: rgba(255, 255, 255, .92); flex: 1; min-width: 260px; }
.cookie-banner .btn { padding: 8px 16px; font-size: .85rem; }
.cookie-banner .btn-ghost { border-color: rgba(255, 255, 255, .35); color: #fff; }

/* ============== Legal pages ============== */
.legal-hero {
  background: linear-gradient(135deg, var(--primary-deep), var(--jungle));
  color: #fff;
  padding: 80px 0 50px;
}
.legal-hero h1 { color: #fff; max-width: 760px; margin: 12px 0 0; }
.legal-hero .section-eyebrow { color: #ecf6b9; }

.legal-content {
  padding: 60px 0 90px;
  background: var(--bg);
}
.legal-content h2 {
  font-family: var(--font-display);
  font-size: 1.5rem; margin: 36px 0 14px;
  color: var(--primary-deep);
}
.legal-content h2:first-of-type { margin-top: 0; }
.legal-content p { color: var(--text); font-size: 1rem; line-height: 1.72; }
.legal-content ul { padding-left: 22px; color: var(--text); }
.legal-content li { margin-bottom: 8px; line-height: 1.65; }
.legal-content .legal-meta {
  font-size: .88rem; color: var(--muted);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  margin-bottom: 30px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.legal-back {
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 18px;
  font-size: .9rem; color: var(--primary);
}

/* ============== Misc ============== */
::selection { background: var(--accent); color: #fff; }
