/* PALETA DE COLORES */
:root {
    --guinda-deep: #5a0b1a;   /* Guinda institucional */
    --guinda-claro: #800b21;  /* Acento */
    --dorado: #c5a059;        /* Elegancia */
    --blanco: #ffffff;
    --texto: #333333;
    --fondo-gris: #f8f9fa;
}
/* --- BARRA SUPERIOR (TOP BAR) --- */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 10px 20px;
  box-sizing: border-box;

  transition: transform 0.3s ease;
}

body {
    padding-top: 50px;
    font-family: 'Segoe UI', Arial, sans-serif;
    color: var(--texto);
    line-height: 1.6;
}

/* Cuando se oculta */
.topbar.ocultar {
  transform: translateY(-100%);
}
.topbar {
    flex-wrap: wrap;
    background-color: #4a0815; /* Un guinda un poco más oscuro que el principal */
    color: rgba(255,255,255,0.9);
    font-size: 0.85rem;
    padding: 8px 0;
}

.top-bar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

/* Alineación de grupos */
.contact-info, .social-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Línea Vertical */
.v-line {
    width: 1px;
    height: 14px;
    background-color: rgba(255,255,255,0.3);
    display: inline-block;
}

/* Enlaces de la Top Bar */
.top-link {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.top-link:hover {
    color: var(--dorado);
}

/* Redes Sociales */
.social-links {
    display: flex;
    gap: 12px;
    margin-right: 15px; /* Más alejado del botón calculadora */
    margin-left: 15px;
}

.social-links a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.75rem;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 8px;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--dorado);
    border-color: var(--dorado);
}

/* Botón Calculadora */
.btn-calc {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.75rem;

  border: 1px solid rgba(255,255,255,0.2);
  padding: 4px 10px;
  border-radius: 8px;

  transition: all 0.3s;
}

.btn-calc img {
  width: 24px;
  height: 24px;
}

.btn-calc:hover {
  background: var(--dorado);
  border-color: var(--dorado);
}

/* Ajuste al header principal para que no se vea gigante */
.main-header {
    border-bottom: 3px solid var(--guinda-deep);
}

/* RESET GENERAL */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* HEADER & NAV */
.main-header {
    background: var(--blanco);
    border-bottom: 4px solid var(--guinda-deep);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--guinda-deep);
    text-decoration: none;
    text-transform: uppercase;
}

.logo span {
    color: var(--dorado);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--texto);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--guinda-deep);
}

/* BOTÓN MESA DE PARTES */
.btn-mesa {
    background: var(--guinda-deep);
    color: white !important;
    padding: 0.7rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    display: inline-block;
    animation: effect-pulse- 2s infinite;
}

.btn-mesa:hover {
    background: var(--guinda-claro);
    text-decoration: none;
    box-shadow: 0 6px 15px rgba(90, 11, 26, 0.2);
}
.icono-red {
  width: 20px;   /* ajusta el tamaño */
  height: 20px;
  object-fit: contain;
}

/* --- SECCIÓN HERO CORREGIDA --- */
.hero {
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    /* Imagen de prueba confiable (reemplaza por la tuya cuando funcione) */
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), 
                url('fondo.jpg') no-repeat center center;
    background-size: cover;
    position: relative;
    z-index: 1; /* El hero debe estar por debajo del menú */
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.7);
}

/* --- REPARACIÓN DEL MENÚ DESPLEGABLE --- */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none; /* Se oculta por defecto */
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    min-width: 220px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 0 0 20px 20px;
    border-top: 4px solid var(--guinda-deep);
    padding: 15px 0;
    list-style: none;
    z-index: 2000; /* Asegura que flote sobre la imagen del hero */
}

/* IMPORTANTE: Esta regla hace que el menú aparezca */
.dropdown:hover .dropdown-content {
    display: block !important;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-content li a {
    color: #333 !important;
    padding: 12px 25px !important;
    display: block !important;
    text-transform: none !important;
    font-size: 0.9rem;
}

.dropdown-content li a:hover {
    background-color: #f8f9fa;
    color: var(--guinda-deep) !important;
}

/* VENTANA EMERGENTE (MODAL) */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: 0.4s;
}

.show-modal {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 450px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transform: translateY(-20px);
    transition: 0.4s;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.show-modal .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    z-index: 10;
}

.modal-image {
    height: 200px;
    background: url('mejora.jpg') no-repeat;
    background-size: contain;
    background-position: center 30px; 
}

.modal-text {
    padding: 2rem;
    text-align: center;
}

.modal-text h2 {
    color: var(--guinda-deep);
    margin-bottom: 1rem;
}

.btn-modal {
    background: var(--dorado);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    margin-top: 1rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 30px;
    transition: 0.3s;
}

.btn-modal:hover {
    background: #b08d4a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(197, 160, 89, 0.3);
}

/* CONTENIDO ADICIONAL */
.main-content {
    max-width: 1000px;
    margin: 4rem auto;
    padding: 0 2rem;
    text-align: center;
}

