/* =========================
   VARIABLES
========================= */
:root {
  --blue-dark: #0B2545;
  --blue-soft: #3E5C76;
  --gold: #C9A24D;
  --light: #F4F6F8;
  --white: #ffffff;
}

/* =========================
   RESET
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =========================
   BASE
========================= */
body {
  font-family: "Roboto", sans-serif;
  color: var(--blue-dark);
  line-height: 1.6;
  background: var(--white);
}

h1, h2, h3 {
  font-family: "Merriweather", serif;
}

img {
  max-width: 100%;
  display: block;
}

/* =========================
   CONTAINER
========================= */
.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* =========================
   HEADER
========================= */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.header.scrolled {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  position: relative;
}

.nav a {
  margin-left: 16px;
  text-decoration: none;
  color: var(--blue-dark);
  font-weight: 500;
}

/* =========================
   MENU HAMBURGUESA
========================= */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  height: 2px;
  width: 100%;
  background: var(--blue-dark);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* =========================
   NAV MENU
========================= */
.nav-menu {
  display: flex;
  align-items: center; /* 👈 CLAVE */
}

/* =========================
   MOBILE
========================= */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    background: #fff;
    flex-direction: column;
    align-items: center;
    padding: 24px 0;
    gap: 16px;
    transform: translateY(-20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav a {
    display: inline-flex;
  align-items: center;
  height: 40px; /* misma altura visual que el botón */
  }

  .header {
    background: #fff;
  }
}

/* =========================
   HERO
========================= */
.hero {
  position: relative;
  min-height: 90vh;
  background: url("https://i.postimg.cc/J4wY7JBL/hero1.jpg") center / cover no-repeat;
  display: flex;
  align-items: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(11, 37, 69, 0.85) 0%,
    rgba(11, 37, 69, 0.6) 40%,
    rgba(11, 37, 69, 0.2) 100%
  );
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 40px;
  left: 40px;
  width: 120px;
  height: 120px;
  background: url("../assets/logo.png") center/contain no-repeat;
  opacity: 0.08;
}

@media (max-width: 768px) {
  .hero::after {
    left: 50%;
    transform: translateX(-50%);
    bottom: 20px;
  }
}

.hero-content {
  position: relative;
  max-width: 600px;
  color: #fff;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.95;
  margin-bottom: 32px;
}

/* =========================
   SECTIONS
========================= */
.section {
  padding: 64px 0;
}

