:root {
    /* Paleta de Colores sobria y profesional */
    --primary-dark: #0a192f;
    /* Azul noche profundo */
    --primary-blue: #112240;
    /* Azul corporativo */
    --gold: #c5a059;
    /* Dorado elegante (menos amarillo) */
    --text-grey: #6a738d;
    /* Texto secundario */
    --white: #e6f1ff;
    /* Blanco con tinte azulado muy leve */
    --pure-white: #ffffff;
    /* Blanco puro */
    --light-bg: #f8f9fa;
    /* Fondo gris muy claro para alternar secciones */

    /* Tipografía */
    --font-heading: 'Playfair Display', serif;
    /* Para títulos (tradicional) */
    --font-body: 'Montserrat', sans-serif;
    /* Para cuerpo (moderna) */
}

html {
    scroll-behavior: smooth;
    /* Desplazamiento suave entre secciones */
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-grey);
    background-color: var(--light-bg);
}

/* --- Utilidades Globales --- */
.container {
    width: 85%;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    padding: 100px 0;
    background: var(--pure-white);
}

.bg-light {
    background-color: var(--light-bg);
}

.section-title {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 2.8rem;
    color: var(--primary-dark);
    margin-bottom: 4rem;
    position: relative;
    letter-spacing: 0.5px;
}

/* Línea dorada debajo de los títulos */
.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 2px;
    background: var(--gold);
    margin: 15px auto 0;
}

/* --- Navbar Avanzado (Menú de navegación) --- */
.navbar {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.4s ease;
    background: transparent;
}

/* Clase añadida por JS al hacer scroll */
.navbar.scrolled {
    background: var(--primary-dark);
    padding: 10px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 95%;
    max-width: none;
}

.logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    text-decoration: none;
    color: var(--pure-white);
    letter-spacing: 1px;
    font-weight: 700;
    text-transform: uppercase;
}

.gold-text {
    color: var(--gold);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    margin-left: 2.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
    position: relative;
}

.nav-links li a:hover {
    color: var(--gold);
}

.btn-nav {
    border: 1px solid var(--gold);
    padding: 10px 25px;
    color: var(--gold) !important;
    border-radius: 3px;
}

.btn-nav:hover {
    background: var(--gold);
    color: var(--primary-dark) !important;
}

.menu-toggle {
    display: none;
    color: var(--pure-white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Hero Section (Portada "Pro") --- */
.hero {
    height: 100vh;
    position: relative;
    /* Asegúrate de que la ruta a tu imagen de fondo sea correcta */
    background-image: url('img/hero-background.avif');
    background-size: cover;
    background-position: center bottom;
    background-attachment: fixed;
    /* Efecto Parallax */
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Degradado azul oscuro para mejorar legibilidad */
    background: linear-gradient(135deg,
            rgba(10, 25, 47, 0.95) 0%,
            rgba(10, 25, 47, 0.7) 50%,
            rgba(10, 25, 47, 0.4) 100%);
    display: flex;
    align-items: center;
}

.hero-content {
    color: var(--pure-white);
    max-width: 800px;
    margin-top: 60px;
}

.hero-subtitle {
    display: block;
    color: var(--gold);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.2rem;
    color: #ccd6f6;
    max-width: 600px;
    margin-bottom: 2.5rem;
}

/* Botones Hero */
.btn-primary {
    display: inline-block;
    background: var(--gold);
    color: var(--primary-dark);
    padding: 15px 35px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.3s, background 0.3s;
    margin-right: 15px;
    border: none;
    cursor: pointer;
    border-radius: 3px;
}

.btn-primary:hover {
    background: #d4af37;
    transform: translateY(-3px);
}

.btn-secondary {
    display: inline-block;
    border: 1px solid var(--white);
    color: var(--white);
    padding: 15px 35px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    transition: all 0.3s;
    border-radius: 3px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--gold);
    color: var(--gold);
}

/* --- Animaciones de Entrada --- */
.animate-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Sección "Estudio" --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 15px;
}