.separator {
    width: 60px;
    height: 4px;
    background: var(--dorado);
    border: none;
    margin: 1.5rem auto;
    border-radius: 10px;
}
/* CONTENEDOR ESPECÍFICO DE NOSOTROS */
.container-nosotros {
    max-width: 1100px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.intro-nosotros {
    text-align: center;
    margin-bottom: 3rem;
}

.intro-nosotros h1 {
    color: var(--guinda-deep);
    font-size: 2.5rem;
}

/* GRID DE CUADROS */
.grid-nosotros {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.card-nosotros {
    flex: 0 0 calc(33.333% - 1.34rem);
    max-width: 340px;
    min-width: 260px;
    background: var(--blanco);
    padding: 2.5rem;
    border: 1px solid #eee;
    border-top: 5px solid var(--guinda-deep); /* Borde superior guinda */
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.4rem;

}

.card-nosotros:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 25px rgba(90, 11, 26, 0.15);
}

/* BOTÓN LLAMATIVO CON EFECTO */
.btn-adjunto {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 12px 25px;
    background-color: var(--guinda-deep);
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 50px; /* Redondeado */
    transition: all 0.4s ease;
    border: 2px solid transparent;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-adjunto:hover {
    background-color: var(--dorado);
    transform: scale(1.1); /* Efecto de aumento */
    box-shadow: 0 0 20px rgba(197, 160, 89, 0.6); /* Brillo (Glow) dorado */
    letter-spacing: 1px;
}

/* Efecto de pulsación suave constante para llamar la atención */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(90, 11, 26, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(90, 11, 26, 0); }
    100% { box-shadow: 0 0 0 0 rgba(90, 11, 26, 0); }
}

.destaque .btn-adjunto {
    animation: pulse 2s infinite;
}
/* ==========================================
   RESPONSIVE DESIGN (MÓVILES Y TABLETS)
   ========================================== */

/* 1. Ajustes para la Barra Superior */
@media (max-width: 768px) {
    .top-bar-container {
        margin: 0 15px; /* Menos margen en móviles */
        flex-direction: column; /* Apila contacto arriba y redes abajo */
        gap: 10px;
        padding: 10px 0;
        align-items: flex-start;
    }

    .v-line {
        display: none; /* Ocultamos líneas verticales en móvil para ahorrar espacio */
    }

    .contact-info {
        flex-wrap: wrap; /* Si el número es largo, salta de línea */
        gap: 10px;
    }

    .social-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* 2. Ajustes para el Menú Principal (Navbar) */
@media (max-width: 992px) {
    .navbar {
        margin: 0 15px;
        justify-content: space-between;
    }

    .menu-toggle {
        display: block; /* Aparece el botón hamburguesa */
        cursor: pointer;
        background: none;
        border: none;
    }

    .menu-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        background: var(--guinda-deep);
        margin: 5px 0;
        transition: 0.3s;
    }

    /* Ocultamos el menú original y lo hacemos vertical */
    .nav-links {
        display: none; /* Se oculta por defecto */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--blanco);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        border-bottom: 3px solid var(--guinda-deep);
        gap: 15px;
    }

    /* Clase que activaremos con JS */
    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }
}

/* 3. Ajustes para la página "Nosotros" y Hero */
@media (max-width: 600px) {
    .hero-content h1 {
        font-size: 2rem; /* Texto más pequeño en celulares */
    }

    .grid-nosotros {
        gap: 1rem;
    }

    .card-nosotros {
        flex: 0 0 100%;
        max-width: 100%;
        min-width: unset;
        padding: 1.5rem;
    }
}
@media (max-width: 768px) {
  .topbar {
    flex-direction: column;
    text-align: center;
    gap: 10px;
    height: auto;
  }

  .topbar .redes {
    display: flex;
    justify-content: center;
    gap: 10px;
  }
}
@media (max-width: 768px) {
  .social-links img {
    width: 18px;
    height: 18px;
  }
}
@media (max-width: 768px) {
  body {
    padding-top: 100px;
  }
}
@media (max-width: 768px) {
  .btn-calc span {
    display: none;
  }
}
/* --- BOTÓN MESA DE PARTES CON EFECTO LIDERA --- */
.btn-mesa {
    background-color: var(--guinda-deep);
    color: white !important;
    padding: 0.7rem 1.5rem;
    border-radius: 30px;
    text-decoration: none !important; /* Elimina subrayado */
    display: inline-block;
    font-weight: bold;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    /* Animación de pulsación constante */
    animation: effect-pulse- 2s infinite;
}

/* Efecto al pasar el mouse */
.btn-mesa:hover {
    background-color: var(--guinda-claro);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(128, 11, 33, 0.8); /* Brillo intenso al hover */
    color: white !important;
}

