/* Team Page Styles */
.team-card::after{
    content: '';
    position: absolute;
    left: calc(100% + 40px);
    top: 0;
    bottom: -40px;
    background: rgba(0, 0, 0, 0.12);
    width: 1px;
    display: none; /* enabled in media queries */
    pointer-events: none;
}

/* Show separators only on large desktop (>=1440px). Hide on smaller screens. */
@media (min-width: 1440px) {
    .team-grid { gap: 40px; }
    /* place at half the gap to the right of the card: gap/2 = 20px */
    .team-card::after{ display: block; left: calc(100% + 40px); background: rgba(0,0,0,0.12); }
    /* explicitly show only for the first two positions in each 3-column row */
    .team-card:nth-child(3n+1)::after,
    .team-card:nth-child(3n+2)::after { display: block; }
    .team-card:nth-child(3n)::after{ display: none; }
}

/* Mobile/tablet: hide separators */
@media (max-width: 1439px) {
    .team-card::after{ display: none; }
    .team-modal-close {
    top: 40px !important;
    }
}


.team-intro-icon svg {
    width: 24px;
    height: 24px;
    fill: #000;
}

.team-intro h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    margin-top: 20px;
    width: 100%;
}

.team-intro p {
    font-size: 16px;
    line-height: 1.7;
    color: #6c757d;
}

.team-intro .highlight-text {
    font-weight: 600;
    color: #1a1a1a;
}

/* Team Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    max-width: 1440px;
    margin: 0 20px; /* 20px margin left and right as requested */
    position: relative; /* needed for the ::before separators */
}

/* Team Cards */
.team-card {
    background: white;
    border-radius: 8px;
    overflow: visible;
    transition: all 0.3s ease;
    text-align: center;
    width: 400px;
    position: relative;
}

