/* ==========================================================================
   Custom CSS — 21st Century STEM Foundation
   Styles that can't be achieved with Tailwind utility classes alone.
   ========================================================================== */

/* --- Accordion --- */
.accordion-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.accordion-item.open .accordion-panel {
    /* Height set dynamically by JS */
}

.accordion-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s ease;
    text-align: left;
}

.accordion-trigger:hover {
    background-color: #f1f5f9;
}

.accordion-item.open .accordion-trigger {
    background-color: #f1f5f9;
}

.chevron {
    transition: transform 0.25s ease;
    display: inline-block;
    margin-left: auto;
    font-size: 1.25rem;
    color: #9ca3af;
}

.accordion-item.open .chevron {
    transform: rotate(90deg);
}

/* --- Tab Navigation --- */
.tab-panel {
    display: none;
}

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

.tab-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #6b7280;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.tab-btn:hover {
    color: #1E3A8A;
}

.tab-btn.active {
    border-bottom: 3px solid #16A34A;
    color: #1E3A8A;
    font-weight: 700;
}

/* --- Member Photo --- */
.member-photo img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-initials {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: #1E3A8A;
    color: white;
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* --- Accordion Panel Layout --- */
.accordion-panel .member-content {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem 1.25rem;
}

@media (max-width: 639px) {
    .accordion-panel .member-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* --- Gallery Lightbox --- */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
}

.lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* --- News Read More --- */
.news-body {
    max-height: 100px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.4s ease;
}

.news-body.expanded {
    max-height: 2000px;
}

/* --- Smooth Scroll --- */
html {
    scroll-behavior: smooth;
}
