/* public/css/nuestro_equipo.css */

.nuestro-equipo-page {
    background-color: var(--background-color, #F7F5F0);
    padding-top: 120px;
}

.equipo-container {
    max-width: 850px;
    margin: 0 auto 120px auto; /* 120px space before footer */
    padding: 0 24px;
}

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

.equipo-title {
    font-family: var(--font-family-primary);
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary-color, #2D3748) 0%, var(--accent-color, #D64560) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    font-weight: 800;
    letter-spacing: -1px;
}

.equipo-subtitle {
    font-size: 1.25rem;
    color: var(--text-color, #4A5568);
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

.equipo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.team-member-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px 24px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 1 340px;
    position: relative;
}

/* Stretched-link: convierte toda la card en clickeable cuando tiene story_url.
   Los botones (LinkedIn / Conocer historia) tienen z-index superior y siguen
   siendo independientemente clickeables. */
.team-member-card .card-stretched-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    text-indent: -9999px;
    overflow: hidden;
}

.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;
}

.team-member-card--has-story {
    cursor: pointer;
}

.team-member-card--has-story:hover {
    border: 1px solid rgba(189, 61, 117, 0.18);
}

.team-member-card .linkedin-button,
.team-member-card .story-button {
    position: relative;
    z-index: 2;
}

/* Botón "Conocer su historia" — color de marca Rasti */
.story-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--primary, #BD3D75);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(189, 61, 117, 0.22);
}

.story-button:hover {
    background-color: var(--primary-hover, #A83366);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(189, 61, 117, 0.32);
}

.story-button svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.team-member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.member-image-container {
    margin-bottom: 16px;
    position: relative;
    width: 220px;
    height: 220px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.member-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%; /* Mueve un poco el foco hacia arriba, útil para retratos */
    border-radius: 50%;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
    border: 4px solid #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.equipo-grid .team-member-card:last-child .member-image-container {
    overflow: hidden;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.equipo-grid .team-member-card:last-child .member-image {
    width: 144%;
    height: 144%;
    max-width: none;
    margin-left: -22%;
    margin-top: -25%;
    border: 0;
    box-shadow: none;
    object-position: center 32%;
}

.team-member-card:hover .member-image {
    filter: grayscale(0%);
}

.member-name {
    font-family: var(--font-family-primary);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color, #2D3748);
    margin: 0 0 8px 0;
}

.member-role {
    font-size: 1rem;
    color: var(--accent-color, #D64560);
    font-weight: 600;
    margin: 0 0 16px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.member-description {
    font-size: 0.95rem;
    color: var(--text-color, #4A5568);
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
}

.linkedin-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #0077b5; /* Official LinkedIn Color */
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.linkedin-button:hover {
    background-color: #005582;
    color: white;
}

.linkedin-button svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Dynamic Hover Animation for Desktop */
@media (min-width: 769px) {
    .member-description {
        opacity: 0;
        max-height: 0;
        margin-bottom: 0;
        overflow: hidden;
        transform: translateY(20px);
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .team-member-card:hover .member-description {
        opacity: 1;
        max-height: 250px;
        margin-bottom: 24px;
        transform: translateY(0);
    }

    .team-member-card:hover .member-image-container {
        transform: translateY(-5px);
    }
}

/* Responsiveness */
@media (max-width: 768px) {
    .nuestro-equipo-page {
        padding-top: 100px;
    }

    .equipo-container {
        margin-bottom: 80px;
    }

    .equipo-title {
        font-size: 2rem;
    }
    
    .equipo-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}
