/*
Theme Name: Менделеевская долина
Author: Вы
Description: Тема для сайта центра
Version: 1.0
Text Domain: mdolina
*/

/* ==================================================
   КОРПОРАТИВНЫЕ ЦВЕТА
   ================================================== */
:root {
    --orange-brand: #EC5C05;
    --teal-dark: #259096;
    --teal-light: #006B65;
    --blue-vr: #3784C8;
    --dark-vr: #000966;
    --gray-brand: #49494B;
    --bench-brown: #553506;
    --grass-green: #4F6117;
    --white: #FFFFFF;
    --light-bg: #F5F5F5;
    --border-light: #E0E0E0;
}

/* ==================================================
   БАЗОВЫЕ СТИЛИ
   ================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Calibri', 'Times New Roman', serif;
    background-color: var(--light-bg);
    color: var(--gray-brand);
    line-height: 1.6;
    font-size: 16px;
}

.container, .menu-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================================================
   СТИЛИ МЕНЮ (горизонтальное, над шапкой)
   ================================================== */

.top-menu-bar {
    width: 100%;
    background: linear-gradient(135deg, var(--teal-dark), var(--teal-light));
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1000;
}

.menu-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.horizontal-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-item {
    position: relative;
    margin: 0;
    padding: 0;
}

.menu-item > a {
    display: block;
    padding: 18px 20px;
    font-family: 'Calibri', sans-serif;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    color: var(--white);
}

/* Активный пункт (текущая страница) */
.menu-item.active > a {
    border-bottom-color: var(--orange-brand);
}

