:root {
    --primary: #007bff;
    --secondary: #0284c7;
    --background: #f8f9fa;
    --border: #09d5f0;
    --text: #2d3748;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Базові стилі */
.collapsible-container {
    background: #fff;
    border-radius: 14px;
    margin: 5px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
}

/* Стилі для текстових елементів */
.collapsible-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    cursor: pointer;
}


.collapsible-header i {
    width: 24px;
    text-align: center;
    margin-right: 12px;
    color: var(--primary);
    font-size: 1.1em;
}


.collapsible-header h2 {
    margin: 10px;
    font-size: 1.4em;
    color: #2c3e50;
}


/* Контейнер для тексту */
.header-content {
    display: flex;
    flex-direction: column;
}

/* Уніфікований стиль для всього тексту */
.specialty,
.opp {
    font-weight: 600;
    line-height: 1.2;
    text-align: left;
    margin: 0;
}

/* Стиль для спеціальності */
.specialty {
    color: #1a202c; /* Глибокий темний колір для серйозності */
    font-size: 1.3em;
    letter-spacing: 0.5px;
}

/* Стиль для ОПП */
.opp {
    font-size: 1.1em;
    color: #4a5568;
    font-weight: 500;
    border-left: 3px solid #3182ce; /* Бордер не довший за текст */
    padding: 4px 14px;
    margin-top: 3px;
    display: inline-block; /* Фіксує ширину по контенту */
    background: rgba(49, 130, 206, 0.08);
    border-radius: 10px;
    line-height: 1.4;
    max-width: fit-content; /* Обмежує довжину фону під текст */
    transition: background 0.3s ease-in-out, border-color 0.3s ease-in-out;
}

/* Акценти */
.spec-name {
    color: #0727ad;
    font-weight: 700;
}


/* Ефект при наведенні */
.opp:hover {
    background: rgba(49, 130, 206, 0.15);
    border-color: #2b6cb0;
}

/* Індикатор */
.indicator {
    width: 24px;
    height: 24px;
    position: relative;
    transition: transform 0.3s var(--ease);
}

.indicator::before,
.indicator::after {
    content: '';
    position: absolute;
    background: var(--primary);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s var(--ease);
}

.indicator::before {
    width: 14px;
    height: 2px;
}

.indicator::after {
    width: 2px;
    height: 14px;
}

h2.collapsible {
    font-size: 1.4rem;
    text-align: left;
}

h2.small-heading {
  font-size: 1rem;
}

/* Активний стан */
.collapsible-container.active .indicator::after {
    opacity: 0;
}

.collapsible-container.active .indicator {
    transform: rotate(45deg);
}

/* Список - ЗАВЖДИ видимий */
.summary-list {
    list-style: none;
    text-align: left;
    padding: 8px 0;
    margin: 0 10px 12px 20px;
    padding-right: 5px;
    border-left: 3px solid var(--border);
    border-radius: 14px;
    background: #c9edff78;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;    
}

.summary-list li {
    cursor: pointer;
    padding: 10px 15px;
    font-size: 0.95rem;
    border-radius: 6px;
    margin: 5px 10px;
    background: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    position: relative;
    transition: all 0.2s ease;
    padding-left: 35px;
}

.summary-list li::before {
    content: "\f1c1";
    /* PDF-іконка */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #e74c3c;
    font-size: 0.9em;
}

.summary-list li:hover {
    background: #f0f8ff !important;
    transform: translateX(5px);
}

/* Вміст (PDF блоки) */
.de-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 32px;
}

.de-content.active {
    max-height: 60000px;
    opacity: 1;
    padding: 12px 0;
}


/* Вкладеність */
.collapsible-container.level-2 {
    margin-left: 15px;
    background: var(--background);
    border-left: 3px solid var(--primary);
}


/* Спеціальні елементи */
.special-highlight {
    background: #6aa2ffad !important;
    font-size: 12px;
    border: 1px solid #75d775;
    padding: 2px 8px !important;
    border-radius: 12px;
    font-weight: 600;
    margin-left: 3px;
    white-space: nowrap;    
    display: inline-block;    
}


/* Стилі перемикача */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-right: 10px;
    /* Відступ між тоглом і текстом */
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-indicator {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.toggle-indicator:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked+.toggle-indicator {
    background-color: #007bff;
}

input:checked+.toggle-indicator:before {
    transform: translateX(26px);
}

.break-mobile {
    display: inline; /* За замовчуванням у рядку */
}
/* Адаптив */

@media (max-width: 1200px) {
  h2.collapsible {
        font-size: 1.1rem;
    }
	
}


@media (max-width: 768px) {
    .summary-list {
        margin-left: 20px;
    }

    .summary-list li {
        transition: none !important;
    }

    .summary-list li:hover {
        background: white !important;
        transform: none !important;
    }

    .de-content {
        margin-left: 10px;
    }

    .special-highlight {
        font-size: 10px;
        padding: 1px 3px;
    }

    h2.collapsible {
        font-size: 0.95rem;
    }

    h2.small-heading {
	font-size: 0.8rem;
	}

    .collapsible-header {
        display: flex;
        align-items: center;
        padding: 12px;
        gap: 8px;
        position: relative;
    }

    /* Індикатор та іконка */
    .indicator,
    .collapsible-header i {
        flex-shrink: 0;
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Контентний блок */
    .header-content {
        flex: 1;
        min-width: 0; /* Дозволяє тексту переноситись */
        margin-left: 8px;
    }

    .header-content {
        flex: 1; /* Займає весь вільний простір */
        min-width: 0; /* Фікс для перенесення тексту */
    }

    .specialty {
        font-size: 1.1em;
        display: block;
        line-height: 1.3;
    }

    .opp {
        font-size: 0.95em;
        padding: 3px 10px; /* Корекція відступів */
        display: block !important;
        width: 100%;
        max-width: 100% !important;
        margin-left: 0 !important;
        box-sizing: border-box;
    }

    /* Вирівнювання елементів першого рівня */
    .collapsible-container:not(.level-2) .collapsible-header {
        padding-left: 8px; /* Єдиний відступ зліва */
    }

    /* Вирівнювання для вкладених рівнів */
    .level-2 .collapsible-header {
        padding-left: 28px; /* Фіксований відступ */
    }

    /* Фікс для довгих назв спеціальностей */
    .spec-name {
        display: block !important;
        word-break: break-word; /* Перенесення довгих слів */
        margin-top: 4px;
        margin-left: 0 !important;
    }

    .spec-number {
        font-size: 0.9em;   /* Зменшений розмір тексту */
        padding: 1px 4px;   /* Менші відступи */
    }

    .ui-accordion-header {
        font-size: 1.2em !important;
        margin-top: 8px !important;
        line-height: 1.3;
        padding: 0 10px;
        word-break: break-word;
    }

    .break-mobile {
        display: block; /* Переносимо на новий рядок */
        margin-top: 5px; /* Додаємо відступ для естетики */
    }
}


