/* =================================================================
   TEAM SECTION BLOCK
   Grid layout for team members with photos
   ================================================================= */

.team-section {
    position: relative;
    width: 100%;
    background-color: var(--beige, #F2EAE2);
    padding: 100px 0;
    font-family: var(--font-lato, 'Lato', sans-serif);
}

/* =================================================================
   CONTAINER
   ================================================================= */

/* =================================================================
   HEADER SECTION
   ================================================================= */
.team-section__header {
    text-align: center;
    margin-bottom: 80px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.team-section__title {
    font-family: var(--font-montserrat, 'Montserrat', sans-serif);
    font-size: var(--font-size-44, 44px);
    font-weight: bold;
    line-height: var(--line-height-54, 54px);
    color: var(--primär-navy, #000233);
    margin: 0 0 24px 0;
    letter-spacing: 0;
}


.team-section__button {
    margin-top: 40px;
}

.team-section__description{
    width: 100%;
    max-width: 666px;
    margin: auto;
}

.team-section__description p{
    font-size: var(--font-size-18);
}
/* =================================================================
   TEAM GRID
   ================================================================= */
.team-section__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 27px;
    margin: 0 auto;
}

/* Fourth member centered on second row */
.team-section__grid .team-member:nth-child(4) {
    grid-column: 2;
    justify-self: center;
}

/* =================================================================
   TEAM MEMBER CARDS
   ================================================================= */
.team-member {
    position: relative;
    width: 100%;
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    text-align: left;
    transition: none;
    border: none;
    overflow: visible;
    text-decoration: none;
}

.team-member:hover {
    transform: none;
    box-shadow: none;
}

/* =================================================================
   TEAM MEMBER PHOTO
   ================================================================= */
.team-member__photo {
    position: relative;
    width: 100%;
    margin: 0 0 16px 0;
    border-radius: 8px;
    overflow: hidden;
}

.team-member__img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

/* =================================================================
   TEAM MEMBER CONTENT
   ================================================================= */
.team-member__content {
    position: relative;
    padding: 0;
}

.team-member__name {
    font-family: var(--font-montserrat, 'Montserrat', sans-serif);
    font-size: var(--font-size-20, 20px);
    font-weight: bold;
    line-height: var(--line-height-24, 24px);
    color: var(--primär-navy, #000233);
    margin: 0 0 4px 0;
    letter-spacing: 0;
}

.team-member__position {
    font-family: var(--font-lato, 'Lato', sans-serif);
    font-size: var(--font-size-16, 16px);
    font-weight: normal;
    line-height: var(--line-height-22, 22px);
    color: var(--primär-navy);
    margin: 0;
    text-transform: none;
    letter-spacing: 0;
}

p.team-member__email{
    margin-bottom: 0;
}
p.team-member__phone{
    margin: 0;
}

.team-member__content .team-member__email a,
.team-member__content .team-member__phone a{
    color: var(--primär-navy);
    text-decoration: none;
}


/* =================================================================
   RESPONSIVE DESIGN
   ================================================================= */

/* Large desktop */
@media (min-width: 1400px) {
    .team-section {
        padding: 120px 0;
    }

    .team-section__header {
        margin-bottom: 100px;
    }

    .team-section__title {
        font-size: 48px;
    }

    .team-member__name {
        font-size: 17px;
    }
}

/* Desktop adjustments */
@media (max-width: 1200px) {
    .team-section__title {
        font-size: 36px;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .team-section {
        padding: 80px 0;
    }

    .team-section__header {
        margin-bottom: 60px;
    }

    .team-section__title {
        font-size: 32px;
        margin-bottom: 20px;
    }

    .team-section__button {
        margin-top: 32px;
    }

    .team-section__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Reset fourth member positioning on tablet */
    .team-section__grid .team-member:nth-child(4) {
        grid-column: auto;
        justify-self: auto;
    }

    .team-member__photo {
        margin-bottom: 10px;
    }

    .team-member__name {
        font-size: 15px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .team-section {
        padding: 60px 0;
    }

    .team-section__header {
        margin-bottom: 40px;
    }

    .team-section__title {
        font-size: 28px;
        line-height: 1.4;
    }


    .team-section__grid {
        grid-template-columns: 1fr;
    }

    /* Reset fourth member positioning on mobile */
    .team-section__grid .team-member:nth-child(4) {
        grid-column: auto;
        justify-self: auto;
    }

    .team-member__photo {
        margin-bottom: 8px;
    }

    .team-member__name {
        font-size: 14px;
    }

    .team-member__position {
        font-size: 11px;
    }


    /* Mobile button styling handled by global design system */
}

/* =================================================================
   ACCESSIBILITY ENHANCEMENTS
   ================================================================= */

/* High contrast mode support */
@media (prefers-contrast: high) {
    .team-section {
        background-color: #FFFFFF;
    }

    .team-section__title {
        color: #000000;
    }

    .team-section__description {
        color: #333333;
    }

    .team-member {
        background-color: #FFFFFF;
        border: 2px solid #000000;
    }

    .team-member__name {
        color: #000000;
    }

    .team-member__position {
        color: #000000;
    }

    .team-member__description {
        color: #333333;
    }

}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .team-member {
        transition: none;
    }

    .team-member:hover {
        transform: none;
    }

    .team-member__contact-link {
        transition: none;
    }

    .team-member__contact-link:hover {
        transform: none;
    }
}

/* =================================================================
   PRINT STYLES
   ================================================================= */

@media print {
    .team-section {
        background: white !important;
        padding: 40px 0;
        page-break-inside: avoid;
    }

    .team-section__title {
        color: black !important;
        font-size: 24px;
    }


    .team-section__button {
        display: none;
    }

    .team-section__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .team-member {
        background: white !important;
        border: 1px solid black;
        box-shadow: none;
        padding: 20px;
    }

    .team-member__name {
        color: black !important;
        font-size: 16px;
    }

    .team-member__position {
        color: #333333 !important;
    }


}
