/* ============================================
   PAGE HEADER - GRADIENT + SHINE
   ============================================ */
#pageHeader {
    background-image: url('../assets/bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 8px 40px rgba(8, 184, 171, 0.3);
    position: relative;
    padding: calc(var(--header-height) + var(--spacing-3xl)) 0 var(--spacing-3xl);
    min-height: 320px;
    display: flex;
    align-items: center;
}

#pageHeader::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-15deg);
    animation: headerShine 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes headerShine {
    0%, 100% { left: -100%; }
    50% { left: 150%; }
}

#pageHeader .page-header-title {
    color: #F5FAFA;
}

#pageHeader .page-header-description {
    color: rgba(245, 250, 250, 0.9);
}

/* ============================================
   ABOUT PAGE STYLES - ENHANCED DEPTH
   ============================================ */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-3xl);
    align-items: center;
}

.about-text h2 {
    margin-bottom: var(--spacing-lg);
}

.about-text p {
    margin-bottom: var(--spacing-md);
}

.about-quote {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--brand-gradient-subtle);
    border-left: 3px solid var(--primary-mint);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.about-quote:hover {
    border-left-color: var(--primary-teal);
    box-shadow: var(--shadow-md);
}

.about-main-visual {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
}

.about-main-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--brand-gradient-subtle);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.about-main-visual:hover::before {
    opacity: 1;
}

.about-main-visual:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--border-highlight);
}

.about-main-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
    position: relative;
    z-index: 1;
    transition: transform var(--transition-slow);
}

.about-main-visual:hover img {
    transform: scale(1.05);
}

/* ============================================
   VALUES CARDS - BORDERED ACCENT
   ============================================ */
.values-card {
    background: #F5FAFA;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.values-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, #4EBE9A, #08B8AB);
    border-radius: 0 0 4px 4px;
    transition: width 0.4s ease;
}

.values-card:hover::before {
    width: 100%;
}

.values-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.values-card-icon {
    width: 44px;
    height: 44px;
    background: rgba(78, 190, 154, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    color: var(--primary-teal);
}

.values-card-icon svg {
    width: 22px;
    height: 22px;
}

.values-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

/* ============================================
   CARD LIST
   ============================================ */
.card-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.card-list li {
    position: relative;
    padding-left: 1.25rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.card-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-teal);
}

/* ============================================
   ABOUT VISUAL IMAGE
   ============================================ */
.about-main-visual-img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* ============================================
   ABOUT INTRO
   ============================================ */
.about-intro {
    text-align: center;
    max-width: 750px;
    margin: 0 auto;
}

.about-intro-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* ============================================
   REDUCE SECTION SPACING
   ============================================ */
#story,
#mission,
#values {
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
}

#values .why-us-grid {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 769px) and (max-width: 1024px) {
    #values .why-us-card:last-child {
        grid-column: 1 / -1;
        justify-self: center;
        max-width: calc(50% - var(--spacing-lg) / 2);
    }
}

@media (min-width: 401px) and (max-width: 768px) {
    #values .why-us-grid {
        justify-items: center;
    }

    #values .why-us-card {
        width: 380px;
        max-width: 100%;
    }
}

/* ============================================
   MEET OUR TEAM BUTTON
   ============================================ */
.meet-team-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: var(--brand-gradient);
    color: #F5FAFA;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(8, 184, 171, 0.3);
    transition: all var(--transition-base);
}

.meet-team-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(8, 184, 171, 0.4);
}

.meet-team-btn-arrow {
    transition: transform 0.4s ease;
}

.meet-team-btn.active .meet-team-btn-arrow {
    transform: rotate(180deg) translateX(2px);
}

/* ============================================
   TEAM SECTION - SLIDE FROM RIGHT
   ============================================ */
.team-section {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateX(80%);
    /* Closing transition - smooth */
    transition: max-height 1.2s ease, opacity 1.4s ease, transform 1.4s cubic-bezier(0.25, 0.1, 0.25, 1), padding 1.2s ease;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.team-section.visible {
    max-height: 3000px;
    opacity: 1;
    transform: translateX(0);
    padding-top: var(--spacing-xl) !important;
    padding-bottom: var(--spacing-xl) !important;
    /* Opening transition - slower and smoother */
    transition: max-height 2s ease-out, opacity 2s ease-out, transform 2s cubic-bezier(0.16, 1, 0.3, 1), padding 2s ease-out;
}

/* ============================================
   TEAM SECTION
   ============================================ */
.team-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xl);
}