.img-placeholder {
    height: 400px;
    background-color: #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    color: #aaa;
    /* Imagen placeholder */
    background-image: url('img/estudio-background.jpg');
    background-size: cover;
    background-position: center;
    box-shadow: 20px 20px 0px var(--primary-dark);
    /* Sombra sólida de diseño */
}

.features-list {
    list-style: none;
    padding-left: 0;
    margin-top: 30px;
}

.features-list li {
    margin: 15px 0;
    display: flex;
    align-items: flex-start;
}

.features-list i {
    color: var(--gold);
    margin-right: 15px;
    font-size: 0.9rem;
    border: 1px solid var(--gold);
    padding: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* =========================================
   --- SECCIÓN EQUIPO (CORREGIDA) ---
   ========================================= */

#equipo {
    background-color: var(--light-bg);
}

/* 1. ESTILOS PARA LA TARJETA DEL FUNDADOR (Horizontal) */
.founder-wrapper {
    max-width: 900px;
    margin: 0 auto 50px auto;
}

.founder-feature {
    display: flex;
    align-items: center;
    gap: 40px;
    text-align: left;
    background: var(--pure-white);
    padding: 30px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    transition: all 0.3s ease;
    border-bottom: 4px solid var(--gold);
    /* Detalle premium */
}

.founder-feature:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.founder-feature:hover h3 {
    color: var(--gold);
    transition: color 0.3s ease;
}

/* --- FIX CRÍTICO PARA LA IMAGEN GIGANTE --- */
.founder-photo-large {
    flex: 1;
    /* Restricciones estrictas de tamaño para el contenedor */
    max-width: 400px;
    height: 450px;
    flex-shrink: 0;
    /* Evita que se aplaste */
}

.founder-photo-large img {
    width: 100%;
    height: 100%;
    /* 'cover' es esencial: llena el contenedor recortando si es necesario, sin deformar */
    object-fit: cover;
    object-position: 80% 10%;
    /* Enfoca la parte superior (rostro) */
    border-radius: 2px;
}

/* ------------------------------------------- */

.founder-info {
    flex: 1.5;
}

.founder-info h3 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: var(--primary-dark);
    transition: color 0.3s ease;
}

.founder-info .role-highlight {
    color: var(--gold);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 2px;
    margin-bottom: 20px;
    display: block;
}

.founder-info p {
    font-size: 1.05rem;
    line-height: 1.8;
}

/* 2. ESTILOS PARA LA CUADRÍCULA DE SOCIOS (Verticales) */
#equipo .team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

#equipo .team-member {
    background: var(--pure-white);
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    text-align: center;
    border-radius: 4px;
}

#equipo .team-member:hover {
    transform: translateY(-5px);
}

#equipo .member-photo {
    width: 100%;
    height: 400px;
    /* Altura fija para uniformidad */
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 2px;
}

#equipo .member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Asegura que llenen el cuadro vertical */
    transition: transform 0.5s ease;
}

#equipo .team-member:hover .member-photo img {
    transform: scale(1.03);
    /* Efecto zoom suave al hover */
}

#equipo h3 {
    font-family: var(--font-heading);
    margin-bottom: 5px;
    color: var(--primary-dark);
}

#equipo .role {
    color: var(--gold);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

/* Estilos compartidos para iconos sociales en equipo */
.social-links a {
    color: var(--primary-dark);
    font-size: 1.4rem;
    margin: 0 10px;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--gold);
}


/* --- Sección "Áreas de Práctica" (Tarjetas) --- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.card {
    background: var(--pure-white);
    padding: 50px 30px;
    border: 1px solid #eee;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    text-align: center;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

/* Línea dorada superior al hacer hover */
.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.card:hover::before {
    transform: scaleX(1);
}

.icon-box {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
}

.card h3 {
    margin-bottom: 15px;
    font-family: var(--font-heading);
    color: var(--primary-dark);
}

/* --- Sección "Contacto" --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
}

.contact-info h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
}

.contact-info p {
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.info-item i {
    font-size: 1.4rem;
    color: var(--gold);
    margin-right: 20px;
    margin-top: 5px;
}

.info-item h4 {
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.info-item p {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 0;
}

/* Formulario con Inputs Modernos (Floating Labels) */
.form-group {
    position: relative;
    margin-bottom: 30px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 0;
    border: none;
    border-bottom: 2px solid #ddd;
    background: transparent;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
    font-family: var(--font-body);
    color: var(--primary-dark);
}

