/* ═══════════════════════════════════════════════════════════════
   LAYOUT.CSS — Announcement, Nav, Hero, Footer, Flotantes
   Sistema de diseño Hi-Fi RALOZ v2
═══════════════════════════════════════════════════════════════ */

/* ===== ANNOUNCEMENT BAR ===== */
.announcement-bar {
  background: var(--ink);
  color: var(--white);
  font-size: 13px;
  padding: 9px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  z-index: 1100;
  position: relative;
}
.announcement-bar strong { color: var(--yellow); }
.announcement-bar .ann-text-short { display: none; }
.ann-cta {
  background: var(--yellow);
  color: var(--ink);
  padding: 3px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
}
.ann-cta:hover { background: #ffe080; }
.ann-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 15px;
  cursor: pointer;
  padding: 0 4px;
  margin-left: 8px;
  transition: color 0.2s;
  line-height: 1;
}
.ann-close:hover { color: var(--white); }

/* ===== NAVBAR ===== */
#main-nav,
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(251,249,243,0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 64px;
}

/* Logo */
.nav-brand,
.nav-logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--ink);
  display: grid;
  place-items: center;
  color: var(--yellow);
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -1px;
  flex-shrink: 0;
}
.nav-logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 21px;
  color: var(--ink);
  letter-spacing: -0.4px;
}
.nav-logo-img { width: 32px; height: 32px; object-fit: contain; }
.nav-logo     { font-family: 'Fraunces', serif; font-weight: 700; font-size: 21px; }

/* Nav links */
#main-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin-left: 14px;
}
#main-nav ul li a {
  padding: 8px 13px;
  border-radius: 8px;
  font-size: 14.5px;
  color: var(--ink-2);
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
#main-nav ul li a:hover     { background: var(--blue-soft); color: var(--blue); }
#main-nav ul li a.active    { background: #f0ece0; color: var(--ink); }

/* Spacer */
.nav-spacer { flex: 1; }

/* Search bar (visual only) */
.nav-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f0ece0;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13.5px;
  min-width: 180px;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
  border: none;
}
.nav-search-bar:hover { background: #e8e4d4; }
.nav-search-bar svg   { width: 15px; height: 15px; flex-shrink: 0; }

/* CTA en nav */
.nav-tienda-btn,
.nav-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--yellow);
  color: var(--ink);
  padding: 9px 16px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  box-shadow: 0 1px 0 var(--yellow-dark), 0 6px 14px rgba(246,194,61,0.3);
  transition: background 0.15s, transform 0.1s;
  margin-left: 6px;
}
.nav-tienda-btn:hover,
.nav-cta-btn:hover { background: #ffd050; transform: translateY(-1px); }

/* Carrito en nav */
.nav-carrito-btn,
#navCarritoBtn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  position: relative;
  color: var(--ink-2);
  font-size: 16px;
  transition: background 0.15s;
  margin-left: 4px;
  flex-shrink: 0;
}
.nav-carrito-btn:hover,
#navCarritoBtn:hover { background: #f0ece0; }

.nav-carrito-badge,
#navCarritoBadge {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--red);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  width: 17px; height: 17px;
  border-radius: 50%;
  /* El JS pone display:inline-flex al mostrar el badge, así que centramos con
     align-items/justify-content (place-items no centra en horizontal con flex). */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-align: center;
  border: 2px solid var(--paper);
}

/* Toggle móvil */
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 18px;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  flex-shrink: 0;
}

/* ===== WHATSAPP FLOAT ===== */
.whatsapp-float {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 900;
  width: 56px; height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(37,211,102,0.45), 0 12px 28px rgba(0,0,0,0.12);
  transition: transform 0.15s;
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float img   { width: 30px; height: 30px; }

/* ===== HERO (SPLIT LAYOUT, FONDO CLARO) ===== */
header,
.hero-section {
  /* override del header oscuro anterior */
  min-height: unset;
  background: var(--paper);
  padding: 52px 28px 44px;
}

.hero-wrap {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 52px;
  align-items: center;
}

/* Eyebrow */
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}
.hero-eyebrow .dot {
  width: 7px; height: 7px;
  background: var(--blue);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Título */
.hero-wrap h1,
.hero-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(42px, 5.5vw, 62px);
  line-height: 1.02;
  letter-spacing: -1.5px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 20px;
}
.hero-wrap h1 em,
.hero-title em { color: var(--blue); font-style: italic; }
.hero-wrap h1 .accent,
.hero-title .accent {
  background-image: linear-gradient(transparent 65%, var(--yellow) 65%);
  padding: 0 4px;
}