.team-row {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
}

.team-grid-lead {
    max-width: 550px;
    margin: 0 auto var(--spacing-xl);
}

.team-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl) var(--spacing-md) var(--spacing-lg);
    text-align: center;
    width: 260px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.team-logo {
    position: absolute;
    bottom: 10px;
    left: 27%;
    transform: translateY(55%) scale(0.9);
    width: 180px;
    height: auto;
    opacity: 0.12;
    pointer-events: none;
    z-index: 0;
}

.team-photo {
    width: 200px;
    height: 200px;
    margin: 0 auto var(--spacing-lg);
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-mint);
    box-shadow: 0 0 0 5px rgba(78, 190, 154, 0.15);
    position: relative;
    z-index: 1;
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.team-card:hover .team-photo img {
    transform: scale(1.1);
}

.team-name {
    position: relative;
    z-index: 1;
    color: var(--text-primary);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.team-role {
    position: relative;
    z-index: 1;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: var(--spacing-md);
}

.team-socials {
    display: none;
}

/* ============================================
   TEAM CARD — SCROLL ENTRANCE
   ============================================ */
.team-card.card-hidden {
    visibility: hidden;
}

.team-card.card-pop {
    animation: teamCardPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes teamCardPop {
    from { opacity: 0; transform: translateY(30px) scale(0.85); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================
   DESKTOP (>1260px): Rearrange 2,3,2,3,2 → 2,4,4,2
   ============================================ */
@media (min-width: 1261px) {
    .team-grid {
        display: grid;
        grid-template-columns: repeat(4, 260px);
        justify-content: center;
        gap: var(--spacing-xl);
    }

    .team-row {
        display: contents;
    }

    /* Row 1 (2 cards) → grid row 1, centered in cols 2-3 */
    .team-row:nth-child(1) .team-card:nth-child(1) { grid-row: 1; grid-column: 2; }
    .team-row:nth-child(1) .team-card:nth-child(2) { grid-row: 1; grid-column: 3; }

    /* Row 2 (3 cards) → grid row 2, cols 1-3 */
    .team-row:nth-child(2) .team-card:nth-child(1) { grid-row: 2; grid-column: 1; }
    .team-row:nth-child(2) .team-card:nth-child(2) { grid-row: 2; grid-column: 2; }
    .team-row:nth-child(2) .team-card:nth-child(3) { grid-row: 2; grid-column: 3; }

    /* Row 3 (2 cards) → split: 1st to grid row 2 col 4, 2nd to grid row 3 col 1 */
    .team-row:nth-child(3) .team-card:nth-child(1) { grid-row: 2; grid-column: 4; }
    .team-row:nth-child(3) .team-card:nth-child(2) { grid-row: 3; grid-column: 1; }

    /* Row 4 (3 cards) → grid row 3, cols 2-4 */
    .team-row:nth-child(4) .team-card:nth-child(1) { grid-row: 3; grid-column: 2; }
    .team-row:nth-child(4) .team-card:nth-child(2) { grid-row: 3; grid-column: 3; }
    .team-row:nth-child(4) .team-card:nth-child(3) { grid-row: 3; grid-column: 4; }

    /* Row 5 (2 cards) → grid row 4, centered in cols 2-3 */
    .team-row:nth-child(5) .team-card:nth-child(1) { grid-row: 4; grid-column: 2; }
    .team-row:nth-child(5) .team-card:nth-child(2) { grid-row: 4; grid-column: 3; }
}

/* ============================================
   RESPONSIVE DESIGN (about-specific)
   Shared rules are in common.css
   ============================================ */
@media (max-width: 1260px) {
    .team-row {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 938px) {
    .team-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 260px);
        justify-content: center;
        align-items: start;
        gap: var(--spacing-xl);
        flex-direction: unset;
    }

    .team-row {
        display: contents !important;
    }
}

@media (max-width: 768px) {
    .values-card {
        padding: var(--spacing-lg);
    }

    .about-intro-text {
        font-size: 1.05rem;
    }

    .team-photo {
        width: 160px;
        height: 160px;
    }
}

@media (max-width: 585px) {
    .team-grid {
        grid-template-columns: 1fr !important;
        justify-items: center;
    }

    .team-card {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .about-main-visual-img {
        max-width: 100%;
    }
}