/* Стили для страницы "О LED-экранах" */
.led-intro-section {
    background: linear-gradient(135deg, #f8f9ff 0%, #fff8f5 100%);
    position: relative;
    overflow: hidden;
}

.led-intro-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.intro-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.intro-with-icon {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.intro-icon {
    width: 300px;
    height: auto;
    flex-shrink: 0;
    animation: ledPulse 3s ease-in-out infinite;
}

.intro-text-wrapper {
    flex: 1;
}

.intro-text-wrapper .intro-text + .intro-text {
    margin-top: 1rem;
}

/* Ключевые характеристики */
.key-characteristics-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    width: calc(100% + 28rem);
    margin-left: -14rem;
}

.key-characteristic-item {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    border-left: 4px solid var(--p-brand);
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.key-characteristic-icon, .factor-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.key-characteristic-content, .factor-content { flex: 1; }
.key-characteristic-content h3, .factor-item h4 {
    font-size: 1.2rem;
    color: var(--p-text-700);
    margin-bottom: 0.8rem;
}

@keyframes ledPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.05); }
}

/* Общие стили для заголовков секций */
.selection-guide-section h2,
.comparison-table-section h2,
.advantages-section h2,
.faq-section h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 2.5rem;
    color: var(--p-text-700);
}
.advantages-section h2 { margin-bottom: 3rem; }

.intro-with-icon .intro-text {
    margin-bottom: 0;
    flex: 1;
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--p-text-600);
    margin-bottom: 1.5rem;
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.intro-text strong {
    color: var(--p-text-700);
    font-weight: 600;
}

/* Дополнительные описания для типов экранов */
.screen-type .type-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--p-text-500);
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

/* Секция "Как выбрать экран" */
.selection-guide-section {
    background: white;
    padding: 3rem 0;
}

.selection-intro {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--p-text-600);
    margin-bottom: 2.5rem;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.selection-factors {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2.5rem;
    width: calc(100% + 25rem);
    margin-left: -12.5rem;
}

.factor-item {
    background: var(--p-bg-alt);
    padding: 2rem;
    border-radius: 15px;
    border-left: 4px solid var(--p-brand);
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}
.factor-item p, .key-characteristic-content p {
    color: var(--p-text-600);
    line-height: 1.6;
    font-size: 0.95rem;
}

.selection-tip {
    background: linear-gradient(135deg, #fff8e1 0%, #fffbf0 100%);
    padding: 1.5rem 2rem;
    border-radius: 15px;
    border-left: 4px solid #ffc107;
    max-width: 900px;
    margin: 0 auto;
}

.selection-tip p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--p-text-700);
    margin: 0;
}

.selection-tip a {
    color: var(--p-brand);
    text-decoration: underline;
    font-weight: 500;
}

.selection-tip a:hover {
    color: var(--p-brand-2);
}

/* Расширение для типов экранов */
.screen-types--wide {
    width: calc(100% + 25rem);
    margin-left: -12.5rem;
}

/* Сетка областей применения */
.applications-grid {
    gap: 1.5rem;
    grid-template-columns: repeat(4, 1fr);
}

.applications-grid .screen-type {
    padding: 1.5rem 1.5rem;
    min-width: 330px;
    max-width: 330px;
    justify-self: center;
}

/* Секция таблицы сравнения */
.comparison-table-section {
    background: var(--p-bg-alt);
    padding: 3rem 0;
}

