/* ═══════════════════════════════════════════════════════════════
   Revista Tsikbal — estilos estáticos del sitio público
   Los colores del tema se inyectan inline desde PHP (theme_tokens).
   ═══════════════════════════════════════════════════════════════ */

/* ── Design tokens base (fallbacks; PHP los sobreescribe) ── */
:root {
  --g950:    oklch(13% 0.05 158);
  --g900:    oklch(20% 0.07 158);
  --g800:    oklch(28% 0.09 158);
  --g700:    oklch(36% 0.10 158);
  --g200:    oklch(90% 0.035 158);
  --g100:    oklch(95% 0.02 158);
  --cream:   oklch(97% 0.015 85);
  --cream-dk:oklch(93% 0.022 85);
  --gold:    oklch(68% 0.15 75);
  --gold-dk: oklch(52% 0.13 68);
  --terra:   oklch(58% 0.14 38);
  --txt:     oklch(14% 0.02 240);
  --txt-md:  oklch(42% 0.015 240);
  --txt-lt:  oklch(64% 0.012 240);
}

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  { font-family: 'Source Sans 3', system-ui, sans-serif; background: var(--cream); color: var(--txt); overflow-x: hidden; }

/* ── Scrollbar ── */
::-webkit-scrollbar       { width: 5px; }
::-webkit-scrollbar-track { background: var(--cream-dk); }
::-webkit-scrollbar-thumb { background: var(--g700); border-radius: 3px; }

/* ── Typography utilities ── */
.eyebrow {
  display: block;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 10px;
}
.sec-title {
  font-family: 'Playfair Display', serif;
  font-size: 40px; font-weight: 700;
  color: var(--g900); line-height: 1.15;
}

/* ── Button variants ── */
.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold); color: #1a2a18;
  padding: 14px 32px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; border: none; cursor: pointer;
  position: relative; overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.25s ease;
  box-shadow: 0 4px 18px rgba(200,168,75,0.35);
}
.btn-gold::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}
.btn-gold:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 8px 28px rgba(200,168,75,0.5); }
.btn-gold:hover::after { left: 140%; }
.btn-gold:active { transform: translateY(0) scale(0.98); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid rgba(255,255,255,0.32); color: rgba(255,255,255,0.82);
  padding: 12px 30px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(6px);
  position: relative; overflow: hidden;
  transition: border-color 0.25s, color 0.25s, background 0.25s, transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.btn-ghost:hover {
  border-color: rgba(255,255,255,0.7); color: #fff;
  background: rgba(255,255,255,0.10);
  transform: translateY(-2px);
}
.btn-ghost:active { transform: translateY(0); }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes progressBar {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@keyframes pulseGold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200,168,75,0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(200,168,75,0); }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Hero carousel progress bar */
.hero-progress-bar {
  position: absolute;
  bottom: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), rgba(200,168,75,0.6));
  transform-origin: left center;
  animation: progressBar var(--carousel-speed, 5200ms) linear;
  z-index: 20;
  border-radius: 0 2px 0 0;
}

/* Hero arrow buttons */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.18);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  backdrop-filter: blur(8px);
  transition: background 0.25s ease, border-color 0.25s ease,
              transform 0.3s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.25s ease;
}
.hero-arrow:hover {
  background: rgba(200,168,75,0.18);
  border-color: rgba(200,168,75,0.55);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 24px rgba(200,168,75,0.25);
}
.hero-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

/* Hero dots */
.hero-dot {
  height: 6px;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: width 0.4s cubic-bezier(0.34,1.56,0.64,1),
              background 0.3s ease,
              box-shadow 0.3s ease;
}
.hero-dot-active {
  background: var(--gold);
  box-shadow: 0 0 12px rgba(200,168,75,0.5);
  animation: pulseGold 2s ease-in-out infinite;
}
.hero-dot-inactive {
  background: rgba(255,255,255,0.3);
}
.hero-dot-inactive:hover {
  background: rgba(255,255,255,0.6);
}

/* ── Navbar ── */
.nav-desktop   { display: flex; gap: 28px; align-items: center; margin-left: auto; }
.nav-hamburger { display: none; margin-left: auto; }

/* Nav link hover underline (expands from center) */
.nav-link { position: relative; }
.nav-link::after {
  content: ''; position: absolute;
  bottom: -4px; left: 50%; right: 50%; height: 1.5px;
  background: var(--gold); transition: left 0.24s ease, right 0.24s ease;
  border-radius: 1px;
}
.nav-link:hover::after { left: 0; right: 0; }