/* Обычные пункты при наведении */
.menu-item:not(.planned):not(.active) > a:hover {
    background-color: var(--white);
    color: var(--teal-dark);
    border-bottom-color: var(--orange-brand);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Активный пункт при наведении */
.menu-item.active > a:hover {
    background-color: var(--white);
    color: var(--teal-dark);
    border-bottom-color: var(--orange-brand);
    box-shadow: 0 4px 15px rgba(236, 92, 5, 0.3);
}

/* Планируемые проекты (неактивные) */
.menu-item.planned > a {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    background-color: rgba(0, 0, 0, 0.1);
    border-bottom: 3px dashed rgba(255, 255, 255, 0.3);
    position: relative;
    cursor: pointer;
}

.menu-item.planned > a:hover {
    color: var(--white);
    background-color: rgba(255, 255, 255, 0.15);
    border-bottom-color: var(--orange-brand);
    box-shadow: 0 4px 15px rgba(236, 92, 5, 0.2);
}

/* Подсказка для планируемых проектов */
.menu-item.planned > a::after {
    content: "⚡ скоро";
    font-size: 8px;
    text-transform: uppercase;
    position: absolute;
    top: 2px;
    right: 5px;
    background-color: var(--orange-brand);
    color: var(--white);
    padding: 2px 4px;
    border-radius: 3px;
    letter-spacing: 0.5px;
    font-weight: 600;
    opacity: 0.8;
    pointer-events: none;
}

/* Стрелка для пунктов с подменю */
.menu-item-has-children > a::after {
    content: " ▾";
    font-size: 14px;
    margin-left: 5px;
    opacity: 0.7;
}

/* Выпадающие подменю */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 250px;
    background-color: var(--white);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-radius: 0 0 8px 8px;
    padding: 10px 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.menu-item:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu li a {
    display: block;
    padding: 12px 20px;
    color: var(--gray-brand);
    font-family: 'Calibri', sans-serif;
    font-weight: 500;
    text-transform: none;
    font-size: 15px;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    border-left: 3px solid transparent;
}

.sub-menu li a:hover {
    background-color: rgba(37, 144, 150, 0.1);
    color: var(--teal-dark);
    border-left-color: var(--orange-brand);
}

.sub-menu li.planned a {
    color: #aaa;
    background-color: #f5f5f5;
    border-left: 3px dashed var(--teal-light);
}

.sub-menu li.planned a:hover {
    background-color: #e0e0e0;
    color: var(--gray-brand);
    border-left-color: var(--orange-brand);
}

/* ==================================================
   ШАПКА С ИЗОБРАЖЕНИЕМ И ЛОГОТИПОМ
   ================================================== */

.site-header {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Единый блок для изображений и видео */
.site-header img,
.site-header video {
    width: 100%;
    height: auto;
    display: block;
}

.site-header video {
    object-fit: cover; /* опционально */
}

.logo-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 10;
    max-width: 300px;
}

.logo-single {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* ==================================================
   ОСНОВНОЙ КОНТЕНТ
   ================================================== */

.content-row {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.main-content {
    flex: 2;
    min-width: 300px;
}

.sidebar {
    flex: 1;
    min-width: 250px;
}

/* Заголовки разделов */
.chapter-title {
    font-family: 'Calibri', sans-serif;
    font-size: 28px;
    font-weight: 500;
    border-left: 6px solid var(--orange-brand);
    padding-left: 20px;
    margin-bottom: 20px;
    color: var(--teal-dark);
}

.chapter p {
    margin-bottom: 20px;
    font-size: 18px;
    color: var(--gray-brand);
}

.chapter p strong {
    color: var(--orange-brand);
}

/* Цитаты */
.pull-quote {
    font-family: 'Calibri', serif;
    font-size: 24px;
    line-height: 1.4;
    color: var(--teal-light);
    font-style: italic;
    padding: 20px 30px;
    border-top: 1px solid var(--teal-dark);
    border-bottom: 1px solid var(--teal-dark);
    margin: 30px 0;
    text-align: center;
    font-weight: 300;
}

.quote-block {
    background-color: rgba(0, 107, 101, 0.05);
    padding: 40px 30px;
    border-radius: 20px;
    margin: 40px auto;
    max-width: 1200px;
    border-left: 6px solid var(--teal-dark);
    border-right: 6px solid var(--orange-brand);
}

.quote-text {
    font-family: 'Calibri', serif;
    font-size: 22px;
    line-height: 1.5;
    color: var(--dark-vr);
    margin-bottom: 15px;
    font-style: italic;
    font-weight: 300;
}

.quote-author {
    text-align: right;
    color: var(--teal-dark);
    font-weight: 500;
}

.epilogue {
    max-width: 800px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.epilogue-quote {
    font-family: 'Calibri', serif;
    font-size: 24px;
    font-style: italic;
    text-align: center;
    margin: 40px 0 20px;
    color: var(--teal-dark);
    font-weight: 300;
}

/* ==================================================
   КАРТОЧКИ ЛАБОРАТОРИЙ
   ================================================== */

.lab-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 102, 0.08);
    margin-bottom: 25px;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border-light);
}

.lab-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(236, 92, 5, 0.15);
    border-color: var(--orange-brand);
}

.lab-image {
    height: 100px;
    background-size: cover;
    background-position: center;
}

/* Цвета для карточек лабораторий */
.lab-card.it .lab-image { background-color: var(--teal-dark); }
.lab-card.science .lab-image { background-color: var(--blue-vr); }
.lab-card.kulibin .lab-image { background-color: var(--orange-brand); }
.lab-card.taste .lab-image { background-color: var(--grass-green); }
.lab-card.hydroponics .lab-image { background-color: var(--bench-brown); }
.lab-card.space .lab-image { background-color: var(--teal-light); }

.lab-content {
    padding: 20px;
}

.lab-title {
    font-family: 'Calibri', sans-serif;
    font-size: 22px;
    margin-bottom: 10px;
    color: var(--teal-dark);
    font-weight: 500;
}

.lab-desc {
    font-size: 15px;
    color: var(--gray-brand);
}

/* ==================================================
   ТАБЛИЦА ФАКТОВ
   ================================================== */

.fact-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 102, 0.08);
    margin: 30px 0;
}

