.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none; /* Ховаємо за замовчуванням */
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 2000; /* Має бути вище за інші елементи */
    border-radius: 8px;
    overflow: hidden;
    /* Додаткові властивості з вашого коду вище */
    top: 100%; 
    left: 0;
    border: 1px solid #ddd;
}

/* Клас, який додає JavaScript для відкриття */
.show { display: block !important; }

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
}

.dropdown-content a:hover {
    background-color: #ffd700;
}
/* Навігація */
nav.main-nav { 
    background: var(--nav); 
    display: flex; 
    justify-content: center; 
    align-items: center;
    gap: 15px;
    padding: 15px 10px;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

/* Кнопки меню */
.nav-btn { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    height: 40px; 
    padding: 0 20px; 
    background-color: #6c757d; 
    color: white !important; 
    text-decoration: none; 
    border-radius: 8px; 
    font-size: 13px; 
    font-weight: 600; 
    text-transform: uppercase; 
    border: none; 
    cursor: pointer; 
    transition: all 0.2s ease;
    white-space: nowrap;
}
/* Стилі для відображення списку колективів після вибору в меню */
#collectives-display {
    margin-top: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
}

#collectives-display h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

#collectives-display ol {
    padding-left: 20px;
}

#collectives-display li {
    margin-bottom: 10px;
    line-height: 1.4;
}
/* Фон модального вікна (напівпрозорий) */
.modal-overlay {
    display: none; /* Спочатку сховано */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000; /* Вище за всі елементи */
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Контейнер вікна */
.modal-container {
    background: white;
    width: 100%;
    max-width: 800px;
    max-height: 90vh; /* Не більше 90% висоти екрану */
    border-radius: 15px;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    animation: modalAppear 0.3s ease-out;
}

/* Область з прокруткою всередині */
.modal-scrollable {
    padding: 30px;
    overflow-y: auto; /* Вмикаємо прокрутку тільки тут */
    flex-grow: 1;
}

/* Кнопка закриття (хрестик) */
.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 35px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    z-index: 3001;
    line-height: 1;
}

.modal-close:hover {
    color: #e67e22;
}

/* Анімація появи */
@keyframes modalAppear {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Стилізація тексту всередині модалки */
#modal-content-area h2 {
    color: #2c3e50;
    border-bottom: 2px solid #e67e22;
    padding-bottom: 10px;
    margin-top: 0;
}

#modal-content-area ol li {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    list-style-position: inside;
}