.table-wrapper {
    overflow-x: auto;
    margin-bottom: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.comparison-table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.comparison-table thead {
    background: linear-gradient(135deg, var(--p-brand) 0%, var(--p-brand-2) 100%);
    color: white;
}

.comparison-table th {
    padding: 1.2rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comparison-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.2s ease;
}

.comparison-table tbody tr:hover {
    background: #f8f9ff;
}

.comparison-table tbody tr:last-child {
    border-bottom: none;
}

.comparison-table td {
    padding: 1.2rem 1rem;
    color: var(--p-text-600);
}

.comparison-table td strong {
    color: var(--p-brand);
    font-weight: 600;
}

.table-note {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--p-text-600);
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

.table-note a {
    color: var(--p-brand);
    text-decoration: none;
    font-weight: 500;
}

.table-note a:hover {
    text-decoration: underline;
}

/* Секция преимуществ */
.advantages-section {
    background: white;
    padding: 3rem 0;
}
.advantages-grid {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    width: calc(100% + 25rem);
    margin-left: -12.5rem;
}

.advantage-item {
    background: var(--p-bg-alt);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid var(--p-brand);
    flex: 0 0 360px;
    width: 360px;
}

.advantage-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.advantage-icon {
    font-size: 2.5rem;
}

.advantage-item h4 {
    font-size: 1.1rem;
    color: var(--p-text-700);
    margin-bottom: 0.8rem;
}

.advantage-item p {
    color: var(--p-text-500);
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Анимация появления элементов */
.advantage-item--shown, .faq-item--shown {
    animation: fadeInUp 0.5s ease-out;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* FAQ секция */
.faq-section {
    background: var(--p-bg-alt);
    padding: 2.5rem 0;
}
.faq-accordion {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease;
}

/* Скрытие вопросов FAQ */
.faq-item--hidden { display: none; }

.faq-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

.faq-question {
    width: 100%;
    background: white;
    border: none;
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--p-text-700);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.faq-question:hover {
    background: #f8f9ff;
}

.faq-question:focus {
    outline: 2px solid var(--p-brand);
    outline-offset: -2px;
}

.faq-icon {
    font-size: 0.8rem;
    color: var(--p-brand);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 2rem;
}

.faq-item.active .faq-answer {
    max-height: 1000px;
    padding: 1.5rem 2rem 2rem;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer p {
    color: var(--p-text-600);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer ol {
    color: var(--p-text-600);
    line-height: 1.7;
    padding-left: 1.5rem;
}

.faq-answer li {
    margin-bottom: 0.5rem;
}

.faq-answer strong {
    color: var(--p-brand);
    font-weight: 600;
}

/* Кнопка раскрытия FAQ */
.faq-toggle-wrapper {
    text-align: center;
    margin-top: 2rem;
}

.btn-toggle-faq {
    background: var(--p-brand);
    color: white;
    border: none;
    padding: 0.9rem 2rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-toggle-faq:hover {
    background: var(--p-brand-2);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-toggle-faq .toggle-icon {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.btn-toggle-faq.expanded .toggle-icon {
    transform: rotate(180deg);
}

/* ========================================
   Оглавление, Прогресс-бар, Кнопка "Наверх"
   ======================================== */

/* Выпадающее оглавление в навигации */
.nav-item-with-dropdown {
    position: relative;
}

.nav-dropdown-toc {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0.5rem;
    background: white;
    border: 2px solid var(--p-brand);
    border-radius: 12px;
    padding: 1.5rem;
    min-width: 280px;
    max-width: 320px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.25);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.nav-item-with-dropdown:hover .nav-dropdown-toc {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.nav-dropdown-toc:hover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.toc-dropdown-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--p-text-700);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--p-brand);
    text-align: center;
}

.toc-dropdown-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-dropdown-list li {
    margin-bottom: 0.5rem;
}

.toc-dropdown-link {
    display: block;
    padding: 0.6rem 0.75rem;
    color: #4a5568 !important;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.toc-dropdown-link:hover {
    background: var(--p-brand);
    color: white !important;
    border-left-color: var(--p-brand-2);
    transform: translateX(3px);
}

.toc-dropdown-link.active {
    background: linear-gradient(135deg, var(--p-brand) 0%, var(--p-brand-2) 100%);
    color: white !important;
    font-weight: 600;
}

/* Индикатор прогресса чтения */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--p-brand) 0%, var(--p-brand-2) 100%);
    z-index: 9999;
    transition: width 0.1s ease-out;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.advantages-toggle-wrapper {
    text-align: center;
    margin-top: 2rem;
    display: none; /* Скрыта на широких экранах */
}

.btn-toggle-advantages {
    background: var(--p-brand);
    color: white;
    border: none;
    padding: 0.9rem 2rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-toggle-advantages:hover {
    background: var(--p-brand-2);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-toggle-advantages .toggle-icon {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.btn-toggle-advantages.expanded .toggle-icon {
    transform: rotate(180deg);
}

/* Кнопка "Наверх" */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--p-brand);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--p-brand-2);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* Плавная прокрутка */
html {
    scroll-behavior: smooth;
}

/* Отступ для якорных ссылок (компенсация фиксированной шапки) */
.led-intro-section,
.screen-types-section,
.selection-guide-section,
.comparison-table-section,
.advantages-section,
.faq-section {
    scroll-margin-top: 80px;
}

/* Утилитарные классы для заголовков секций */
.section-heading {
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.section-heading-large {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.section-heading-red {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: #e74c3c;
}

/* Утилитарные классы для сеток */
.advantages-grid-flex {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.disadvantage-item {
    border-left: 3px solid #e74c3c;
    flex: 0 0 360px;
    width: 360px;
}

.applications-grid-centered {
    justify-content: center;
}

/* Утилитарный класс для скрытия элементов */
.toggle-text-hide {
    display: none;
}
