/* ==========================================================================
1. CONFIGURACIÓN GENERAL Y VARIABLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Verdana, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
2. HEADER & NAVBAR (ESTILO DELOITTE - COMPACTO Y PREMIUM)
   ========================================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 5%;
    background: #170101; /* Vinotinto ultra oscuro base */
    box-shadow: 0 1px 10px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 45px;
    width: auto;
}

.logo a {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    letter-spacing: 0.5px;
}

/* Ocultar elementos de control en escritorio */
.menu-checkbox, .hamburger-btn {
    display: none;
}

.nav-container {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s ease-in-out;
}

.nav-links a:hover {
    color: #c5a059; /* Toque dorado corporativo */
}

.btn-contacto {
    background: rgb(81, 9, 9);
    color: white !important;
    padding: 8px 18px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.btn-contacto:hover {
    background: #3a0c0c;
}

/* ==========================================================================
3. SECCIÓN HERO (BANNER PRINCIPAL)
   ========================================================================== */
.hero {
    background: linear-gradient(135deg, #380707 0%, #484c53 100%);
    padding: 100px 0;
    color: white;
}

.hero-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.btn-secondary {
    display: inline-block;
    border: 1px solid #fff;
    color: #fff;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #ffffff;
    color: #380707;
}

/* --- CARRUSEL DEL HERO --- */
.hero-image {
    flex: 1;
    width: 100%;
    max-width: 500px;
}

.carrusel-contenedor {
    width: 100%;
    height: 320px;
    overflow: hidden;
    position: relative;
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.carrusel-track {
    display: flex;
    width: 300%;
    height: 100%;
    animation: slide 12s infinite ease-in-out;
}

.carrusel-slide {
    width: 33.333%;
    height: 100%;
}

.carrusel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@keyframes slide {
    0% { transform: translateX(0);}
    30% { transform: translateX(0); }        
    33% { transform: translateX(-33.333%); } 
    63% { transform: translateX(-33.333%); }  
    66% { transform: translateX(-66.666%); }
    96% { transform: translateX(-66.666%); } 
    100% { transform: translateX(0); }
}

/* ==========================================================================
4. SECCIÓN DE SERVICIOS (ESTILO LIMPIO Y CORPORATIVO)
   ========================================================================== */
.services {
    background: #fdfdfd;
    padding: 90px 0;
    text-align: center;
    box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.03);
}

.services h2 {
    font-size: 2.5rem;
    color: #3a0c0c;
    font-weight: 700;
    margin-bottom: 40px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.card {
    background: #ffffff;
    padding: 40px 30px;
    border-radius: 12px;
    border-top: 5px solid #3a0c0c;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    text-align: left;
    transition: all 0.3s ease;
}

.card h3 {
    margin-bottom: 15px;
    color: #170101;
    font-size: 1.35rem;
    font-weight: 600;
}

.card p {
    color: #5a5a5a;
    font-size: 0.95rem;
    line-height: 1.6;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(58, 12, 12, 0.12);
}

/* --- LÓGICA DE DESPLIEGUE "LEER MÁS" EN TARJETAS --- */

/* Estilo de selector de país y teléfono alineados al estilo WhatsApp */
.phone-container {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.country-code-group,
.phone-input-group {
    margin-bottom: 0;
}

.country-code-group {
    flex: 0 0 140px;
    min-width: 140px;
}

.phone-input-group {
    flex: 1;
    min-width: 180px;
}

.phone-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #170101;
}

.country-code-group select,
.phone-input-group input[type="tel"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(0, 0, 0, 0.16);
    border-radius: 10px;
    background: #ffffff;
    color: #170101;
    font-size: 0.95rem;
}

.country-code-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Escondemos los inputs selectores del HTML */
.read-more-checkbox {
    display: none;
}

/* El contenedor oculto inicialmente tendrá una altura de cero y será invisible */
.more-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease-out, opacity 0.4s ease-out;
    padding-top: 0;
}

/* Espaciado interno para separar los párrafos adicionales */
.more-content p {
    margin-top: 15px;
    font-size: 0.95rem;
    color: #e0e0e0; /* Un gris claro para texto legible sobre fondo oscuro */
    border-left: 2px solid #c5a059; /* Línea dorada sutil a la izquierda que denota elegancia */
    padding-left: 10px;
}

/* El botón simulado con label */
.btn-read-more {
    display: inline-block;
    margin-top: 15px;
    color: #c5a059; /* Color dorado corporativo */
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s ease;
}

.btn-read-more:hover {
    color: #ffffff;
}

/* Texto dinámico por defecto usando atributos de HTML */
.btn-read-more::before {
    content: attr(data-more);
}

/* CUANDO EL CHECKBOX SE ACTIVA: Expandimos el contenido dinámicamente */
.read-more-checkbox:checked ~ .more-content {
    max-height: 500px; /* Suficiente espacio para desplegar el texto sin romper nada */
    opacity: 1;
    padding-top: 5px;
}

/* CUANDO EL CHECKBOX SE ACTIVA: Cambiamos el texto del botón a "Leer menos" automáticamente */
.read-more-checkbox:checked ~ .btn-read-more::before {
    content: attr(data-less);
}
/* ==========================================================================
5. SECCIÓN CALL TO ACTION (CTA - AGENDA TU ASESORÍA)
   ========================================================================== */
.cta-agenda {
    position: relative;
    padding: 120px 0; 
    text-align: center;
    color: white;
    background-image: url('../imagenes/tu-imagen-de-equipo.jpg'); 
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.overlay-agenda {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65); 
    z-index: 1; 
}

.container-agenda {
    position: relative;
    z-index: 2; 
}

.agenda-content h2 {
    font-size: 2.8rem; 
    margin-bottom: 15px;
    font-weight: 700;
}

.agenda-content p {
    font-size: 1.2rem;
    margin-bottom: 35px;
    opacity: 0.9;
    max-width: 600px; 
    margin-left: auto; 
    margin-right: auto;
}

.btn-agenda {
    display: inline-flex;
    align-items: center;
    gap: 10px; 
    background: #c5a059;
    color: white;
    text-decoration: none;
    padding: 15px 35px;
    border-radius: 50px; 
    font-weight: bold;
    font-size: 1rem;
    letter-spacing: 1px; 
    border: none;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.4);
    transition: all 0.3s ease;
}

.btn-agenda:hover {
    background: #b08c47;
    transform: translateY(-3px); 
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.6);
}