.team-photo {
    overflow: hidden;
    height: 500px;
    flex-shrink: 0;
    border-radius: 8px;
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Vertical separators between columns: draw a 1px line centered in the grid gap
   Implemented with a pseudo-element on the card and responsive rules for column counts. */
.team-card { z-index: 1; }

/* Desktop: 3 columns approx */
@media (min-width: 1100px) {
    .team-grid { gap: 40px; }
    /* per-card separators used instead */
}

/* Tablet: 2 columns */
@media (min-width: 700px) and (max-width: 1099px) {
    .team-grid { gap: 32px; }
    /* per-card separators used instead */
}

/* Mobile: hide separators */
@media (max-width: 699px) {
    /* per-card separators hidden on mobile */
}

.team-info {
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: center;
    gap: 16px;
}

/* Team card - name */
.team-name {
    color: var(--CG-colors-Grey-Black, #000);
    font-family: var(--Typography-font-family-body, Montserrat);
    font-size: 18px;
    font-style: normal;
    font-weight: 500;
    line-height: 24px; /* 133.333% */
    margin: 0;
}

/* Team card - position */
.team-position {
    color: var(--CG-colors-Shadows-Black-80, rgba(0, 0, 0, 0.80));
    font-family: var(--Typography-font-family-body, Montserrat);
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 21px; /* 150% */
    margin: 0;
}

/* CTA */
.team-link {
    display: flex;
    width: 67px;
    height: 26px;
    padding: 4px 8px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    border-radius: 4px;
    border: 1px solid var(--CG-colors-Shadows-Black-30, rgba(0, 0, 0, 0.30));
    background: transparent;
    text-decoration: none;
}

.team-link svg {
    width: 9px;
    height: 9px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
    transform-origin: center center;
}

.team-link__text {
    color: var(--CG-colors-Grey-Black, #000);
    font-family: var(--Typography-font-family-caption, Montserrat);
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
    line-height: 18px; /* 150% */
    display: inline-block;
}

/* CTA hover: lime background and rotate SVG 90deg */
.team-link:hover {
    background: #C4F222;
    border-color: #C4F222;
}

.team-link:hover svg {
    transform: rotate(90deg);
}

/* Team Modal */
.team-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    padding: 20px;
    display: flex;
    align-items: flex-end;
    padding: 0;
    /* no opacity animation - modal will slide from below */
    pointer-events: none; /* enabled only when .is-open is present */
}

.team-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    cursor: pointer;
    width: 100%;
    height: auto;
    opacity: 0; /* start hidden */
    transition: opacity 900ms cubic-bezier(.2,.9,.2,1);
    pointer-events: none; /* disabled until open */
}

.team-modal-content {
    position: relative;
    background: rgba(242, 242, 242, 1);
    width: 100%;
    height: 95vh;
    overflow-y: auto;
    bottom: 0;
    transform: translateY(100%); /* start below viewport */
    transition: transform 900ms cubic-bezier(.2,.9,.2,1);
}

/* open state */
.team-modal.is-open {
    pointer-events: auto;
}

.team-modal.is-open .team-modal-content {
    transform: translateY(0);
}

.team-modal.is-open .team-modal-overlay {
    opacity: 1;
    pointer-events: auto;
}

.team-modal-close {
    position: absolute;
    top: 60px;
    left: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    width: 67px;
    height: 26px;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    border-radius: 4px;
    border: 1px solid var(--CG-colors-Shadows-Black-30, rgba(0, 0, 0, 0.30));
    background: transparent;
    z-index: 10;
}

.team-modal-close:hover {
    background: #C4F222;
    border-color: #C4F222;
    color: var(--CG-colors-Grey-Black, #000);
}

.team-modal-close svg {
    width: 9px;
    height: 9px;
    flex-shrink: 0;
}

.team-modal-grid {
    display: flex;
    width: 100%;
    justify-content: center;
}

.team-modal-info {
    padding: 100px 40px 40px 40px;
    max-width: 890px;
    position: relative;
}

.team-modal-info h2 {
    color: var(--CG-colors-Grey-Black, #000);
    font-family: var(--Typography-font-family-title, "Space Grotesk");
    font-size: 32px;
    font-style: normal;
    font-weight: 500;
    line-height: 34px;
    margin: 0 0 8px 0;
}

.team-modal-info p {
    color: var(--CG-colors-Shadows-Black-80, rgba(0, 0, 0, 0.80));
    font-family: var(--Typography-font-family-body, Montserrat);
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
    margin: 0 0 40px 0;
}

.team-modal-section {
    margin-bottom: 40px;
}

.team-modal-section h3 {
    color: var(--CG-colors-Blue-Blue-5, #003EFF);
    font-family: var(--Typography-font-family-caption, Montserrat);
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 21px;
    text-transform: none;
    margin: 0 0 8px 0;
}

.team-modal-section div {
    color: var(--CG-colors-Shadows-Black-80, rgba(0, 0, 0, 0.80));
    font-family: var(--Typography-font-family-body, Montserrat);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
}

/* About text (medium) */
#modalAbout {
    color: var(--CG-colors-Shadows-Black-80, rgba(0, 0, 0, 0.80));
    font-family: var(--Typography-font-family-body, Montserrat);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
}

.team-modal-photo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 40px 40px 40px;
    position: relative;
}

.team-modal-photo img {
    width: 410px;
    height: 514px;
    flex-shrink: 0;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 24px;
}

.team-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: white;
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    padding: 16px 24px;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.team-contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: #1a1a1a;
}

.team-contact-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.team-contact-btn:hover svg {
    transform: translateX(3px);
}
.team-intro {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.team-intro-row {
    /* No flex: use inline-block layout with explicit spacing */
    display: block;
    white-space: nowrap; /* keep icon + title + text on one line when space allows */
    margin: 0;
}

/* Left area with icon and title placed inline */
.team-intro-col-icon {
    display: inline-block;
    vertical-align: middle;
}

.team-intro-icon {
    display: inline-flex;
    width: 187px;
    height: 90px;
    margin-right: 21px;
    margin-left: 20px;
    background: none;
    box-shadow: none;
    vertical-align: middle;
    width: 29.829px;
    height: 48px;
    align-items: center;
    justify-content: center;
}

.team-intro-col-icon > h2 {
    display: inline-block;
    vertical-align: middle;
    margin: 0 215px 0 0; /* title must have 215px on the right */
    font-size: 2.2rem;
    font-weight: 700;
}

.team-intro-col-text {
    display: inline-block;
    vertical-align: middle;
    white-space: normal; /* allow paragraph wrapping inside this column */
    max-width: calc(100% - 360px); /* leave room for icon + title; conservative fallback */
    text-align: left;
}

.team-intro-col-text h2 {
    margin-top: 0;
    margin-bottom: 18px;
    font-size: 2.2rem;
    font-weight: 700;
}

.team-intro-col-text p {
    font-size: 1.15rem;
    margin-bottom: 12px;
}

/* Introduction 2 - new layout with fixed measures */
.introduction-2 {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    max-width: 1440px;
    margin: 62px 0 40px 20px;
    padding-left: 20px;
}
    /* For viewports 1024px and under: force introduction-2 margins/padding */
    @media (max-width: 1024px) {
        .introduction-2 {
            margin: 0 auto !important;
            padding-left: 0 !important;
        }
    }

.introduction-2__icon {
    width: 29.829px;
    height: 48px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;
}

.introduction-2__title {
    width: 210px;
    color: var(--CG-colors-Grey-Black, #000);
    text-align: center;
    font-family: var(--Typography-font-family-title, "Space Grotesk");
    font-size: 40px;
    font-style: normal;
    font-weight: 500;
    line-height: 44px; /* 110% */
    margin: 0;
    margin-left: 20px; /* 20px distance from icon */
    margin-right: 250px; /* 250px distance from the text */
}

.introduction-2__text {
    width: 920px;
    color: var(--CG-colors-Shadows-Black-80, rgba(0, 0, 0, 0.80));
    font-family: var(--Typography-font-family-body, Montserrat);
    font-size: 20px;
    font-style: normal;
    font-weight: 400;
    line-height: 26px; /* 130% */
    padding-right: 20px;
}

.introduction-2 .highlight-text {
    font-weight: 700;
    color: inherit;
}

@media (max-width: 1024px) {
    .introduction-2 {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .introduction-2__title,
    .introduction-2__text {
        width: auto;
        max-width: 90%;
    }

    /* Reset large margins on smaller screens */
    .introduction-2__icon { margin-left: 0; padding-left: 0; }
    .introduction-2__title { margin-left: 0; margin-right: 0; }
}

/* Modal layout: 50% text / 50% image+btn for medium-large desktops (992px - 1440px) */
@media (min-width: 992px) and (max-width: 1440px) {
    .team-modal-grid {
        flex-direction: row;
        align-items: center;
        justify-content: center;
    }

    .team-modal-info {
        width: 50% !important;
        max-width: none !important;
        padding: 80px 40px 40px 40px !important;
        box-sizing: border-box;
    }

    .team-modal-photo {
        width: 50% !important;
        padding: 80px 40px 40px 40px !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }

    .team-modal-photo img {
        width: 100% !important;
        height: auto !important;
        max-width: 410px !important;
        margin-bottom: 24px !important;
    }

    .team-contact-btn {
        margin-top: 16px !important;
        align-self: center !important;
    }
}

/* Mobile-first vertical modal: for viewports 992px and under, stack elements as: close, image, btn, text (all centered) */
@media (max-width: 992px) {
    .team-modal-grid {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
    }

    /* Make close button appear first */
    .team-modal-close {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        margin: 12px auto !important;
        order: -1 !important;
    }

    .team-modal-photo {
        order: 0 !important;
        width: 100% !important;
        padding: 20px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .team-modal-photo img {
        width: 80% !important;
        height: auto !important;
        max-width: 360px !important;
        margin-bottom: 16px !important;
    }

    /* Ensure contact button sits under the image */
    #modalContactBtn, .team-contact-btn {
        order: 1 !important;
        margin: 8px auto 24px auto !important;
    }

    .team-modal-info {
        order: 2 !important;
        width: 100% !important;
        padding: 20px !important;
        text-align: center !important;
    }

    .team-modal-info h2,
    .team-modal-info p,
    .team-modal-section {
        text-align: center !important;
    }
}
/* Responsive Design */
@media (max-width: 768px) {
    .team-section {
        padding: 60px 0;
    }

    /* Hide decorative lines on smaller screens */
    .vertical-line {
        display: none;
    }
    
    .team-intro {
        margin-bottom: 60px;
    }
    
    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 32px;
    }
    
    .team-info {
        padding: 24px 20px;
    }
    
    /* Modal Responsive */
    .team-modal-grid {
        grid-template-columns: 1fr;
    }
    
    .team-modal-info {
        padding: 40px 30px 30px 30px;
    }
    
    .team-modal-info h2 {
        font-size: 28px;
    }
    
    .team-modal-photo {
        padding: 30px;
        order: -1;
    }
    
    .team-modal-photo img {
        width: 100%;
        height: auto;
        max-width: 280px;
        margin-bottom: 24px;
    }
    
    .team-contact-btn {
        font-size: 14px;
        padding: 14px 20px;
    }
}

/* For viewports under 1300px: fix card width to 330px and center them */
@media (max-width: 1299px) {
    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(330px, 330px));
        justify-content: center;
        gap: 24px;
    }
    .team-card {
        width: 330px;
        margin: 0 auto 16px auto;
    }
}

@media (max-width: 480px) {
    .team-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .team-modal {
        padding: 10px;
    }
    
    .team-modal-info {
        padding: 30px 20px 20px 20px;
    }
    
    .team-modal-close {
        top: 10px;
        right: 10px;
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* --- responsive overrides added by agent: team view --- */
@media (max-width: 768px) {
  .team-grid { grid-template-columns: 1fr !important; }
  .team-card { margin-bottom: 16px; }
}
@media (min-width: 350px) and (max-width: 550px) {
  .team-name { font-size: 15px !important; }
  .team-role { display: none; }
}

.hc-cta--aroad{
    margin: 0 auto;
}
