/* =========================================
   PÁGINA ATTORNEYS (ESTILOS NUEVOS)
   ========================================= */

/* 1. HERO BANNER ESPECÍFICO */
.hero-attorneys {
    background: linear-gradient(rgba(17, 24, 39, 0.85), rgba(17, 24, 39, 0.85)),
        url('https://images.unsplash.com/photo-1507679799987-c73779587ccf?ixlib=rb-4.0.3&auto=format&fit=crop&w=2400&q=80');
    background-size: cover;
    background-position: center;
    height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    margin-top: 60px;
    /* Ajusta según la altura de tu navbar fijo */
}

/* 2. TARJETA DEL FUNDADOR (BOB) */
.founder-card {
    display: flex;
    flex-wrap: wrap;
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 80px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.founder-img-col {
    flex: 1;
    min-width: 300px;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.founder-img-wrapper {
    position: relative;
    width: 390px;
    height: 428px;
    max-width: 100%;
}

.founder-frame {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent, #c5a059);
    z-index: 1;
}

.founder-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 2;
    filter: contrast(1.1);
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.5);
}

.founder-info-col {
    flex: 2;
    min-width: 300px;
    padding: 50px;
}

.founder-name {
    font-size: 2.5rem;
    color: #111;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: -1px;
}

.founder-role {
    color: var(--accent, #c5a059);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.founder-quote {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 15px;
    font-weight: 700;
    font-style: italic;
    border-left: 4px solid var(--accent, #c5a059);
    padding-left: 15px;
}

.founder-bio {
    color: #475569;
    line-height: 1.8;
    margin-bottom: 30px;
    font-size: 1rem;
}

.founder-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    list-style: none;
    margin-bottom: 30px;
    padding: 0;
}

.founder-stats li {
    display: flex;
    align-items: center;
    color: #334155;
    font-size: 0.95rem;
    font-weight: 600;
}

.theme-check-icon-svg {
    margin-right: 10px;
    flex-shrink: 0;
}

/* =========================================
   TEAM FILTER BAR
   ========================================= */
.team-filter-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    margin-top: 30px;
    padding: 0 5%;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 100%;
}

.filter-row-label {
    font-size: 0.7rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    min-width: 85px;
    text-align: right;
    flex-shrink: 0;
}

.filter-group {
    display: flex;
    background: #1a1d28;
    border-radius: 12px;
    padding: 4px;
    gap: 3px;
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 100%;
}

.filter-group::-webkit-scrollbar {
    display: none;
}