/* Lead */
.hero-lead {
  font-size: 17px;
  color: var(--ink-2);
  max-width: 520px;
  margin: 0 0 28px;
  line-height: 1.6;
}

/* Acciones */
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

/* Trust row */
.trust-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px dashed var(--line);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink-2);
}
.trust-item strong {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1;
  margin-right: 2px;
}
.trust-item svg { width: 20px; height: 20px; color: var(--blue); flex-shrink: 0; }
.trust-divider  { width: 1px; height: 26px; background: var(--line); flex-shrink: 0; }

/* Hero derecha */
.hero-right-card {
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  padding: 22px;
}
.hero-photo-wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #ddd, #bbb);
}
.hero-photo-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.photo-tag {
  position: absolute;
  top: 14px; left: 14px;
  background: rgba(255,255,255,0.94);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  gap: 6px;
}
.photo-tag .dot {
  width: 6px; height: 6px;
  background: var(--blue);
  border-radius: 50%;
}
.photo-quality {
  position: absolute;
  bottom: 14px; right: 14px;
  background: var(--ink);
  color: var(--white);
  padding: 8px 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}
.photo-quality svg    { width: 16px; height: 16px; flex-shrink: 0; }
.photo-quality strong { color: var(--yellow); display: block; font-size: 12px; }

/* Atajo colegios */
.hero-quick { margin-top: 16px; }
.hero-quick-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin: 0 0 10px;
}
.hero-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.quick-school {
  border: 1.5px solid var(--line);
  background: var(--white);
  padding: 10px 10px;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.quick-school:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.07);
}
.qs-flag {
  width: 28px; height: 28px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--white);
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.qs-flag.b  { background: var(--blue); }
.qs-flag.r  { background: var(--red); }
.qs-flag.y  { background: var(--yellow); color: var(--ink); }
.qs-name    { font-size: 12px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.qs-count   { font-size: 10.5px; color: var(--muted); }

/* ===== BACK TO TOP ===== */
.back-to-top,
#backToTop {
  position: fixed;
  bottom: 90px; right: 24px;
  z-index: 800;
  width: 40px; height: 40px;
  background: var(--ink);
  color: var(--white);
  border: none;
  border-radius: 10px;
  display: none;
  place-items: center;
  font-size: 16px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.15s, background 0.15s;
}
.back-to-top:hover,
#backToTop:hover { background: var(--blue); transform: translateY(-2px); }
.back-to-top.visible,
#backToTop.visible { display: grid; }

/* ===== STICKY CTA MOBILE ===== */
.sticky-cta-mobile,
#stickyCTA {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 700;
  padding: 12px 20px;
  background: var(--ink);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sticky-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--yellow);
  color: var(--ink);
  padding: 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  width: 100%;
}

/* ===== FOOTER ===== */
footer {
  background: var(--ink);
  color: #bbbfc9;
  padding: 60px 28px 28px;
  margin-top: 0;
}
.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid #252830;
}
.footer-grid h3,
.footer-grid h4 {
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-family: 'DM Sans', sans-serif;
}
.footer-grid h3 {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  text-transform: none;
  letter-spacing: -0.3px;
  margin-bottom: 10px;
}
.footer-grid p   { font-size: 13.5px; line-height: 1.6; max-width: 320px; margin-bottom: 16px; }
.footer-grid ul  { list-style: none; }
.footer-grid li  { margin-bottom: 9px; font-size: 13.5px; }
.footer-grid a:hover { color: var(--yellow); }
.footer-grid address { font-style: normal; }
.footer-grid address p { margin-bottom: 7px; font-size: 13.5px; }

.footer-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.footer-badges span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #ddd;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.footer-badges span i { color: var(--yellow); font-size: 11px; }

.footer-mini-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--yellow);
  color: var(--ink);
  padding: 9px 15px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 13.5px;
  margin-top: 4px;
}
.footer-mini-cta:hover { background: #ffd050; }

.social-links li a {
  display: flex;
  align-items: center;
  gap: 8px;
}
.social-links li a i {
  width: 18px;
  text-align: center;
  color: var(--muted);
}
.social-links li a:hover i { color: var(--yellow); }

.footer-powered {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 12px;
  color: #555a66;
}
.footer-powered i { color: #444; }
.footer-powered strong { color: #888; }

.footer-legal {
  max-width: 1280px;
  margin: 24px auto 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: #666b78;
  padding-bottom: 16px;
  border-bottom: 1px solid #252830;
}
.footer-legal a { color: #666b78; }
.footer-legal a:hover { color: var(--yellow); }
.footer-legal-sep { color: #3a3d46; }

.footer-bottom {
  max-width: 1280px;
  margin: 18px auto 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12.5px;
  color: #555a66;
}
