/* === MEETING MINUTES ARCHIVE STYLES === */
.archive-container {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    margin-top: 30px;
    font-family: 'Inter', sans-serif;
}

.archive-header h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
}

.archive-header p {
    color: #546e7a;
    line-height: 1.6;
    margin: 0;
}

.years-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

.year-item {
    position: relative;
    z-index: 10; /* Added: Ensure proper stacking context */
}

.year-btn {
    width: 100%;
    background: #f9f9f9;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 20px 15px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    color: #333333;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative; /* Added: Ensure proper z-index context */
    z-index: 20; /* Added: Higher than parent */
}

.year-btn:hover {
    background: rgba(255, 165, 0, 0.1);
    border-color: #FFA500;
    color: #FFA500;
}

.year-btn.active {
    background: #FFA500;
    color: #ffffff;
    border-color: #FFA500;
}

.year-btn i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.year-btn.active i {
    transform: rotate(180deg);
}

.year-count {
    display: inline-block;
    background: #2c3e50;
    color: #ffffff;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    vertical-align: middle;
}

.minutes-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    z-index: 1000; /* Increased: Ensure dropdown appears above other elements */
    max-height: 300px;
    overflow-y: auto;
    margin-top: 5px;
}

.year-item.active .minutes-dropdown {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* FIX: Ensure dropdown appears above other year items */
.year-item.active {
    z-index: 1001; /* Higher than other year items */
}

.minutes-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.minutes-item {
    padding: 15px;
    border-bottom: 1px solid #f0f2f5;
    margin: 0;
    position: relative;
    z-index: 1002; /* Ensure list items are clickable */
}

.minutes-item:last-child {
    border-bottom: none;
}

.minutes-link {
    display: block;
    color: #333333;
    text-decoration: none;
    padding: 8px 0;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    z-index: 1003; /* Ensure links are clickable */
}

.minutes-link:hover {
    color: #FFA500;
    padding-left: 10px;
}

.minutes-link i {
    margin-right: 8px;
    color: #FFA500;
    font-size: 0.9rem;
}

.minutes-disclaimer {
    background: #f0f2f5;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
    border-left: 3px solid #FFA500;
}

.minutes-disclaimer p {
    margin: 0;
    color: #546e7a;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.minutes-disclaimer i {
    color: #FFA500;
    flex-shrink: 0;
}

.archive-empty {
    text-align: center;
    padding: 40px;
    color: #546e7a;
    font-style: italic;
}

.archive-empty i {
    font-size: 3rem;
    color: #546e7a;
    margin-bottom: 20px;
    display: block;
}

.archive-empty h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    .archive-container {
        padding: 30px;
    }
    
    .years-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .minutes-dropdown {
        position: static;
        margin-top: 10px;
        border-radius: 8px;
        max-height: none;
        box-shadow: none;
        z-index: 10; /* Adjusted for mobile */
    }
    
    .year-item.active {
        z-index: 10; /* Adjusted for mobile */
    }
}

@media (max-width: 576px) {
    .years-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}