.bg-light {
  background: var(--light);
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

/* =========================
   GRID (mobile first)
========================= */
.grid {
  display: grid;
  gap: 24px;
}

.grid-2,
.grid-3,
.grid-4 {
  grid-template-columns: 1fr;
}

/* =========================
   CARDS
========================= */
.card {
  background: var(--white);
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* =========================
   IMAGE BOX
========================= */
.image-box img {
  border-radius: 12px;
}

/* =========================
   BUTTONS
========================= */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-primary {
  background: #ffffff;
  color: var(--blue-dark);
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: #f1f1f1;
  transform: translateY(-2px);
}


.btn-outline {
   padding: 10px 22px;
  border: 2px solid var(--blue-dark);
  border-radius: 8px;
  background: transparent;
  font-weight: 500;
  line-height: 1; /* 👈 IMPORTANTE */
  display: inline-flex;
  align-items: center;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* =========================
   CTA FINAL
========================= */
.cta-final {
  background: var(--blue-dark);
  color: var(--white);
  text-align: center;
  padding: 72px 20px;
}

/* =========================
   FORM
========================= */
.form input,
.form textarea {
  width: 100%;
  padding: 14px;
  margin-bottom: 16px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-family: inherit;
}

.form textarea {
  resize: vertical;
  min-height: 120px;
}

/* =========================
   WHATSAPP
========================= */
.whatsapp {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #25d366;
  color: white;
  font-size: 24px;
  padding: 16px;
  border-radius: 50%;
  text-decoration: none;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* =========================
   FOOTER
========================= */
.footer {
  background: #0b1e36;
  color: white;
  padding: 48px 0;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer-cta-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-footer {
  background: white;
  color: var(--blue-dark);
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
}

.btn-whatsapp {
  background: #25d366;
  color: white;
}

.footer-social img {
  width: 24px;
  margin: 8px;
}


/* =========================
   HOVER ANIMADO ICONOS
========================= */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.footer-social a:hover {
  animation: bounce 0.4s ease;
}


/* =========================
   DESKTOP (>=768px)
========================= */
@media (min-width: 768px) {
  .hero h1 {
    font-size: 52px;
  }

  .hero p {
    font-size: 18px;
  }

  .section {
    padding: 96px 0;
  }

  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-content {
    align-items: center;
  }
}

/* =========================
   SEO VISUAL (LEGIBILIDAD)
========================= */
body {
  text-rendering: optimizeLegibility;
}

p {
  max-width: 65ch;
}

/* =========================
   DARK MODE AUTOMÁTICO
========================= */
@media (prefers-color-scheme: dark) {
  :root {
    --white: #0b1e36;
    --light: #132a4a;
    --blue-dark: #f1f1f1;
  }

  body {
    background: #0b1e36;
    color: #f1f1f1;
  }

  .card,
  .footer,
  .header {
    background: #132a4a;
  }

  .btn-outline {
    border-color: #f1f1f1;
    color: #f1f1f1;
  }
}

.footer-social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

/* ICONOS REDES SOCIALES */
.footer-social a {
  display: inline-block;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.footer-social a:hover {
  transform: translateY(-5px) scale(1.1); /* sube y crece un poquito */
  filter: brightness(1.2); /* se ve más brillante */
}


/* =========================
   ANIMACIONES SUAVES
========================= */
.btn,
.card,
.whatsapp {
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
}

/* =========================
   ANIMACIONES ON SCROLL
========================= */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   WHATSAPP PULSE
========================= */
.whatsapp {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37,211,102,.7); }
  70% { box-shadow: 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* =====================
   NOVEDADES
===================== */

.section-subtitle {
  max-width: 700px;
  margin: 0 auto 3rem;
  text-align: center;
  color: #555;
  font-size: 1rem;
}

.novedades-grid {
  gap: 2rem;
}

.novedad h3 {
  font-family: "Merriweather", serif;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: #0B2545;
}

.novedad p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #444;
}

.leer-mas {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 500;
  font-size: 0.9rem;
  color: #0B2545;
  text-decoration: none;
  position: relative;
}

.leer-mas::after {
  content: "→";
  margin-left: 6px;
  transition: transform 0.3s ease;
}

.leer-mas:hover::after {
  transform: translateX(4px);
}

/* =====================
   ARTÍCULOS LEGALES
===================== */

.article {
  max-width: 820px;
  margin: 0 auto;
  font-family: "Roboto", sans-serif;
}

.article h1 {
  font-family: "Merriweather", serif;
  font-size: 2rem;
  color: #0B2545;
  margin-bottom: 1rem;
}

.article h2 {
  font-family: "Merriweather", serif;
  font-size: 1.25rem;
  color: #0B2545;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.article p {
  font-size: 1rem;
  line-height: 1.8;
  color: #333;
  margin-bottom: 1.2rem;
}

.article ul {
  margin: 1rem 0 1.5rem 1.2rem;
}

.article ul li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* Intro destacada */
.article-intro {
  font-size: 1.05rem;
  line-height: 1.8;
  padding-left: 1.2rem;
  border-left: 4px solid #0B2545;
  color: #444;
  margin-bottom: 2rem;
}

/* CTA PREMIUM */
.article-cta {
  background: #0B2545;
  color: #fff;
  padding: 2rem;
  margin-top: 3rem;
  border-radius: 8px;
}

.article-cta p {
  color: #eaeaea;
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
}

.article-cta .btn-primary {
  background: #fff;
  color: #0B2545;
  font-weight: 600;
}

.article-cta .btn-primary:hover {
  background: #f1f1f1;
}

/* ===== DESKTOP (por defecto) ===== */
.estudio-mobile {
  display: none;
}

.estudio-desktop {
  display: block;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .estudio-desktop {
    display: none;
  }

  .estudio-mobile {
    display: block;
  }

  #estudio p {
    font-size: 0.95rem;
    line-height: 1.6;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  height: 40px;
  width: auto;
}

.brand-name {
  font-family: 'Merriweather', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--blue-dark);
  white-space: nowrap;
}
