    /* ==== BASE ==== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
}

body {
  
  color: #333;
  line-height: 1.6;
}

/* ==== HEADER ==== */
header {
  background: #fff;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: #A97C37;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 2rem;
  flex-wrap: nowrap;
}


/* Logo + título */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  height: 60px;
  width: auto;
}

.site-title {
  font-size: 1.4rem;
  font-weight: bold;
  color: #0d1b2a;
  margin: 0;
  white-space: nowrap;
}

/* ==== MENÚ ==== */
.menu {
  list-style: none;
  display: flex;
  gap: 5px;
  align-items: center;
}

.menu a {
  text-decoration: none;
  color: #fff; /* Texto blanco en header (PC) */
  font-weight: 500;
  padding: 10px 15px;
  display: block;
  transition: background 0.3s ease, color 0.3s ease; /* Agregué transición de color */
  border-radius: 4px;
}

.menu a:hover {
  /* CAMBIO: Usamos el código HEX correcto para el rojo */
  background: #8C1C2A; 
  /* CAMBIO CLAVE: Esto asegura que la letra se ponga blanca al pasar el mouse en PC */
  color: #fff !important; 
}

/* ==== SUBMENÚS (Lógica unificada) ==== */
/* Contenedores de dropdowns */
.dropdown, .dropdown-level-2 {
    background: #fff;
    list-style: none;
    padding: 8px 0;
    
    /* --- SOLUCIÓN PARA PC --- */
    min-width: 200px;       
    width: max-content;     
    max-width: 400px;       
    /* ------------------------ */

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    display: none; 
    z-index: 1001;
}

.dropdown a, .dropdown-level-2 a {
    color: #333; 
    padding: 10px 20px;
    font-size: 0.95rem;
    border-radius: 0;
    
    /* --- CLAVE PARA QUE SE HAGA EN 2 LÍNEAS --- */
    white-space: normal;  /* Permite saltos de línea */
    line-height: 1.3;     /* Espacio entre las 2 líneas */
    /* ------------------------------------------ */
    
    
    display: flex;
    justify-content: space-between; 
    align-items: center;
}

.dropdown a:hover, .dropdown-level-2 a:hover {
      background: #8C1C2A;
      color: #fff !important;
}

/* Flechitas */
.menu i { font-size: 0.8em; margin-left: 10px; transition: transform 0.3s; }
.arrow-right { margin-left: 15px; } 