.filter-group .filter-slider {
    position: absolute;
    height: calc(100% - 8px);
    background: var(--accent, #C5A059);
    border-radius: 8px;
    top: 4px;
    left: 4px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.filter-btn {
    position: relative;
    z-index: 1;
    padding: 9px 16px;
    border: none;
    background: transparent;
    color: #888;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.25s;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-btn.active {
    color: #0f1118;
    font-weight: 600;
}

.filter-btn:not(.active):hover {
    color: #ccc;
}

.filter-separator {
    display: none;
}

/* ── Mobile Dropdowns (hidden on desktop) ── */
.filter-mobile {
    display: none;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.filter-mobile-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-mobile-label {
    font-size: 0.7rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    min-width: 85px;
    text-align: right;
    flex-shrink: 0;
}

.filter-select {
    flex: 1;
    padding: 12px 40px 12px 16px;
    background: #1a1d28;
    color: #fff;
    border: 1px solid #2a2d38;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23C5A059' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    transition: border-color 0.25s;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent, #C5A059);
}

.filter-select option {
    background: #1a1d28;
    color: #fff;
}

.team-results-count {
    text-align: center;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: #555;
}

.team-results-count span {
    color: var(--accent, #C5A059);
    font-weight: 600;
}

/* ── Bounce Animation (filter transitions) ── */
.attorney-card.filter-hiding {
    animation: teamBounceOut 0.4s ease forwards;
}

.attorney-card.filter-showing {
    animation: teamBounceIn 0.66s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.attorney-card.filter-hidden {
    display: none;
}

@keyframes teamBounceOut {
    0%   { opacity: 1; transform: scale(1); }
    50%  { transform: scale(1.05); }
    100% { opacity: 0; transform: scale(0.6); }
}

@keyframes teamBounceIn {
    0%   { opacity: 0; transform: scale(0.5); }
    70%  { transform: scale(1.06); }
    100% { opacity: 1; transform: scale(1); }
}

@media (max-width: 1200px) {
    .filter-desktop {
        display: none;
    }

    .filter-mobile {
        display: flex;
    }
}

@media (max-width: 480px) {
    .filter-mobile-row {
        flex-direction: column;
        gap: 6px;
    }

    .filter-mobile-label {
        text-align: left;
        min-width: auto;
    }
}

/* 3. GRID DE EQUIPO */
.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-top: 50px;
}

@media (max-width: 1024px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 4. SECCIÓN REFERIDOS */
.referral-section {
    background: #111111;
    /* Slate 900 */
    color: #fff;
    padding: 100px 5%;
    border-top: 5px solid var(--accent, #c5a059);
}

.referral-container {
    max-width: 1100px;
    margin: 0 auto;
}

.referral-header {
    text-align: center;
    margin-bottom: 60px;
}

.referral-eyebrow {
    color: var(--accent, #c5a059);
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.referral-title {
    font-size: 2.5rem;
    color: #fff;
    margin: 0;
    font-weight: 800;
}

.referral-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.referral-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 35px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.referral-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent, #c5a059);
    background: rgba(255, 255, 255, 0.06);
}

.referral-item h4 {
    color: var(--accent, #c5a059);
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.referral-item p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #94a3b8;
}

.referral-cta {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 50px;
}

.referral-quote {
    margin-bottom: 30px;
    font-style: italic;
    color: #cbd5e1;
    font-size: 1.1rem;
    font-weight: 300;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .founder-card {
        flex-direction: column;
    }

    .founder-img-wrapper {
        width: 260px;
        height: 285px;
    }

    .founder-info-col {
        padding: 30px;
    }

    .founder-stats {
        grid-template-columns: 1fr;
        gap: 15px;
        /* Alineación central pero limpia */
        max-width: 320px;
        margin: 0 auto 30px;
        text-align: left;
    }
}

/* 5. CLASES UTILITARIAS (Reemplazo de estilos inline) */
.team-section {
    background: #fff;
    padding: 80px 5%;
}

.team-header {
    text-align: center;
    margin-bottom: 60px;
}


.office-title {
    text-align: center;
    font-size: 2.2rem;
    color: var(--accent, #c5a059);
    margin-top: 80px;
    margin-bottom: 10px;
    font-weight: 800;
    position: relative;
    padding-bottom: 15px;
    letter-spacing: -0.5px;
}

.office-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent, #c5a059);
}

.department-title {
    text-align: center;
    font-size: 1.2rem;
    color: #000000;
    margin-top: 80px;
    /* Space above when starting a new section alone */
    margin-bottom: 40px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
}

/* When the department title comes directly after the office title, tighten the spacing back */
.office-title+.department-title {
    margin-top: 5px;
}

.referral-description {
    color: #94a3b8;
    max-width: 800px;
    margin: 20px auto;
    font-size: 1.1rem;
}

/* .btn-outline {
    background: transparent;
    border: 1px solid var(--accent, #c5a059);
    color: var(--accent, #c5a059);
    margin-top: 10px;
}

.btn-outline:hover {
    background: var(--accent, #c5a059);
    color: #fff;
} */

/* 6. ATTORNEY CARDS - Senior Associates */
.attorney-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    width: 280px;
    /* Reduced width to match standard portrait image size */
    height: 420px;
    /* Increased to allow 10% more room for the bottom black box */
    display: flex;
    flex-direction: column;
}

.attorney-card img {
    width: 100%;
    height: 286px;
    /* Increased to give heads more room without scaling crop issue */
    object-fit: cover;
    /* changed from contain to cover so it fills the width */
    object-position: bottom center;
    background-color: #f7f7f7;
    /* Background color for empty spaces if aspect ratios don't match */
    display: block;
    transition: transform 0.4s ease;
}

.attorney-card:hover img {
    transform: scale(1.04);
}

.attorney-info {
    flex-grow: 1;
    background: #000000;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* Pushes role to top and name to bottom */
    box-sizing: border-box;
}

.attorney-role {
    display: block;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
}

.attorney-role-secondary {
    display: block;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 3px;
    margin-bottom: auto; /* Esto empuja el título hacia abajo, eliminando el espacio entre roles */
}

.attorney-name {
    color: #C5A059;
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0;
    margin-top: auto; /* Absorbe el espacio libre para mantenerse abajo */
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.attorney-lastname {
    color: #C5A059;
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 24px;
    }

    .attorney-name, .attorney-lastname {
        font-size: 1.7rem;
    }

    .attorney-info {
        height: 210px;
        padding: 18px 20px 22px;
    }
}

.attorney-card.clickable {
    cursor: pointer;
}

/* =========================================
   MEMBER DETAIL OVERLAY
   ========================================= */
.member-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.member-detail-overlay.active {
    opacity: 1;
    visibility: visible;
}

.member-detail-container {
    display: flex;
    align-items: center;
    gap: 60px;
    max-width: 1000px;
    width: 90%;
    position: relative;
    transform: translateY(30px);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.member-detail-overlay.active .member-detail-container {
    transform: translateY(0);
}

.member-detail-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s, transform 0.3s;
    line-height: 1;
}

.member-detail-close:hover {
    color: var(--accent, #c5a059);
    transform: rotate(90deg);
}

.member-detail-photo {
    flex-shrink: 0;
    width: 350px;
    height: 450px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: translateX(-40px);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.15s,
                opacity 0.6s ease 0.15s;
}

.member-detail-overlay.active .member-detail-photo {
    transform: translateX(0);
    opacity: 1;
}

.member-detail-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.member-detail-info {
    flex: 1;
    color: #fff;
    transform: translateX(40px);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s,
                opacity 0.6s ease 0.3s;
}

.member-detail-overlay.active .member-detail-info {
    transform: translateX(0);
    opacity: 1;
}

.member-detail-role {
    display: block;
    color: var(--accent, #c5a059);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.member-detail-name {
    font-size: 2.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -1px;
    margin: 0 0 20px;
    color: #fff;
}

.member-detail-divider {
    width: 60px;
    height: 3px;
    background: var(--accent, #c5a059);
    margin-bottom: 25px;
}

.member-detail-bio {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #94a3b8;
    margin: 0;
}

/* RESPONSIVE OVERLAY */
@media (max-width: 768px) {
    .member-detail-container {
        flex-direction: column;
        gap: 30px;
        padding: 20px 0;
        overflow-y: auto;
        max-height: 90vh;
    }

    .member-detail-photo {
        width: 250px;
        height: 320px;
    }

    .member-detail-name {
        font-size: 2rem;
    }

    .member-detail-close {
        top: -40px;
        right: 5%;
    }
}