/* ── News grid (12 columnas) ── */
.news-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 22px; }

/* ── Responsive breakpoints ── */
@media (max-width: 900px) {
  .news-grid { grid-template-columns: repeat(6, 1fr) !important; }
  .news-grid > * { grid-column: 1 / -1 !important; }
}

@media (max-width: 768px) {
  .site-header   { padding: 0 20px !important; }
  .nav-desktop   { display: none !important; }
  .nav-hamburger { display: flex !important; }
  .sec-title     { font-size: 28px !important; }

  /* ── Hero carousel mobile ── */
  .hero-arrow {
    width: 40px !important;
    height: 40px !important;
    top: auto !important;
    bottom: 52px !important;
    transform: none !important;
  }
  .hero-arrow:hover {
    transform: scale(1.1) !important;
  }
  .hero-arrow:first-of-type  { left: 20px !important; }
  .hero-arrow:last-of-type   { right: 20px !important; }
}

/* Hero layout full — mobile stacking */
@media (max-width: 680px) {
  .site-header {
    width: 100% !important;
    padding: 0 16px !important;
  }
  .nav-desktop {
    display: none !important;
  }
  .nav-hamburger {
    display: flex !important;
  }

  .hero-carousel {
    height: auto !important;
    min-height: 0 !important;
    padding-bottom: 48px;
    max-width: 100%;
  }
  .hero-carousel .hero-overlay-panel {
    padding: 22px 20px !important;
    gap: 16px !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    align-items: stretch !important;
  }
  .hero-carousel .hero-title-only,
  .hero-carousel .hero-full-left,
  .hero-carousel .hero-full-right,
  .hero-carousel .hero-split-left,
  .hero-carousel .hero-split-right,
  .hero-carousel .hero-two-images-left,
  .hero-carousel .hero-two-images-center,
  .hero-carousel .hero-two-images-right {
    position: relative !important;
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: auto !important;
    border: none !important;
    min-height: 0 !important;
    padding: 28px 16px 32px !important;
    box-sizing: border-box !important;
  }
  .hero-carousel .hero-full-left,
  .hero-carousel .hero-split-right,
  .hero-carousel .hero-two-images-center {
    background: rgba(0,0,0,0.45) !important;
  }
  .hero-carousel .hero-full-right,
  .hero-carousel .hero-split-left,
  .hero-carousel .hero-two-images-left,
  .hero-carousel .hero-two-images-right {
    display: none !important;
  }
  .hero-carousel .btn-gold,
  .hero-carousel .btn-ghost {
    width: 100%;
    justify-content: center;
    max-width: 100%;
  }
  .hero-carousel .btn-gold { padding: 14px 18px; }
  .hero-carousel .btn-ghost { padding: 12px 18px; }

  .hero-tsikbal-logo {
    max-width: 260px;
    width: auto;
    height: auto;
    display: block;
  }
  .hero-carousel .hero-tsikbal-logo {
    max-width: 100%;
    height: auto !important;
  }

  .hero-arrow {
    width: 40px !important;
    height: 40px !important;
    top: auto !important;
    bottom: 20px !important;
    transform: none !important;
  }
  .hero-arrow:first-of-type  { left: 16px !important; }
  .hero-arrow:last-of-type   { right: 16px !important; }

  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    max-width: 100% !important;
  }
  .footer-bottom > div {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }
  .footer-bottom a {
    width: 100%;
    max-width: 320px;
  }
}

/* ── Sección Último Número ── */
.latest-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 60px;
  align-items: center;
}

@media (max-width: 860px) {
  .latest-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .latest-cover-col {
    display: flex;
    justify-content: center;
  }
  .latest-book {
    max-width: 240px;
    transform: none !important;
    transition: none !important;
  }
}
@media (max-width: 560px) {
  .latest-header    { flex-direction: column !important; }
  .latest-actions   { flex-direction: column !important; }
  .latest-actions a,
  .latest-actions button { justify-content: center !important; text-align: center; width: 100%; }
  .latest-meta > div { border-right: none !important; }
}

@media (max-width: 600px) {
  .news-grid { gap: 14px !important; }
}

/* ── Footer responsive ── */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 280px;
  gap: 56px;
  align-items: start;
}
.footer-grid > * {
  min-width: 0;
}
.footer-logos {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
@media (max-width: 768px) {
  .footer-grid  { grid-template-columns: 1fr !important; gap: 32px !important; }
  .footer-logos { flex-wrap: wrap !important; gap: 14px !important; }
  footer { padding: 40px 24px 0 !important; }
  .footer-bottom { padding: 16px 24px !important; }
}