/* --- DESKTOP SPECIFIC (Solo PC/Laptop) --- */
@media (min-width: 901px) {
    

    
    /* Dropdown Nivel 1 */
    .submenu { position: relative; }
    .submenu .dropdown {
        position: absolute;
        top: 100%;
        left: 0;
    }
    .submenu:hover > .dropdown { display: block; animation: fadeIn 0.2s; }

    /* Dropdown Nivel 2 */
    .submenu-inner { position: relative; }
    .submenu-inner .dropdown-level-2 {
        position: absolute;
        top: -5px;      
        left: 100%;     
        margin-left: 0;
        /* CAMBIO: 110px es muy poco, lo subí a 230px para que entre el texto */
        width: 110px; 
    }
    .submenu-inner:hover > .dropdown-level-2 { display: block; animation: fadeIn 0.2s; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==== MENU HAMBURGUESA & RESPONSIVE ==== */
.menu-toggle {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #fff;
  padding: 5px;
}

@media (max-width: 900px) {
  .site-title { font-size: 1rem; }
  .logo { height: 65px; }

  .menu-toggle { display: block; }

  .menu {
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff; /* Fondo blanco en menú móvil */
    max-height: 0;
    overflow: hidden; 
    transition: max-height 0.4s ease-out;
    box-shadow: 0 10px 10px rgba(0,0,0,0.1);
    gap: 0;
  }

  .menu.active {
    max-height: 100vh; 
    overflow-y: auto;
  }

  .menu li { width: 100%; border-bottom: 1px solid #eee; }
  
  /* Texto oscuro en móvil por defecto */
  .menu a { 
      color: #333; 
      padding: 15px 20px; 
  } 

  /* CAMBIO CLAVE MÓVIL: Al hacer hover/tap, fondo rojo y TEXTO BLANCO */
  .menu a:hover {
      background: #8C1C2A;
      color: #fff !important; 
  }

  /* Resetear estilos de dropdown para móvil */
  .dropdown, .dropdown-level-2 {
      position: static;
      box-shadow: none;
      border: none;
      background: #f9f9f9;
      width: 100%;
      padding: 0;
  }
  
  .dropdown a { padding-left: 40px; font-size: 0.9rem; }
  .dropdown-level-2 a { padding-left: 60px; background: #eee; }

  /* Mostrar menú al dar clic */
  .submenu.open > .dropdown { display: block; }
  .submenu-inner.open > .dropdown-level-2 { display: block; }

  /* Rotación de flechas */
  .submenu.open > a .fa-chevron-down { transform: rotate(180deg); }
  .submenu-inner.open > a .arrow-right { transform: rotate(90deg); }
}



/* ==== SLIDER ==== */
.slider {
  position: relative;
  height: 90vh;
  overflow: hidden;
}

.slides {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}

.slide {
  min-width: 100%;        /* 🔹 garantiza que cada slide ocupe todo el ancho */
  position: relative; /* Necesario para overlay */
  height: 100%;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff; /* Cambié a blanco para mejor contraste */
}

/* Oscurecer fondo */
.slide::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3); /* Ajusta opacidad: 0.3 = sutil */
  z-index: 1;
}

/* Para que el texto esté encima del overlay */
.caption {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 80%; /* para que no quede muy ancho */
}


.caption h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  line-height: 1.3;
}

.caption p {
  font-size: 1.2rem;
}

.controls {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  padding: 0 30px; /* margen para que no pegue al borde */
  box-sizing: border-box;
}


.controls span {
  cursor: pointer;
  font-size: 2rem;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 8px;
  border-radius: 50%;
}

@media (max-width: 768px) {
  .slider {
    height: 60vh;
  }

  .caption h2 {
    font-size: 1.8rem;
  }

  .caption p {
    font-size: 1rem;
  }
}



/* ==== SECCIONES ==== */
section {
  padding: 3rem 2rem;
  width: 100%;
}

.section-title {
  font-size: 2rem;
  text-align: center;
  margin: 40px 0 20px;
  font-weight: bold;
  color: #333;
}

.section-title.white {
  color: #fff;
}

section p {
  font-size: 1rem;
  color: #fff;
}

/* ==== SECCIÓN NOTARIO ==== */
.notario-container {
    display: flex;
    align-items: stretch; /* 🔹 Hace que ambos divs tengan la misma altura */
    gap: 20px;
    padding: 3rem 2rem;
    background: #0d1b2a;
}

.notario-texto {
    flex: 1;
    color: #fff;
    display: flex; 			/* 🔹 Ocupa toda la altura */
    flex-direction: column; 	/* 🔹 Mantiene estructura vertical */
    justify-content: center; 	/* 🔹 Centra verticalmente el texto */
}

.notario-imagen {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* ❌ ELIMINADO: Se quitó la propiedad 'animation' y 'opacity: 0' de aquí. 
       El estado inicial ahora lo define la clase 'notario-imagen-oculta' que se añade al HTML. */
}

.notario-imagen img {
    width: 100%;
    height: 100%; 	/* 🔹 Se ajusta al alto del contenedor */
    object-fit: cover;
    border-radius: 12px;
}

/* 🟢 CLASE AÑADIDA: Estado INICIAL (Oculta y Desplazada) */
.notario-imagen-oculta {
    transform: translateY(100px); /* Comienza 100px debajo */
    opacity: 0;                   /* Totalmente transparente */
    /* Asegura que no haya transición cuando JavaScript la añade inicialmente */
    transition: none;             
}

/* 🟢 CLASE AÑADIDA: Estado FINAL (Visible y Animada) - Se activa con JavaScript */
.animar-visible {
    /* Define la transición: 1.5s de duración, curva 'ease-out' */
    transition: transform 1.5s ease-out, opacity 1.5s ease-out; 
    transform: translateY(0);     /* Termina en su posición original */
    opacity: 1;                   /* Totalmente visible */
}

/* ❌ ELIMINADO: Los Keyframes ya no son necesarios porque estamos usando 'transition'
   para la animación, activada por JavaScript. */

/* Versión responsive (móviles) */
@media (max-width: 900px) {
    .notario-container {
        flex-direction: column;
    }

    .notario-imagen {
        margin-top: 20px;
        height: auto; 
    }
}

/* ==== MISION / VISION / VALORES ==== */
.info-container {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 20px;
  padding: 40px 20px;
  background-color: #fff;
  flex-wrap: wrap;
}

.info-container section {
  flex: 1 1 30%;
  background-color: #8C1C2A;
  color: #ffffff;
  text-align: center;
  padding: 30px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
}

.info-container section:hover {
  transform: translateY(-5px);
}

.info-container .section-title {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: #e0e1dd;
}

@media (max-width: 900px) {
  .info-container {
    flex-direction: column;
  }
  .info-container section {
    flex: 1 1 100%;
  }
}


/* === Frase + Video === */
.frase-video {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  background: #f9f9f9;
  text-align: center; /* centra contenido en su caja */
}

/* Columna de la frase */
.frase {
  flex: 1 1 500px;
  max-width: 600px;
  animation: fadeInLeft 1.5s ease;
  transition: transform 0.3s ease, color 0.3s ease;
  margin: 0 auto; /* centra en su columna */
}

/* Título */
.frase h2 {
  font-size: 2.2rem;
  color: #8C1C2A;
  margin-bottom: 15px;
  font-weight: bold;
  transition: color 0.3s ease;
}

/* Texto */
.frase p {
  font-size: 1.15rem;
  line-height: 1.6;
  color: #444;
  transition: color 0.3s ease;
}

/* Efecto hover */
.frase:hover {
  transform: scale(1.05);
}

.frase:hover h2 {
  color: #B22234; /* tono más vivo al pasar el mouse */
}

.frase:hover p {
  color: #000;
}

/* Columna del video */
.video {
  flex: 1 1 500px;
  max-width: 600px;
}

.video iframe {
  width: 100%;
  height: 315px;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.video video {
  width: 100%;
  max-width: 560px; /* límite máximo */
  height: auto;     /* mantiene proporción */
  display: block;
  margin: 0 auto;   /* centrado */
  border-radius: 10px; /* opcional: esquinas redondeadas */
}


/* Animación de entrada */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}



/* ==== FOOTER ==== */
footer {
  background: #0d1b2a;
  color: #fff;
  padding-top: 20px;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.footer-section {
  flex: 1 1 100px;
  margin: 10px;
}

.footer-section h4 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  color: #A97C37;
}

.footer-section p,
.footer-section a {
  font-size: 0.95rem;
  color: #ddd;
}

.footer-section a:hover {
  color: #fff;
}

.footer-section .libro-img {
  width: 150px;
  transition: transform 0.3s ease;
}

.footer-section .libro-img:hover {
  transform: scale(1.05);
}

.footer-copy {
  text-align: center;
  padding: 10px 0;
  border-top: 1px solid #444;
  font-size: 14px;
  margin-top: 20px;
  color: #bbb;
}

@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
    padding: 10px 15px;
  }

  .footer-section {
    margin: 5px 0;
  }

  .footer-section h4 {
    margin-bottom: 0.5rem;
  }

  .social-icons {
    justify-content: center;
  }
}

