/* Team Page Styles - Cognitive Science of Yoga */

/* Override default page-header padding/shadow for team page */
.team-page-header {
    padding: 0;
    background: linear-gradient(135deg, #2a6b5e, #61c4db, #7ec8a0);

}

/* Wrapper: blue gradient fills any space not covered by the image */
.teamgroup-banner-wrap {
    position: relative;
    width: 100%;
    background: linear-gradient(135deg, #2a6b5e, #61c4db, #7ec8a0);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Left fade: image blends into the blue bar on the left side */
.teamgroup-banner-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 120px;
    height: 100%;
    background: linear-gradient(to right, #61c4db 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

/* Right fade: image blends into the blue bar on the right side */
.teamgroup-banner-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 100%;
    background: linear-gradient(to left, #2a6b5e 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

/* Image never crops — full proportions, constrained to viewport width */
.teamgroup-banner-img {
    display: block;
    max-width: 100%;
    height: auto;
    width: auto;
    max-height: 70vh;
}

/* Title/subtitle overlaid at the bottom of the image area */
.teamgroup-overlay-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 100%);
    text-align: center;
    color: white;
    z-index: 2;
}

.teamgroup-overlay-text h1 {
    margin: 0 0 0.3rem 0;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 300;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.teamgroup-overlay-text p {
    margin: 0;
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    opacity: 0.95;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.team-intro {
    max-width: 800px;
    margin: 0 auto 2rem;
    text-align: center;
    padding: 0 clamp(1rem, 5vw, 2rem);
}

.team-intro p {
    color: #555;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Team Cards Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    width: min(100%, 1200px);
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 5vw, 2rem);
}

/* Individual Card */
.team-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 2rem 1.5rem;
    width: 100%;
    min-width: 0;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    position: relative;
}

.team-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.15);
    background-color: #f8fffe;
}

.team-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: rgba(0,0,0,0);
    transition: background 0.3s ease;
    pointer-events: none;
}

.team-card:hover::after {
    background: rgba(42, 107, 94, 0.04);
}

.team-card .card-photo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    margin: 0 auto 1.2rem;
    display: block;
    border: 3px solid #e0e0e0;
    transition: border-color 0.3s;
}

.team-card:hover .card-photo {
    border-color: #7ec8a0;
}

.team-card h3 {
    color: #2c3e50;
    font-size: 1.15rem;
    margin-bottom: 0.3rem;
}

.team-card .card-role {
    color: #2a6b5e;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.team-card .card-snippet {
    color: #777;
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.team-card .expand-hint {
    color: #7ec8a0;
    font-size: 1.4rem;
    font-weight: bold;
    margin-top: 0.8rem;
    display: block;
    transition: transform 0.3s;
}

.team-card:hover .expand-hint {
    transform: scale(1.2);
}

/* Modal Overlay */
.team-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.team-modal-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.team-modal {
    background-color: white;
    padding: 2.5rem;
    border-radius: 12px;
    max-width: 700px;
    width: min(92vw, 700px);
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.team-modal-overlay.active .team-modal {
    transform: scale(1);
}

.team-modal .close-button {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    font-size: 1.8rem;
    cursor: pointer;
    color: #2c3e50;
    background: none;
    border: none;
    line-height: 1;
    transition: color 0.2s;
}

.team-modal .close-button:hover {
    color: #e74c3c;
}

.team-modal .modal-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    margin: 0 auto 1.5rem;
    display: block;
    border: 3px solid #7ec8a0;
}

.team-modal h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 0.3rem;
}

.team-modal .modal-role {
    text-align: center;
    color: #2a6b5e;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.team-modal .modal-bio p {
    color: #444;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.team-modal .modal-links {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.team-modal .modal-links a {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: linear-gradient(135deg, #2a6b5e, #61c4db);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.team-modal .modal-links a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(42,107,94,0.3);
}

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

    .team-modal .modal-photo {
        width: 170px;
        height: 170px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .team-grid {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        padding: 2rem 0.9rem;
        gap: 1rem;
    }

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

    .team-modal {
        width: 95%;
        padding: 1.5rem;
    }

    .team-modal .modal-links {
        flex-direction: column;
        align-items: stretch;
    }

    .team-modal .modal-links a {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .team-card {
        padding: 1.5rem 1rem;
    }

    .team-card .card-photo {
        width: 130px;
        height: 130px;
    }

    .team-modal .modal-photo {
        width: 140px;
        height: 140px;
    }
}

/* Night Mode */
body.night-mode .team-intro p {
    color: #b0b0b0;
}

body.night-mode .team-card {
    background: #1e1e1e;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

body.night-mode .team-card:hover {
    background-color: #252525;
    box-shadow: 0 12px 28px rgba(0,0,0,0.4);
}

body.night-mode .team-card:hover::after {
    background: rgba(126, 200, 160, 0.05);
}

body.night-mode .team-card h3 {
    color: #e0e0e0;
}

body.night-mode .team-card .card-role {
    color: #7ec8a0;
}

body.night-mode .team-card .card-snippet {
    color: #999;
}

body.night-mode .team-card .card-photo {
    border-color: #444;
}

body.night-mode .team-card:hover .card-photo {
    border-color: #7ec8a0;
}

body.night-mode .team-modal-overlay {
    background-color: rgba(0, 0, 0, 0.9);
}

body.night-mode .team-modal {
    background-color: #1e1e1e;
}

body.night-mode .team-modal h2 {
    color: #e0e0e0;
}

body.night-mode .team-modal .modal-role {
    color: #7ec8a0;
}

body.night-mode .team-modal .modal-bio p {
    color: #c0c0c0;
}

body.night-mode .team-modal .close-button {
    color: #ccc;
}