.fact-table td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-light);
}

.fact-table tr:last-child td {
    border-bottom: none;
}

.fact-table td:first-child {
    font-weight: 600;
    color: var(--orange-brand);
    width: 40%;
    background-color: rgba(37, 144, 150, 0.05);
}

.fact-table td:last-child {
    color: var(--gray-brand);
}

/* ==================================================
   БЛОК СТАТИСТИКИ
   ================================================== */

.stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 30px 0;
}

.stat-item {
    flex: 1 1 150px;
    background-color: var(--white);
    padding: 25px 15px;
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 102, 0.05);
    border: 1px solid var(--border-light);
}

.stat-number {
    font-family: 'Calibri', sans-serif;
    font-size: 42px;
    font-weight: 400;
    color: var(--orange-brand);
    line-height: 1;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 16px;
    color: var(--teal-dark);
    font-weight: 500;
}

/* ==================================================
   РАДИО-КАРТОЧКА
   ================================================== */

.radio-card {
    background: linear-gradient(135deg, var(--dark-vr) 0%, #000033 100%);
    padding: 20px;
    border-radius: 12px;
    margin-top: 30px;
    border: 1px solid var(--blue-vr);
}

.radio-card h4 {
    font-family: 'Calibri', sans-serif;
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--blue-vr);
}

.radio-card p {
    color: var(--white);
    margin-bottom: 15px;
}

.radio-card strong {
    color: var(--blue-vr);
}

.radio-badge {
    background-color: var(--orange-brand);
    color: var(--white);
    padding: 10px;
    text-align: center;
    border-radius: 8px;
    font-size: 14px;
    letter-spacing: 1px;
    font-family: 'Calibri', sans-serif;
}

/* ==================================================
   ПОДВАЛ
   ================================================== */

.footer {
    background: linear-gradient(135deg, var(--teal-dark), var(--teal-light));
    color: var(--white);
    padding: 40px 20px;
    margin-top: 60px;
}

.footer a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover {
    color: var(--orange-brand);
    text-decoration: underline;
}

/* ==================================================
   ВСПОМОГАТЕЛЬНЫЕ КЛАССЫ ДЛЯ ТАБЛИЦ
   ================================================== */

.content-row table td[align="top"],
.photo-text-cell {
    vertical-align: top;
    padding-left: 20px;
}

/* ==================================================
   АДАПТИВНОСТЬ (только корректировка размеров)
   ================================================== */

@media (max-width: 992px) {
    .menu-item > a {
        padding: 15px 12px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .logo-overlay {
        left: 50%;
        transform: translateX(-50%);
        bottom: 15px;
        max-width: 200px;
        width: 80%;
    }

    .content-row {
        flex-direction: column;
    }

    .stats-grid {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .chapter-title {
        font-size: 24px;
    }

    .pull-quote, .quote-text, .epilogue-quote {
        font-size: 20px;
    }

    .stats-grid {
        flex-direction: column;
        align-items: center;
    }

    .stat-item {
        width: 100%;
    }
}
/* ==================================================
   МОБИЛЬНОЕ МЕНЮ (БУРГЕР)
   ================================================== */

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-toggle span {
    width: 30px;
    height: 3px;
    background: var(--white);
    border-radius: 3px;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        margin: 10px 0;
    }

    .horizontal-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background: linear-gradient(135deg, var(--teal-dark), var(--teal-light));
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 1000;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        padding: 10px 0;
    }

    .horizontal-menu.active {
        display: flex;
    }

    .menu-item {
        width: 100%;
        text-align: left;
    }

    .menu-item > a {
        padding: 12px 20px;
        white-space: normal;
        font-size: 14px;
    }

    .menu-item-has-children > a::after {
        content: " ▼";
        float: right;
    }

    .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 20px;
        background-color: rgba(255,255,255,0.1);
    }

    .menu-item.planned > a::after {
        position: static;
        margin-left: 8px;
        display: inline-block;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
}