.form-group label {
    position: absolute;
    top: 10px;
    left: 0;
    color: #999;
    transition: 0.3s;
    pointer-events: none;
}

.form-group input:focus,
.form-group input:valid,
.form-group textarea:focus,
.form-group textarea:valid {
    border-bottom-color: var(--primary-dark);
}

/* Efecto label flotante al hacer foco o tener contenido */
.form-group input:focus~label,
.form-group input:valid~label,
.form-group textarea:focus~label,
.form-group textarea:valid~label {
    top: -20px;
    font-size: 0.8rem;
    color: var(--primary-dark);
    font-weight: 600;
}

.btn-submit {
    background: var(--primary-dark);
    color: var(--pure-white);
    border: none;
    padding: 15px 40px;
    cursor: pointer;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.3s, transform 0.3s;
    border-radius: 3px;
}

.btn-submit:hover {
    background: var(--gold);
    color: var(--primary-dark);
    transform: translateY(-3px);
}

/* --- Footer --- */
footer {
    background: var(--primary-dark);
    color: #8892b0;
    padding: 40px 0;
    text-align: center;
    font-size: 0.9rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-content p {
    margin-bottom: 0;
}

.socials {
    margin-top: 10px;
}

.socials a {
    color: #8892b0;
    margin-left: 18px;
    font-size: 1.3rem;
    transition: color 0.3s;
}

.socials a:hover {
    color: var(--gold);
}


/* =========================================
   --- MEDIA QUERIES (RESPONSIVE) ---
   ========================================= */

/* Tablets y Laptops pequeñas */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 3rem;
    }

    .about-grid,
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .img-placeholder {
        margin-top: 40px;
        box-shadow: 10px 10px 0px var(--primary-dark);
    }

    .contact-info {
        order: 2;
    }

    .contact-form {
        order: 1;
    }

    .footer-content {
        flex-direction: column;
    }

    .socials {
        margin-top: 20px;
    }
}

/* Móviles (Tablets pequeñas y Teléfonos) */
@media (max-width: 768px) {

    /* --- RESPONSIVE FUNDADOR --- */
    .founder-feature {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 25px;
    }

    .founder-photo-large {
        max-width: 100%;
        /* Ocupa todo el ancho en móvil */
        width: 100%;
        height: 400px;
        /* Altura ajustada para móvil */
    }

    .founder-info .social-links {
        justify-content: center !important;
    }

    /* -------------------------- */

    /* Navbar Móvil */
    .nav-links {
        position: fixed;
        right: 0px;
        height: 100vh;
        top: 0;
        background: var(--primary-dark);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 70%;
        transform: translateX(100%);
        transition: transform 0.3s ease-in;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    }

    .nav-links.active {
        transform: translateX(0%);
    }

    .nav-links li {
        margin: 20px 0;
    }

    .menu-toggle {
        display: block;
        z-index: 1001;
    }

    /* Tipografía y Hero Móvil */
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero {
        background-attachment: scroll;
        background-position: center center;
    }

    .section-title {
        font-size: 2rem;
    }

    /* Grids a 1 columna */
    .team-grid,
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .btn-primary,
    .btn-secondary {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
}

/* Móviles Pequeños */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 0.8rem;
    }

    .hero-content p {
        font-size: 0.9rem;
    }

    .btn-primary,
    .btn-secondary {
        display: block;
        width: 100%;
        margin-right: 0;
        margin-bottom: 15px;
    }

    .about-text h3 {
        font-size: 1.5rem;
    }

    .img-placeholder {
        height: 250px;
        box-shadow: none;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 3rem;
    }

    .contact-info h2 {
        font-size: 2rem;
    }

    .contact-info p {
        font-size: 0.95rem;
    }

    .info-item {
        margin-bottom: 20px;
    }

    .footer-content p {
        font-size: 0.8rem;
    }
}