@media (max-width: 900px) {
    .members-row {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }
    .member-card {
        width: 98vw;
        max-width: 350px;
        margin: 0 auto 20px auto;
    }
    .member-img {
        max-width: 90vw;
        height: auto;
    }
    .header h1 {
        font-size: 2rem;
        text-align: center;
    }
    .header h2 {
        font-size: 1.1rem;
    }
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #000;
    color: white;
    margin: 0;
    padding: 0;
}

.header {
    text-align: center;
    border-radius: 5px;
}

/* --- Dropdown Menu Container --- */
.dropdown {
    position: relative; 
    display: inline-block; 
    margin: 20px;
}

.members-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-top: 40px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* Filter toolbar */
.filter-bar {
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    justify-content:center;
    margin: 18px auto 6px auto;
    max-width: 1000px;
}
.filter-btn {
    background: #222;
    color: #fff;
    border: 1px solid #444;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight:600;
}
.filter-btn:hover { background: #2b2b2b; }
.filter-btn.active { background: #009605; color: #fff; border-color: #007200; }

/* Hidden cards are visually collapsed but accessible; animation for smoothness */

/* Animate cards via opacity/transform; JS will toggle display for layout removal */
.member-card {
    transition: opacity 220ms ease, transform 220ms ease;
}
.member-card.hidden {
    opacity: 0;
    transform: scale(0.98);
    pointer-events: none;
}

.member-card {
    background: #111;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    width: 260px;
    flex: 0 1 calc(28% - 40px); /* 4 per row, accounting for gap */
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.member-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 3px solid #009605;
}

/* --- The Dropdown Button --- */
.dropbtn {
    background-color: #009605;
    color: white;
    padding: 16px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

/* --- The Container for the Links (Hidden by Default) --- */
.dropdown-content {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    background-color: #288f00;
    min-width: 200px;
    box-shadow: 0px 6px 14px 0px rgb(255, 255, 255);
    z-index: 1;
    border-radius: 5px;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

/* --- Styling for the Links Inside the Dropdown --- */
.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block; /* Makes the entire area clickable, not just the text */
    
}

/* --- Change color of dropdown links on hover --- */
.dropdown-content a:hover {
    background-color: #015000;
    transition: background-color 0.3s;
}

/* --- THE MAGIC: Show the dropdown menu when hovering over the container --- */
.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
