.team-section {
    padding: calc(var(--spacing-lg) * 1.5) 0 calc(var(--spacing-lg) * 3) 0;
    background-color: var(--primary-bg);
}

.team-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.team-title span {
    font-style: italic;
}

.team-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: var(--spacing-lg);
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    max-width: 1400px;
    margin: 0 auto calc(var(--spacing-lg) * 3) auto;
}

.team-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-sm);
    min-height: 450px;
}

.team-member-img {
    width: 100%;
    max-width: 250px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: var(--spacing-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 4px solid;
}

/* Individual team member border colors */
.team-member:nth-child(1) .team-member-img {
    border-color: #FFEBA3; /* Soft pastel bright yellow */
}

.team-member:nth-child(2) .team-member-img {
    border-color: #E5B8E4; /* Lively pastel purple */
}

.team-member:nth-child(4) .team-member-img {
    border-color: #8ED9B6; /* Lively pastel green */
}

.team-member:nth-child(3) .team-member-img {
    border-color: #B5D8FF; /* Lively pastel blue */
}

.team-member-img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.team-member-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
    text-align: center;
    width: 100%;
    padding: var(--spacing-sm) 0;
}

.team-member-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
}

.team-member-desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: var(--spacing-md);
    line-height: 1.4;
    min-height: 4.2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.team-member-cta {
    display: inline-flex;
    align-items: center;
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    padding: 0 1.5rem;
    border-radius: 5px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease;
    height: 32px;
}

.team-member-cta:hover {
    background-color: #333;
}

.sse-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 600px;
    margin: calc(var(--spacing-lg) * 2) auto var(--spacing-lg) auto;
    padding: var(--spacing-md);
    background-color: var(--accent-color);
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
    text-decoration: none;
    color: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sse-content.hidden-on-load {
    opacity: 0;
    transform: translateY(20px);
    visibility: hidden;
    pointer-events: none;
}

.sse-content.visible-on-scroll {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.sse-content:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.sse-logo img {
    max-width: 120px;
    height: auto;
    margin-bottom: var(--spacing-md);
    filter: brightness(0) invert(1);
}

.sse-text {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #fff;
    line-height: 1.6;
}

.story-container {
    position: relative;
    z-index: 1;
    border-bottom: 1px solid var(--text-gray);
}

#story-nav {
    background-color: var(--primary-bg);
    padding: var(--spacing-sm) 0;
    position: sticky;
    top: var(--navbar-height);
    z-index: 999;
    border-bottom: 1px solid var(--text-gray);
    transition: top 0.3s ease, bottom 0.3s ease;
}

#story-nav.sticky-bottom {
    top: auto;
    bottom: 0;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.08);
}

.content-section {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-sm);
    min-height: 80vh;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.content-section.reverse {
    flex-direction: row-reverse;
    justify-content: center;
}

.content-section .section-text {
    max-width: 440px;
    flex: 1 1 440px;
    min-width: 300px;
    box-sizing: border-box;
}

.content-section .section-image {
    max-width: 664px;
    flex: 1 1 664px;
    min-width: 300px;
    transition: transform 0.3s ease;
}

.content-section .section-image img {
    width: 100%;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.content-section .section-image:hover img {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.content-section .section-text h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.content-section .section-text p {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

.values-section {
    padding: calc(var(--spacing-lg) * 1.5) 0;
    background-color: #fff;
    border-top: 1px solid var(--text-gray);
    border-bottom: 1px solid var(--text-gray);
}

.values-section .container {
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
}

.values-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    text-align: center;
}

.values-title span {
    font-style: italic;
}

.values-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: var(--spacing-lg);
    text-align: center;
    max-width: 600px;
    line-height: 1.6;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    max-width: 800px;
    width: 100%;
}

.value-item {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    padding: 2.5rem 2rem 2rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    transition: box-shadow 0.2s, transform 0.2s;
}

.value-item:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px) scale(1.03);
}

.value-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.7rem;
    color: #1a1a1a;
}

.value-desc {
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    color: #444;
    line-height: 1.6;
    max-width: 300px;
}

.recruitment-section {
    padding: calc(var(--spacing-lg) * 3) 0;
    background-color: #000;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.recruitment-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.recruitment-section .container {
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
    position: relative;
    z-index: 1;
}