/* Redes sociales */
.social-icons {
  display: flex;
  gap: 15px;
}

.social-icons a {
  color: white;
  font-size: 1.3rem;
  transition: color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
  color: #A97C37;
  transform: scale(1.1);
}

/* Íconos de métodos de pago */
.payment-icons {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 5px;
}

/* Estilo general en laptop/desktop */
.payment-icons img {
  height: 35px;
  width: auto;
  transition: transform 0.3s;
}

.payment-icons img:hover {
  transform: scale(1.1);
}

/* Ajuste en pantallas pequeñas */
@media (max-width: 768px) {
  .payment-icons {
    justify-content: center; /* centra horizontalmente */
    flex-wrap: wrap; /* permite que se acomoden en varias líneas si no entran */
  }
}



/* ==== WHATSAPP ==== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25d366;
    color: white;
    
    /* 🟢 VALORES AUMENTADOS */
    font-size: 35px; /* Tamaño del icono */
    width: 70px;     /* Ancho del círculo */
    height: 70px;    /* Altura del círculo */
    /* 🟢 FIN VALORES AUMENTADOS */
    
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* ==== FORMULARIO ==== */
.formulario {
  max-width: 600px;
  margin: 3rem auto;
  padding: 2rem;
  background: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.formulario h2 {
  text-align: center;
  margin-bottom: 1rem;
  color: #0d1b2a;
}

.formulario form {
  display: flex;
  flex-direction: column;
}

.formulario label {
  margin-top: 1rem;
  font-weight: bold;
}

.formulario input,
.formulario textarea {
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-top: 0.3rem;
  font-size: 1rem;
}

.formulario button {
  margin-top: 1.5rem;
  padding: 0.8rem;
  background: #0d1b2a;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
}

.formulario button:hover {
  background: #1e3554;
}


/* ==== POPUP ==== */
.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.popup-content {
  background: #fff;
  border-radius: 10px;
/* --- AJUSTA ESTE VALOR --- */
  max-width: 500px; /* Antes era 600px. Prueba con 400px o 500px */
  /* ------------------------- */
  width: 100%;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: popupFade 0.4s ease;
}

@keyframes popupFade {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.popup-content img {
  width: 100%;
  border-radius: 10px;
}

.popup .close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 2rem;
  font-weight: bold;
  color: #333;
  cursor: pointer;
}

@media (max-width: 768px) {
  .popup-content {
    max-width: 90%;
  }
}
