/* ============================================= */
/* ====== ESTILOS PARA LA PÁGINA DE EQUIPO ======= */
/* ============================================= */

/* --- Clase para Ocultar Texto Accesible --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Estilos Globales y de Header (Escritorio) --- */
body { font-family: 'Lexend', sans-serif; margin: 0; background-color: #f9f9f9; color: #333; }
.fixed-logo { position: fixed; top: 30px; left: 40px; z-index: 1001; }
.fixed-logo img { height: 40px; width: auto; }
.main-header { position: fixed; top: 20px; right: 20px; left: 20px; z-index: 1000; display: flex; justify-content: flex-end; align-items: center; padding: 10px 20px; transition: top 0.4s ease-in-out; }
.main-header.nav-hidden { top: -100px; }
.nav-wrapper { background-color: rgba(255, 255, 255, 0.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 10px; padding: 10px 20px; display: flex; align-items: center; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.main-nav { display: flex; } /* Menú en línea para escritorio */
.main-nav a { color: #333; text-decoration: none; margin: 0 20px; font-weight: 500; position: relative; padding: 5px 0; }
.main-nav a.active { font-weight: 700; }
.main-nav a.active::after, .main-nav a:hover::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 100%; height: 2px; background-color: #c5a47e; }
.cta-button { background-color: #1a2a4a; color: #fff; padding: 12px 25px; border-radius: 5px; text-decoration: none; font-weight: 600; margin-left: 20px; transition: background-color 0.3s ease; }
.cta-button:hover { background-color: #3c4a6b; }
.mobile-nav-toggle { display: none; } /* Oculto en escritorio */

/* --- Hero de Página Extendido --- */
.page-hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
}
.hero-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    animation: kenburns 20s ease-out infinite;
    z-index: -2;
}
.hero-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(26, 42, 74, 0.4), rgba(0,0,0,0.6));
    z-index: -1;
}
.hero-content { position: relative; z-index: 3; }
.hero-content h1 { font-size: 4rem; text-shadow: 2px 2px 8px rgba(0,0,0,0.5); }
@keyframes kenburns { 0% { transform: scale(1.05); } 100% { transform: scale(1); } }

/* --- Cuadrícula del Equipo con fondo transparente --- */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 40px;
    position: relative;
    z-index: 1;
}
.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }

/* --- Tarjeta de Abogado --- */
.team-card { display: block; text-decoration: none; background-color: #fff; border-radius: 10px; box-shadow: 0 5px 25px rgba(0,0,0,0.08); overflow: hidden; transition: transform 0.4s ease, box-shadow 0.4s ease; }
.team-card:hover { transform: translateY(-12px); box-shadow: 0 20px 40px rgba(0,0,0,0.12); }
.team-card-image img { width: 100%; height: auto; display: block; aspect-ratio: 1 / 1.1; object-fit: cover; transition: transform 0.4s ease; }
.team-card:hover .team-card-image img { transform: scale(1.05); }
.team-card-content { padding: 30px; text-align: center; }
.team-card-content h3 { margin: 0 0 5px 0; font-size: 1.6rem; color: #1a2a4a; }
.team-card-title { margin: 0 0 20px 0; font-size: 1rem; color: #c5a47e; font-weight: 500; }
.team-card-cta { font-weight: 600; color: #1a2a4a; text-decoration: none; transition: color 0.3s ease; }
.team-card:hover .team-card-cta { color: #c5a47e; }

/* --- Estilos Pre-Footer y Footer (Añadidos para consistencia) --- */
.pre-footer { background-color: #f4f4f4; padding: 80px 40px; text-align: center; }
.pre-footer-content h2 { font-size: 2.5rem; color: #1a2a4a; margin-bottom: 15px; }
.pre-footer-content p { font-size: 1.125rem; color: #555; max-width: 600px; margin: 0 auto 30px auto; line-height: 1.6; }
.cta-button-footer { background-color: #c5a47e; color: #fff; padding: 15px 40px; border-radius: 5px; text-decoration: none; font-weight: 600; font-size: 1rem; transition: background-color 0.3s ease, transform 0.3s ease; display: inline-block; }
.cta-button-footer:hover { background-color: #b39169; transform: translateY(-3px); text-decoration: none; }
.main-footer-container { background-color: #1a2a4a; color: #e0e0e0; padding: 60px 40px 20px 40px; }
.footer-content { display: flex; flex-wrap: wrap; justify-content: space-between; max-width: 1200px; margin: 0 auto; gap: 40px; }
.footer-column { flex: 1; min-width: 220px; }
.footer-brand { max-width: 180px; height: auto; display: block; filter: brightness(0) invert(1); }
.footer-tagline { font-style: italic; color: #c5a47e; }
.footer-column h4 { font-size: 1.2rem; color: #fff; margin-bottom: 20px; font-weight: 600; position: relative; padding-bottom: 10px; }
.footer-column h4::after { content: ''; position: absolute; bottom: 0; left: 0; width: 40px; height: 2px; background-color: #c5a47e; }
.footer-column a, .footer-column p { color: #e0e0e0; text-decoration: none; display: block; margin-bottom: 10px; line-height: 1.7; }
.footer-column a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { text-align: center; border-top: 1px solid #3c4a6b; padding-top: 20px; margin-top: 40px; font-size: 0.9rem; color: #a0a0a0; }
.made-by { margin-top: 12px; }
.made-by img { max-width: 180px; height: auto; filter: brightness(0) invert(1); }

/* --- Clases de Animación --- */
.hidden-item { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.hidden-item.is-visible { opacity: 1; transform: translateY(0); }
.hidden-hero-text { opacity: 0; transform: translateY(20px); transition: opacity 1s ease-out 0.5s, transform 1s ease-out 0.5s; }
.hidden-hero-text.is-visible { opacity: 1; transform: translateY(0); }


/* ======================================================= */
/* === RESPONSIVE UNIFICADO (Móvil y Tablet) === */
/* ======================================================= */

@media (max-width: 768px) {

    /* --- Cuadrícula del Equipo (Apilado) --- */
    .team-grid { 
        grid-template-columns: 1fr; 
    }

    /* --- Hacemos visible el botón de la hamburguesa --- */
    .mobile-nav-toggle {
        display: block;
        position: relative;
        z-index: 1001;
        width: 28px;
        height: 20px;
        background: transparent;
        border: 0;
        padding: 0;
        cursor: pointer;
    }
    
    .mobile-nav-toggle::before,
    .mobile-nav-toggle::after {
        content: '';
        position: absolute;
        left: 0;
        width: 100%;
        height: 3px;
        background: #fff;
        border-radius: 2px;
        transition: transform 0.3s ease-out, top 0.3s ease-out, bottom 0.3s ease-out;
    }
    .mobile-nav-toggle::before { top: 0; }
    .mobile-nav-toggle::after { bottom: 0; }

    /* --- Animación a 'X' --- */
    .nav-open .mobile-nav-toggle::before { top: 8.5px; transform: rotate(45deg); }
    .nav-open .mobile-nav-toggle::after { bottom: 8.5px; transform: rotate(-45deg); }
    body.nav-open { overflow: hidden; }

    /* --- Adaptamos el header y su contenedor --- */
    .main-header { padding: 15px 20px; }
    .nav-wrapper { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; border: none; padding: 0; }

    /* --- Panel lateral del menú --- */
    .main-nav {
        display: none;
        position: fixed;
        z-index: 1000;
        inset: 0 0 0 30%;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        padding: min(20vh, 10rem) 2em;
        background: rgba(26, 42, 74, 0.95);
        backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
        transform: translateX(100%);
        transition: transform 0.4s ease-out;
    }

    .nav-open .main-nav {
        display: flex;
        transform: translateX(0%);
    }

    /* --- Links dentro del panel --- */
    .main-nav a { color: white; margin: 0; font-size: 1.1rem; }
    .main-nav a.active::after, .main-nav a:hover::after { display: none; }
    .main-nav .cta-button { border: 2px solid #c5a47e; background-color: transparent; padding: 12px 30px; border-radius: 50px; }
}