/* Animación de la onda de brillo (Glow) */
@keyframes effect-pulse- {
    0% {
        box-shadow: 0 0 0 0 rgba(90, 11, 26, 0.7);
    }
    70% {
        /* La onda se expande y se vuelve transparente */
        box-shadow: 0 0 0 15px rgba(90, 11, 26, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(90, 11, 26, 0);
    }
}
/* --- BOTÓN RECTANGULAR: DE BLANCO A CARGA DE COLOR --- */
.card-informativa-btn {
    display: block;
    max-width: 450px;
    background-color: #ffffff; /* Blanco al inicio */
    
    /* Creamos una capa de color oculta a la izquierda (-100%) */
    background-image: linear-gradient(
        to right, 
        var(--guinda-deep) 50%, 
        #ffffff 50%
    );
    background-size: 200% 100%;
    background-position: 100% 0; /* Muestra la mitad blanca al inicio */
    
    color: var(--guinda-deep) !important; /* Texto oscuro sobre fondo blanco */
    text-decoration: none !important;
    padding: 25px;
    border-radius: 12px;
    position: relative;
    transition: all 0.5s ease-in-out;
    overflow: hidden;
    border: 2px solid var(--guinda-deep);
}

/* EFECTO AL PASAR EL MOUSE (HOVER) */
.card-informativa-btn:hover {
    /* Desplazamos el fondo para que el guinda "cargue" */
    background-position: 0 0; 
    color: #ffffff !important; /* El texto cambia a blanco para contrastar */
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(90, 11, 26, 0.2);
}

/* Ajustes de contenido interno */
.card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
/* Contenedor principal */
.container-piramide {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px; /* Espacio entre niveles */
    padding: 40px 20px;
    width: 100%;
}

/* Nivel 1 (Presidente): Centrado solo */
.nivel-uno {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Nivel 2 (Vocales): Dos en una fila */
.nivel-dos {
    display: flex;
    flex-wrap: wrap; /* Para que sea responsivo en móviles */
    justify-content: center;
    gap: 20px; /* Espacio entre los dos vocales */
    width: 100%;
}

/* Ajuste responsivo: en celulares se ponen uno debajo de otro */
@media (max-width: 768px) {
    .nivel-dos {
        flex-direction: column;
        align-items: center;
    }
}

.card-title {
    font-size: 1.4rem;
    font-weight: bold;
    transition: color 0.5s;
}

.card-subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 10px;
    transition: color 0.5s;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(90, 11, 26, 0.2);
    padding-top: 10px;
    transition: border-color 0.5s;
}

/* Cambia el color del borde interno en hover */
.card-informativa-btn:hover .card-footer {
    border-top-color: rgba(255, 255, 255, 0.3);
}
/* --- BANNER DE SECCIÓN (HERO) --- */
.section-banner {
    width: 100%;
    height: 300px; /* Puedes ajustar la altura según prefieras */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-image: url('justicia.jpg'); /* Reemplaza con la ruta de tu imagen */
    background-size: cover;
    background-position: center;
}

/* Capa oscura para que el texto resalte */
.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Oscurece la imagen un 50% */
    z-index: 1;
}

.banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

.banner-title {
    font-size: 3rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    /* Aplicamos la animación */
    animation: fadeInUp 1.2s ease-out forwards;
    opacity: 0; /* Inicia invisible para la animación */
}

.banner-underline {
    width: 80px;
    height: 5px;
    background-color: var(--dorado);
    margin: 0 auto;
    animation: scaleIn 1s ease-out 0.5s forwards;
    transform: scaleX(0);
}

/* --- ANIMACIONES --- */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

/* Ajuste para móviles */
@media (max-width: 768px) {
    .section-banner {
        height: 200px;
    }
    .banner-title {
        font-size: 1.8rem;
    }
}
/* --- SISTEMA DE COLUMNAS MANUAL --- */
.footer-area {
    background-color: #0b0b0b;
    color: #ffffff;
    padding: 60px 0 30px 0;
    border-top: 5px solid #800000; /* Línea Guinda */
    width: 100%;
}

.footer-area .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Esto arregla el amontonamiento de la imagen */
.footer-area .row {
    display: flex; 
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
}

/* Forzamos las 4 columnas (25% cada una) */
.footer-area .col-lg-3, 
.footer-area .col-md-6, 
.footer-area .col-sm-6 {
    flex: 1;
    min-width: 200px; /* Evita que se aplasten demasiado */
    margin: 10px;
    box-sizing: border-box;
}

/* Estilos de texto para que sea vea profesional */
.footer-area h6 {
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.footer-area p, .footer-area a {
    color: #b0b0b0;
    font-size: 14px;
    text-decoration: none;
    line-height: 1.6;
    display: block;
}

.footer-area ul {
    list-style: none;
    padding: 0;
}

.footer-area a:hover {
    color: #800000;
    padding-left: 5px;
    transition: 0.3s;
}

/* Barra inferior */
.footer-bottom {
    border-top: 1px solid #222;
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    width: 100%;
}