/* =========================================
   1. SHARED HEADER (Used on all 4 pages)
   ========================================= */

.about-header {
    background: linear-gradient(rgba(46, 125, 50, 0.8), rgba(27, 94, 32, 0.9)), url('../assets/images/Banner.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 160px 0 80px 0; 
    text-align: center;
    color: white;
    transition: background 0.3s ease;
}

/* Darken the gradient overlay slightly in dark mode for better contrast */
body.dark-theme .about-header {
    background: linear-gradient(rgba(18, 48, 20, 0.9), rgba(10, 30, 12, 0.95)), url('../assets/images/Banner.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.about-header h1 { 
    font-size: 3rem; 
    margin-bottom: 15px; 
}

.about-header p { 
    font-size: 1.2rem; 
    max-width: 600px; 
    margin: 0 auto; 
    opacity: 0.9; 
}

/* =========================================
   2. STANDALONE PAGES (Vision, Team, History)
   ========================================= */

.about-page-section { 
    padding: 80px 0; 
    background: var(--body-bg, #fdfdfd); 
    min-height: 60vh; 
    transition: background-color 0.3s ease;
}

.content-box {
    max-width: 1400px; 
    margin: 0 auto; 
    background: var(--section-white-bg, #fff);
    padding: 50px 60px;
    border-radius: 20px;
    box-shadow: 0 15px 45px rgba(0,0,0,0.04);
    border-top: 6px solid var(--primary-green, #2E7D32); 
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

body.dark-theme .content-box {
    box-shadow: 0 15px 45px rgba(0,0,0,0.25);
}

/* Content Formatting */
.fade-in-content { 
    animation: fadeIn 0.5s ease-out forwards; 
}

.fade-in-content h2 { 
    color: var(--primary-green, #2E7D32); 
    font-size: 2.2rem; 
    margin-bottom: 25px; 
    border-bottom: 2px solid var(--card-border, #E8F5E9); 
    padding-bottom: 10px; 
    transition: border-color 0.3s ease;
}

.fade-in-content p { 
    font-size: 1.1rem; 
    color: var(--text-secondary, #455A64); 
    margin-bottom: 20px; 
    line-height: 1.8; 
    transition: color 0.3s ease;
}

.fade-in-content ul { 
    list-style: none; 
    padding-left: 0; 
}

.fade-in-content ul li { 
    padding: 12px 0; 
    border-bottom: 1px solid var(--card-border, #eee); 
    font-size: 1.1rem; 
    color: var(--text-secondary, #455A64); 
    transition: color 0.3s ease, border-color 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   3. TEAM PAGE STYLING (Bulletproof Slide-Up)
   ========================================= */

.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 40px;
    margin-top: 40px;
}

.team-card {
    position: relative;
    height: 460px; 
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-bottom: 5px solid var(--primary-green, #2E7D32);
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transform: translateZ(0); 
    -webkit-mask-image: -webkit-radial-gradient(white, black); 
    transition: box-shadow 0.3s ease;
}

body.dark-theme .team-card {
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.team-grid.single-member {
    grid-template-columns: minmax(280px, 380px); 
    justify-content: flex-start; 
}

.team-image-wrapper {
    position: relative; 
    width: 100%;
    height: 100%;
    background: var(--card-bg, #e9ecef);
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.3s ease;
}

.team-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    pointer-events: none; 
    -webkit-user-drag: none; 
    user-select: none; 
}

.transparent-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent; 
    z-index: 10; 
    -webkit-touch-callout: none; 
}

.team-card:hover .team-image-wrapper,
.team-card:focus .team-image-wrapper {
    transform: scale(1.06);
}

/* =========================================
   TOAST NOTIFICATION (Bulletproof Fixed Position)
   ========================================= */

.toast {
    position: fixed; 
    bottom: 40px; 
    left: 50%; 
    transform: translateX(-50%) translateY(100px); 
    background: var(--primary-green, #2E7D32);
    color: #ffffff;
    padding: 16px 28px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 15px 30px rgba(46, 125, 50, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 999999; 
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55); 
}

.toast.show {
    transform: translateX(-50%) translateY(0); 
    opacity: 1;
    visibility: visible;
}

.toast i {
    font-size: 1.3rem;
    color: #a4df10; 
}

/* Frosted Glass Overlay - Anchored to the bottom */
.team-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 25px;
    box-sizing: border-box;
    border-top: 1px solid rgba(255,255,255,0.7);
    display: flex;
    flex-direction: column;
    transition: background 0.3s ease, border-color 0.3s ease;
}

/* Dark Mode Frosted Glass Override */
body.dark-theme .team-info {
    background: rgba(30, 43, 48, 0.92);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.team-visible {
    width: 100%;
}

.team-visible h3 {
    color: var(--primary-green, #2E7D32);
    font-size: 1.5rem;
    margin: 0 0 5px 0;
}

.team-visible h4 {
    color: var(--text-primary, #37474F);
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
    transition: color 0.3s ease;
}

.team-hidden {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    transition: max-height 0.5s cubic-bezier(0.25, 1, 0.5, 1), 
                opacity 0.4s ease, 
                margin-top 0.4s ease;
}

.team-card:hover .team-hidden,
.team-card:focus .team-hidden {
    max-height: 500px; 
    opacity: 1;
    margin-top: 15px; 
    transition-delay: 0s, 0.1s, 0s; 
}

.team-hidden p {
    font-size: 0.95rem;
    color: var(--text-secondary, #546E7A);
    margin: 0 0 20px 0; 
    line-height: 1.6;
    transition: color 0.3s ease;
}

.team-contact {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid var(--card-border, #e0e0e0);
    padding-top: 15px;
    transition: border-color 0.3s ease;
}

.team-contact a {
    color: var(--text-secondary, #455A64);
    text-decoration: none;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: color 0.3s ease;
}

.team-contact a i {
    color: var(--primary-green, #2E7D32);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.team-contact a:hover {
    color: var(--primary-green-hover, #1B5E20);
}

/* =========================================
   4. MAIN ABOUT PAGE (Tabbed Layout)
   ========================================= */

.tab-section {
    padding: 80px 0;
    background: var(--body-bg, #fdfdfd);
    transition: background-color 0.3s ease;
}

.tab-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.tab-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 280px;
    flex-shrink: 0; 
}

.tab-btn {
    padding: 18px 25px;
    background: var(--card-bg, #f4f7f6);
    border: none;
    border-radius: 12px;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary, #546E7A);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.tab-btn:hover {
    background: var(--card-border, #e9ecef);
    color: var(--primary-green, #2E7D32);
    transform: translateX(5px); 
}

.tab-btn.active {
    background: var(--primary-green, #2E7D32);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(46, 125, 50, 0.25);
    transform: translateX(5px);
}

.tab-content-area {
    flex-grow: 1;
    background: var(--section-white-bg, #ffffff);
    padding: 50px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.04);
    border-top: 5px solid var(--primary-green, #2E7D32);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

body.dark-theme .tab-content-area {
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}

.tab-content-area h2 {
    color: var(--primary-green, #2E7D32);
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.tab-content-area p {
    font-size: 1.1rem;
    color: var(--text-secondary, #546E7A);
    line-height: 1.8;
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.tab-content-area ul {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.tab-content-area ul li {
    font-size: 1.1rem;
    color: var(--text-secondary, #455A64);
    padding: 10px 0;
    border-bottom: 1px solid var(--card-border, #f0f0f0);
    transition: color 0.3s ease, border-color 0.3s ease;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.tab-pane.active {
    display: block;
}

/* =========================================
   5. RESPONSIVE DESIGN (Mobile & Tablet)
   ========================================= */

@media (max-width: 992px) {
    .tab-container {
        flex-direction: column; 
        gap: 25px;
    }
    
    .tab-sidebar {
        width: 100%;
        flex-direction: row; 
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .tab-btn {
        white-space: nowrap; 
        text-align: center;
        padding: 15px 30px;
    }

    .tab-btn:hover, .tab-btn.active {
        transform: translateY(-3px); 
    }

    .tab-content-area {
        padding: 30px 25px;
    }
}

@media (max-width: 768px) {
    .content-box { 
        padding: 35px 25px; 
        margin: 0 15px;
    }
    
    .fade-in-content h2 {
        font-size: 1.8rem;
    }

    /* COMPLETE TEAM PAGE MOBILE FIXES */
    .team-grid {
        grid-template-columns: 1fr; 
        gap: 30px;
    }

    .team-card {
        height: 480px; 
    }

    .team-info {
        padding: 20px; 
    }

    .team-hidden p {
        font-size: 0.9rem; 
        margin-bottom: 15px;
        line-height: 1.5;
    }

    .team-contact {
        padding-top: 12px;
        gap: 10px;
    }
    
    .team-contact a {
        font-size: 0.9rem;
    }
}
