/* Team Page Specific Styles - Elegant & Professional */
.team-hero {
    background: linear-gradient(rgba(20, 33, 61, 0.9), rgba(20, 33, 61, 0.9)), url('static/img/fondo_estudio1.jpg');
    background-size: cover;
    background-position: center;
    height: 100vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    color: white;
    text-align: center;
    position: relative;
}

.team-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(20, 33, 61, 0.1);
    z-index: 1;
}

.team-hero .container {
    position: relative;
    z-index: 2;
}

.team-hero h1 {
    font-size: 3.2rem;
    margin-bottom: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: #fff;
    font-family: 'Playfair Display', serif;
}

.team-hero h1::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background-color: var(--secondary-color);
}

.team-hero p {
    font-size: 1.1rem;
    max-width: 650px;
    margin: 2rem auto 0;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    font-weight: 300;
}

.team-member-detail {
    padding: 6rem 0;
    background: #fafafa;
    position: relative;
}

.team-member-detail:nth-child(even) {
    background: #ffffff;
}

.member-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
}

/* Reverse layout for alternating design */
.team-member-detail.reverse .member-container {
    grid-template-columns: 2fr 1fr;
}

.member-photo {
    text-align: center;
    position: sticky;
    top: 2rem;
}

.member-photo img {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e8e8e8;
    transition: border-color 0.3s ease;
}

.member-photo img:hover {
    border-color: var(--secondary-color);
}

.member-info {
    padding-top: 1rem;
}

.member-info h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    line-height: 1.2;
}

.member-title {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.member-description {
    font-size: 1rem;
    line-height: 1.7;
    color: #4a4a4a;
    margin-bottom: 2rem;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    text-align: justify;
}

.know-more-btn {
    --offset: 8px;
    --border-size: 1px;
    
    padding: 1em 2em;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2rem;
    font-family: 'Raleway', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.know-more-btn .btn-icon {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.know-more-btn.active .btn-icon {
    transform: rotate(180deg);
}

/* Estado activo para botones fancy cuando están expandidos */
.know-more-btn.active {
    background: rgba(252, 163, 17, 0.1);
}

.know-more-btn.active .fancy-button__horizontal {
    transform: scaleX(0);
}

.know-more-btn.active .fancy-button__vertical {
    transform: scaleY(0);
}

.member-credentials {
    background: #ffffff;
    padding: 2.5rem;
    border: 1px solid #e8e8e8;
    border-radius: 2px;
    position: relative;
    margin: 0 10%;
}

.team-member-detail:nth-child(even) .member-credentials {
    background: #fafafa;
}

.member-credentials::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--secondary-color);
}

.member-credentials h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Raleway', sans-serif;
    text-align: center;
}

.member-credentials ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.member-credentials li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    padding-left: 1.5rem;
}

.member-credentials li:last-child {
    border-bottom: none;
}

.member-credentials li:before {
    content: "•";
    color: var(--secondary-color);
    position: absolute;
    left: 0;
    top: 0.75rem;
    font-size: 1rem;
    line-height: 1;
}

/* Multiple credentials sections spacing */
.member-credentials h3:not(:first-child) {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #f0f0f0;
}

.back-to-home {
    text-align: center;
    padding: 3rem 0;
    background: var(--primary-color);
}

.back-to-home a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    padding: 12px 30px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 2px;
    transition: all 0.3s ease;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.back-to-home a:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.6);
}

@media (max-width: 1024px) {
    .member-container {
        gap: 3rem;
        padding: 0 30px;
    }
    
    .member-photo {
        position: static;
    }
}

@media (max-width: 768px) {
    .team-hero {
        height: 100vh;
        min-height: 400px;
    }
    
    .team-hero h1 {
        font-size: 2.5rem;
    }
    
    .team-hero p {
        font-size: 1rem;
        margin: 1.5rem auto 0;
    }
    
    .team-member-detail {
        padding: 4rem 0;
    }
    
    .member-container,
    .team-member-detail.reverse .member-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
        padding: 0 20px;
    }

    /* Asegurar que la foto siempre aparezca primero en móvil */
    .member-container {
        display: flex;
        flex-direction: column;
    }
    
    .team-member-detail.reverse .member-container {
        display: flex;
        flex-direction: column;
    }
    
    /* Orden específico para móvil: foto primero, luego info */
    .member-photo {
        order: 1;
        text-align: center;
        align-self: center;
    }
    
    .member-info {
        order: 2;
        padding-top: 0;
    }

    .member-photo img {
        width: 220px;
        height: 220px;
    }

    .member-info h2 {
        font-size: 1.8rem;
    }
    
    .member-description {
        text-align: left;
        margin-bottom: 2rem;
    }

    .member-credentials {
        padding: 2rem;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .team-hero h1 {
        font-size: 2rem;
    }
    
    .member-photo img {
        width: 180px;
        height: 180px;
    }
    
    .member-credentials {
        padding: 1.5rem;
    }
    
    .member-container {
        padding: 0 15px;
    }
}