.recruitment-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: #fff;
    letter-spacing: -0.02em;
}

.recruitment-section p {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    max-width: 600px;
    margin-bottom: var(--spacing-md);
}

.recruitment-section p:last-of-type {
    font-size: 1.3rem;
    font-weight: 500;
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.recruitment-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    color: #000;
    padding: 1.2rem 3rem;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 2px solid #fff;
    position: relative;
    overflow: hidden;
}

.recruitment-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.recruitment-cta:hover {
    background-color: transparent;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.recruitment-cta:hover::before {
    transform: translateX(100%);
}

.tally-popup {
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    background-color: #f8f8f8 !important;
    z-index: 10000 !important;
}

.team-appear.hidden-on-load {
    opacity: 0;
    transform: translateY(20px);
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.team-appear.visible-on-scroll {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}

.sse-appear.hidden-on-load {
    opacity: 0;
    transform: translateY(20px);
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.sse-appear.visible-on-scroll {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}

@media (max-width: 1200px) {
    .team-section {
        padding: var(--spacing-md) 0;
    }

    .team-title {
        font-size: 2.5rem;
    }

    .team-subtitle {
        font-size: 1rem;
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 800px;
    }

    .team-member {
        min-height: auto;
    }

    .team-member-img {
        max-width: 200px;
    }

    .team-member-name {
        font-size: 1.4rem;
    }

    .team-member-desc {
        font-size: 0.9rem;
        min-height: 0;
    }

    .team-member-cta {
        padding: 0 1.5rem;
        font-size: 1rem;
        height: 32px;
    }

    .sse-content {
        padding: var(--spacing-sm);
        max-width: 500px;
    }

    .sse-logo img {
        max-width: 100px;
    }

    .sse-text {
        font-size: 0.9rem;
    }

    #story-nav {
        margin-top: var(--spacing-md);
    }

    #story-nav.sticky-bottom {
        position: fixed;
        width: 100%;
        bottom: 0;
        left: 0;
        box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.08);
    }

    .recruitment-section {
        padding: calc(var(--spacing-lg) * 2) 0;
    }

    .recruitment-section .container {
        max-width: 90%;
    }

    .recruitment-section h2 {
        font-size: 2.8rem;
    }

    .recruitment-section p {
        font-size: 1.1rem;
        max-width: 90%;
    }

    .recruitment-section p:last-of-type {
        font-size: 1.2rem;
    }

    .recruitment-section .recruitment-cta {
        padding: 1rem 2.5rem;
        font-size: 1rem;
    }

    .content-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: var(--spacing-md) var(--spacing-sm);
        gap: var(--spacing-md);
        min-height: auto;
    }

    .content-section.reverse {
        flex-direction: column;
    }

    .content-section .section-text,
    .content-section .section-image {
        max-width: 100%;
        width: 100%;
        flex: 0 0 auto;
    }

    .content-section .section-text {
        margin-bottom: var(--spacing-md);
        max-width: 500px;
        margin: 0 auto;
    }

    .content-section .section-image {
        max-width: 500px;
        margin: 0 auto;
    }

    .content-section .section-text h2 {
        font-size: 1.8rem;
    }

    .content-section .section-text p {
        font-size: 0.9rem;
    }

    .values-section {
        padding: var(--spacing-lg) 0;
    }

    .values-title {
        font-size: 2.2rem;
    }

    .values-subtitle {
        font-size: 1rem;
        max-width: 90%;
    }

    .values-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 90%;
    }

    .value-item {
        max-width: 100%;
    }

    .value-title {
        font-size: 1.6rem;
    }

    .value-desc {
        font-size: 0.95rem;
        max-width: 350px;
    }
}

@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    .team-member-name {
        font-size: 1.6rem;
    }
}

@media (max-width: 900px) {
    .values-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 90%;
    }
    .value-item {
        max-width: 100%;
    }
}

@media (max-width: 1200px) and (min-width: 769px) {
  .team-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: var(--spacing-lg);
    justify-items: center;
  }
  .team-member:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }
  .team-member:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }
  .team-member:nth-child(3) {
    grid-column: 1 / span 2;
    grid-row: 2;
    justify-self: center;
  }
}