/* Override grid layout from main.css for about page */
body {
    display: flex !important;
    flex-direction: column;
    grid-template-rows: none !important;
    font-family: 'Montserrat', sans-serif;
}

main {
    background-image: url('../assets/images/imgs_web/backgrounds/background_team.png');
    background-size: cover;
    background-position: center center;
    padding: 0;
    flex: 1;
    display: flex !important;
    flex-direction: column;
    grid-template-rows: none !important;
}

.about-layout {
    width: 100%;
    margin: 0;
    padding: 80px 20px 40px 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.hero-content {
    max-width: 1200px;
    /*margin: 0 auto;*/
    color: var(--text-color);
    text-align: left;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

@media (max-width: 768px) {
    .about-layout {
        gap: 20px;
        padding: 60px 20px 40px 20px;
    }
}

.hero-content h1 {
    font-family: 'Raleway', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: #0388a6;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-content p {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 400;
    color: #01303a;
    line-height: 1.6;
    margin: 0;
    max-width: 50%;
}

.team-container {
    background-color: transparent;
    width: 100%;
    max-width: none;
    padding: 0 20px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: auto auto;
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Position the large cards on top row - each spanning 3 columns for 2-column effect */
.team-card.large:nth-child(1) {
    grid-column: 1 / span 3;
    grid-row: 1;
}

.team-card.large:nth-child(2) {
    grid-column: 4 / span 3;
    grid-row: 1;
}

/* Position the small cards on bottom row - each spanning 2 columns for 3-column effect */
.team-card.small:nth-child(3) {
    grid-column: 1 / span 2;
    grid-row: 2;
}

.team-card.small:nth-child(4) {
    grid-column: 3 / span 2;
    grid-row: 2;
}

.team-card.small:nth-child(5) {
    grid-column: 5 / span 2;
    grid-row: 2;
}

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

    /* Large cards span 2 columns each for 2-column effect */
    .team-card.large:nth-child(1) {
        grid-column: 1 / span 2;
    }

    .team-card.large:nth-child(2) {
        grid-column: 3 / span 2;
    }

    /* Small cards use single columns with spacing */
    .team-card.small:nth-child(3) {
        grid-column: 1;
    }

    .team-card.small:nth-child(4) {
        grid-column: 2 / span 2;
    }

    .team-card.small:nth-child(5) {
        grid-column: 4;
    }
}

@media (max-width: 768px) {
    .hero-content p {
        font-family: 'Montserrat', sans-serif;
        font-size: clamp(1rem, 2.5vw, 1.25rem);
        font-weight: 400;
        color: #01303a;
        line-height: 1.6;
        margin: 0;
        max-width: 100%;
    }


    .team-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(5, auto);
    }

    .team-card.large:nth-child(1),
    .team-card.large:nth-child(2),
    .team-card.small:nth-child(3),
    .team-card.small:nth-child(4),
    .team-card.small:nth-child(5) {
        grid-column: 1;
        grid-row: auto;
    }
}

.team-card {
    background-color: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.team-card.large {
    grid-column: span 2;
    display: flex;
    flex-direction: row;
    text-align: left;
    align-items: flex-start;
}

.team-card img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    margin-bottom: 15px;
    object-fit: cover;
    object-position: center top;
}

/* Specific positioning for Isabel Negro's image */
.team-card img[alt="Isabel Negro"] {
    object-position: center 20%;
}

/* Specific positioning for Daniel Cocera's image */
.team-card img[alt="Daniel Cocera"] {
    object-position: center 25%;
}

.team-card.large img {
    margin-right: 20px;
    margin-bottom: 0;
}

.card-content {
    flex-grow: 1;
}

.team-card h3 {
    font-family: 'Raleway', sans-serif;
    font-size: 1.5rem;
    margin: 0;
}

.team-card h4 {
    font-family: 'Raleway', sans-serif;
    font-size: 1.2rem;
    margin: 0;
}

.team-card .role {
    color: #555;
    margin: 5px 0 10px;
}

body.dark-mode .main-card .linkedin {
    color: #4db6cd;
}

.team-card .description {
    font-size: 0.9rem;
    line-height: 1.5;
}

.team-card.small {
    flex-direction: row;
    align-items: center;
    text-align: left;
}

.team-card.small img {
    margin-bottom: 0;
    margin-right: 15px;
}

.team-card.small .card-content {
    text-align: left;
}

a.team-card,
a.team-card:visited {
    text-decoration: none;
    color: inherit;
}

@media (max-width: 768px) {
    .team-card.large {
        grid-column: span 1;
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .team-card.large img {
        margin-right: 0;
        margin-bottom: 15px;
    }
}