/* ==========================================================================
CORRECCIÓN: LÓGICA DE DESPLIEGUE "LEER MÁS" INDEPENDIENTE
   ========================================================================== */

/* Alineación para que cada tarjeta flote de forma independiente y no estire a las vecinas */
.card-wrapper {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: auto;
}

.read-more-checkbox {
    display: none;
}

.more-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease-out, opacity 0.3s ease-out;
}

/* CORRECCIÓN DE COLOR: Texto oscuro y nítido para leerse perfecto sobre la tarjeta blanca */
.more-content p {
    margin-top: 15px;
    font-size: 0.95rem;
    color: #444444; /* Gris oscuro corporativo de alta legibilidad */
    border-left: 2px solid #3a0c0c; /* Detalle de línea guía en vinotinto */
    padding-left: 10px;
    line-height: 1.5;
}

.more-content p strong {
    color: #170101; /* Títulos internos resaltados en negro corporativo */
}

.btn-read-more {
    display: inline-block;
    margin-top: 18px;
    color: #3a0c0c; /* Cambiado a Vinotinto para que resalte más como botón de acción */
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.btn-read-more:hover {
    color: #c5a059; /* Pasa a dorado al poner el mouse encima */
}

.btn-read-more::before {
    content: attr(data-more);
}

/* COMPORTAMIENTO DINÁMICO */
.read-more-checkbox:checked ~ .more-content {
    max-height: 600px; /* Despliegue seguro de la información */
    opacity: 1;
    margin-bottom: 5px;
}

.read-more-checkbox:checked ~ .btn-read-more::before {
    content: attr(data-less);
}

/* ==========================================================================
6. RESPONSIVE DESIGN & MENÚ DESPLEGABLE LATERAL
   ========================================================================== */

/* Tablets y pantallas medianas */
@media (max-width: 968px) {
    .hero-flex {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .hero-text h1 {
        font-size: 2.8rem;
    }

    .hero-image {
        max-width: 100%;
    }
}

/* Teléfonos inteligentes (Menor a 768px para activar el menú hamburguesa) */
@media (max-width: 768px) {
    
    /* Reordenamos la barra superior en una sola línea horizontal */
    .navbar {
        padding: 10px 15px;
        justify-content: space-between;
    }

    .logo img {
        height: 35px;
    }

    .logo a {
        font-size: 0.8rem;
    }

    /* Mostrar botón de hamburguesa */
    .hamburger-btn {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 22px;
        height: 18px;
        cursor: pointer;
        z-index: 1002;
        order: 1; /* Lo manda a la extrema izquierda */
    }

    .hamburger-btn span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: #ffffff;
        transition: all 0.3s ease;
    }

    .logo {
        order: 2; /* Logo al centro */
        margin-left: 10px;
    }

    .btn-contacto {
        order: 3; /* Contacto a la derecha */
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    /* Transformación de la navegación en un panel lateral de izquierda a derecha */
    .nav-container {
        position: fixed;
        top: 0;
        left: -100%; /* Totalmente oculto a la izquierda */
        width: 280px;
        height: 100vh;
        background: #170101; /* Color vinotinto oscuro uniforme */
        box-shadow: 5px 0 15px rgba(0,0,0,0.5);
        padding: 80px 30px;
        transition: left 0.4s ease;
        z-index: 1001;
        align-items: flex-start;
    }

    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
        width: 100%;
    }

    .nav-links a {
        font-size: 1.1rem;
        display: block;
        width: 100%;
        padding: 5px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* LÓGICA DE APERTURA: Cuando el checkbox se marca, el menú se desliza */
    .menu-checkbox:checked ~ .nav-container {
        left: 0; /* Entra a la pantalla */
    }

    /* Animación del botón hamburguesa transformándose en una "X" al abrir */
    .menu-checkbox:checked ~ .hamburger-btn span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .menu-checkbox:checked ~ .hamburger-btn span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-checkbox:checked ~ .hamburger-btn span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    /* Ajustes extras del resto de elementos en pantallas pequeñas */
    .hero {
        padding: 50px 0;
    }

    .hero-text h1 {
        font-size: 2.1rem;
    }

    .carrusel-contenedor {
        height: 190px;
    }

    .services {
        padding: 50px 0;
    }

    .services h2 {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }

    .card {
        padding: 25px 20px;
    }

    .cta-agenda {
        padding: 60px 0;
        background-attachment: scroll;
    }

    .agenda-content h2 {
        font-size: 1.8rem;
    }

    .btn-agenda {
        width: 100%;
        justify-content: center;
    }
}
/* ==========================================================================
6. FOOTER (PIE DE PÁGINA)
========================================================================== */
.footer {
    background: #170101; /* Mismo vinotinto oscuro del header para cohesión */
    color: #ffffff;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ==========================================================================
7. SECCIÓN EXCLUSIVA: SOBRE NOSOTROS
   ========================================================================== */

/* Banner Principal de la Sección */
.about-hero {
    background: linear-gradient(135deg, #170101 0%, #2b0303 100%);
    padding: 80px 0;
    text-align: center;
    border-bottom: 3px solid #c5a059; /* Línea dorada de acento sutil */
}

.subtitle-gold {
    color: #c5a059;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 15px;
}

.about-hero h1 {
    font-size: 2.8rem;
    color: #ffffff;
    margin-bottom: 20px;
    font-weight: 700;
}

.about-hero p {
    font-size: 1.1rem;
    color: #e0e0e0;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Sección de Equipo */
.team-section {
    background: #fdfdfd;
    padding: 80px 0;
    text-align: center;
}

.team-section h2 {
    font-size: 2.3rem;
    color: #170101;
    font-weight: 700;
    margin-bottom: 10px;
}

.section-desc {
    color: #666666;
    font-size: 1rem;
    margin-bottom: 50px;
}

/* Grid del Equipo */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    justify-content: center;
}

/* Tarjeta de Miembro individual (Diseño Corporativo Premium) */
.team-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 35px 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(23, 1, 1, 0.08);
}

.team-img-wrapper {
    width: 140px;
    height: 140px;
    margin: 0 auto 20px auto;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #c5a059; /* Marco dorado para destacar el perfil directivo */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    background: #320404; /* Fondo blanco para la imagen del miembro */
}

.team-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-width: 100%;
    min-height: 100%;
}

.team-card h3 {
    font-size: 1.3rem;
    color: #170101;
    margin-bottom: 5px;
    font-weight: 600;
}

.team-card .role {
    display: block;
    color: #c5a059;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

/* Etiquetas de Especialidades */
.specialties {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 15px;
}

.specialties span {
    background: rgba(23, 1, 1, 0.05);
    color: #170101;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 500;
    border: 1px solid rgba(23, 1, 1, 0.08);
}

/* Sección de Compromiso Institucional (Cierre) */
.about-commitment {
    position: relative;
    padding: 100px 0;
    text-align: center;
    color: #ffffff;
    /* Usamos degradado robusto corporativo si no hay imagen de fondo */
    background: linear-gradient(135deg, #2b0303 0%, #170101 100%);
}

.commitment-content {
    position: relative;
    z-index: 2;
    max-width: 850px;
    margin: 0 auto;
}

.commitment-content h2 {
    font-size: 2.5rem;
    color: #c5a059; /* Título en dorado para el cierre formal */
    margin-bottom: 25px;
    font-weight: 700;
}

.main-commitment {
    font-size: 1.25rem;
    line-height: 1.7;
    margin-bottom: 20px;
    font-weight: 500;
}

.sub-commitment {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #cccccc;
}

/* Indicador de página activa en el menú de navegación */
.nav-links a.active {
    color: #c5a059;
    font-weight: 600;
}

/* ==========================================================================
Ajustes Responsive adaptados para la sección Sobre Nosotros
   ========================================================================== */
@media (max-width: 768px) {
    .about-hero {
        padding: 50px 0;
    }
    
    .about-hero h1 {
        font-size: 2rem;
    }
    
    .about-hero p {
        font-size: 0.95rem;
    }

    .team-section {
        padding: 50px 0;
    }

    .team-grid {
        gap: 25px;
    }
    
    .about-commitment {
        padding: 60px 0;
    }

    .commitment-content h2 {
        font-size: 1.9rem;
    }

    .main-commitment {
        font-size: 1.05rem;
    }
}


/* Ajustes Responsive de Texto para Pantallas Pequeñas */
@media (max-width: 480px) {
    .modal-box h2 {
        font-size: 1.35rem !important;
    }
    .btn-social-contact {
        font-size: 0.85rem !important;
        padding: 10px;
    }
}