/* =============================== */
/*         1. Переменные           */
/* =============================== */
:root {
    --primary-color: #1ED21E;
    --secondary-color: #6AEA6A;
    --accent-color-1: rgba(255,255,255,0.25);
    --accent-color-2: #A868F6;
    --light-color: #E5E5E5;
    --light-color-2: #c8c7c7;
    --dark-color: #000000;
    --duration-color: rgba(0, 247, 255, 0.9);

    --container-width: 1200px;
    --padding: 20px;
    --gap: 20px;
    --border-radius: 8px;
    --transition: 0.3s ease;
    --font-family: 'Machina_U', Arial, sans-serif;
}

/* =============================== */
/*           2. Шрифты             */
/* =============================== */
@font-face {
    font-family: 'Machina_U';
    src: url('/static/meetings/fonts/PPNeueMachina-InktrapRegular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;

}

body, h1, h2, h3, .section-title, .hero-title {
    font-family: var(--font-family);
    font-weight: 600;
}
.site-header {
    font-weight: 620;
}
.site-footer,.site-footer p {
    font-weight: 550;
}


/* =============================== */
/*   3. Сброс и базовая разметка   */
/* =============================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--dark-color) url("/static/meetings/img/Background.svg") center/cover no-repeat;
    color: var(--light-color);
    line-height: 1.6;
}

/* =============================== */
/*       4. Контейнер, layout      */
/* =============================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--padding);
}

/* =============================== */
/*         5. Шапка сайта          */
/* =============================== */
.site-header {
    background-color: rgba(10, 7, 48, 0.85);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--gap);
}
.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 38px;
}
.logo {
    width: 55px;
    height: 55px;
    object-fit: contain;
}
.logo-text {
    font-size: 1.5em;
    color: var(--light-color);
    padding-top: 15px;
    padding-bottom: 5px;
}

/* = Навигация = */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: var(--gap);
}
.main-nav a {
    color: var(--light-color);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}
.main-nav a:hover,
.main-nav a.active {
    background-color: var(--accent-color-2);
    color: var(--dark-color);
}

/* = Соц. иконки = */
.social-icons {
    display: flex;
    gap: 10px;
}
.social-icon {
    color: var(--light-color);
    text-decoration: none;
    font-size: 1.2em;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}
.social-icon:hover {
    background-color: var(--secondary-color);
    color: var(--dark-color);
}
/* Скрываем соцсети в основной навигации по умолчанию (показываем на мобильных через медиа) */
.main-nav .social-icons {
    display: none;
}

/* = Гамбургер = */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 32px;
    height: 26px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
}
.hamburger span {
    display: block;
    width: 100%;
    height: 4px;
    background: var(--light-color);
    border-radius: 2px;
    transition: all .25s;
}
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px,6px);
}
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px,-7px);
}

/* =============================== */
/*         6. Основной контент     */
/* =============================== */
.main-content {
    min-height: calc(100vh - 150px);
}

/* =============================== */
/*         7. Hero-секция          */
/* =============================== */
.hero-section,
.screen-2-section {
    background: transparent !important; /* Показываем SVG фон */
}

/* = Вёрстка hero = */
.hero-section {
    /* background уже прозрачен, SVG-фон виден */
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}
.hero-section .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap);
}
.hero-content {
    flex: 1;
    text-align: left;
    max-width: 780px;
    margin: 0 auto;
}
.hero-title {
    font-size: clamp(1.8rem, 4.4vw, 2.6rem);
    margin-bottom: 16px;
    color: var(--light-color);
    line-height: 1.2;
    text-align: left;
}
.hero-subtitle {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    margin-bottom: 20px;
    color: #c8c7c7;
    line-height: 1.6;
    text-align: left;
}
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    margin-left: -12px;
    justify-content: flex-start;
    gap: 12px;
}

/* = Кнопки = */
.btn {
    padding: 12px 24px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}
.btn-primary {
    background-color: var(--accent-color-2);
    color: var(--dark-color);
    border: 2px solid #ACA0E9;
}
.btn-primary:hover {
    background-color: var(--secondary-color);
    color: var(--dark-color);
}
.btn-secondary {
    background-color: transparent;
    color: var(--light-color);
    border: 2px solid #ACA0E9;
}
.btn-secondary:hover {
    background-color: var(--secondary-color);
    color: var(--dark-color);
}
.btn-xs {
    font-size: 0.9em;
    padding: 7px 13px;
}

/* = Анимация hero (матрица/точки) = */
.hero-image {
    flex: 1;
    position: relative;
    min-height: 260px;
    padding: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
}
.matrix-layers,
.virtual-region {
    position: relative;
    top: 0; left: 0;
    width: 100%; height: 360px;
    min-height: 360px;
    pointer-events: none;
    z-index: 1;
}
.matrix-pixel {
    position: absolute;
    width: 4px;
    height: 4px;
    background-color: #00f7ff;
    border-radius: 50%;
    opacity: 0.85;
    animation: matrixPulse 1.8s infinite ease-in-out;
}
.region-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: var(--primary-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes matrixPulse {
    0%, 100% { transform: scale(1); opacity: 0.85; }
    50% { transform: scale(1.6); opacity: 0.3; }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
}

/* =============================== */
/*        8. Экран 2: Расписание   */
/* =============================== */
.screen-2-section {
    padding: 60px 0;
}
.section-title {
    text-align: left;
    font-size: 1.8em;
    margin-bottom: 30px;
    color: var(--light-color);
}
.section-title.nearest {
    margin-bottom: 18px;
    font-size: 1.32em;
    color: var(--light-color);
    font-weight: bold;
}
.section-divider {
    width: 100%;
    height: 2px;
    background: rgba(255,255,255,.5);
    border-radius: 2px;
    margin: 30px 0 18px 0;
    border: none;
}
.section-subtitle {
    color: var(--light-color-2);
    margin-bottom: 11px;
    font-size: 1.13em;
}

/* = Блок расписания: карточки = */
.cards-container {
    display: grid;
    gap: 18px;
    margin-bottom: 16px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    justify-items: stretch;
}
.group-card {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.2) 75%, #14f614 120%);
    padding: 28px 26px;
    border-radius: 24px;
    border: 1px solid var(--accent-color-1);
    box-shadow: 0 6px 32px rgba(38,26,64,0.26);
    position: relative;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    transition: box-shadow .16s, transform .16s;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.group-card:hover {
    box-shadow: 0 12px 36px rgba(38,26,64,0.48), 0 0 0 2px var(--accent-color-2) inset;
    transform: scale(1.023);
    border-color: var(--accent-color-2);
}
.card-time {
    font-size: 1.6em;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 0 2px 16px var(--accent-color-2), 0 0 2px #000;
}
.card-group-and-meeting {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.card-group-name {
    font-size: 1.2em;
    font-weight: 900;
    color: aqua;
    padding: 3px;
    border-radius: 12px;
    text-shadow: 0 1px 5px var(--accent-color-1);
}
.card-meeting-name {
    font-size: 1em;
    font-weight: 600;
    color: #fff;
    opacity: 0.97;
    padding: 6px 10px;
    background: rgba(35,20,60,0.18);
    border-radius: 9px;
}
.card-platform {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(76,24,190,0.30);
    border: 2px solid rgba(76,24,190,0.95);
    margin-bottom: 9px;
    font-weight: 600;
    color: var(--secondary-color);
    text-decoration: none;
    transition: background 0.17s;
}
.card-platform:hover {
    color: #fff;
    background: var(--accent-color-2);
}
.card-theme {
    font-size: 1em;
    color: #fff;
    background: linear-gradient(95deg, rgba(160,104,246,0.12) 30%, rgba(76,24,190,0.16) 100%);
    margin-bottom: 8px;
    padding: 7px 14px;
    border-radius: 10px;
    border-left: 4px solid var(--accent-color-1);
    font-weight: 500;
}
.card-duration {
    font-size: .95em;
    font-weight: 500;
    color: var(--duration-color);
    margin-bottom: 3px;
    padding: 6px 13px;
    border-radius: 10px;
    border: solid 1px rgba(0, 255, 255, 0.15);
    letter-spacing: 0.01em;
}
.card-description {
    margin-top: 8px;
    color: var(--secondary-color);
    font-size: .98em;
}

/* =============================== */
/*      9. Табло "Сейчас идет"     */
/* =============================== */
.now-widget {
    background: rgba(17,27,38,0.93);
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(26,20,48,0.14);
    padding: 16px 22px;
    min-width: 251px;
    text-align: center;
}
.now-time {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 4px;
}
.now-label {
    color: var(--secondary-color);
    font-size: 0.99em;
}
.now-meeting {
    color: var(--light-color);
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 8px;
}

/* =============================== */
/*           10. Подвал            */
/* =============================== */
.site-footer {
    background-color: rgba(10, 7, 48, 0.6);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
}
.site-footer p {
    color: var(--light-color);
    font-size: 0.9em;
}

/* =============================== */
/*      11. Прочее/адаптивность    */
/* =============================== */

/* --- Элементы экрана 2 --- */
.schedule-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
}
.schedule-buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
}

/* ====== Медиазапросы (адаптив) ====== */
@media (max-width: 980px) {
    .group-card {
        padding: 18px 10px;
        font-size: 0.97em;
    }
    .card-theme, .card-group-name {
        font-size: 1em;
        padding: 4px 2px;
    }
}

@media (max-width: 900px) {
    .site-header .container { gap: 10px; }
    .desktop-only { display: none !important; }
    .logo-container { order: 1; }
    #hamburger-toggle { order: 2; margin-left: auto; }
    #main-nav { order: 3; }
    .main-nav ul { display: none; }
    .hamburger { display: flex !important; margin-left: auto; }
    .container { padding: 0 10px; }
    .hero-section { padding: 60px 0 40px; }
    .hero-section .container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        justify-content: flex-start;
    }
    .hero-image { width: 100%; min-height: 220px; padding: 0; }
    .matrix-layers, .virtual-region {
        height: 220px; min-height: 220px; width: 100%;
        left: 0; top: 0; position: relative;
    }
    .hero-content {
        width: 100%; max-width: 100%; text-align: left; margin: 0;
    }
    .hero-buttons { justify-content: flex-start; }
    .schedule-buttons {
        flex-direction: column;
        width: 100%;
        margin-bottom: 8px;
        justify-content: flex-start;
    }

    /* Стили для мобильного меню - ВНУТРИ ОДНОГО МЕДИАЗАПРОСА */
    .main-nav {
        display: flex;
        position: fixed;
        top: 0; right: -100%;
        width: 80vw; max-width: 350px; height: 100vh;
        background: var(--dark-color);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 80px 15px 30px 30px;
        transition: right 0.3s cubic-bezier(.4,0,.2,1);
        z-index: 1000;
        box-shadow: -8px 0 32px #0004;
    }
    .main-nav.active { right: 0; }
    .main-nav ul {
        display: flex;
        flex-direction: column;
        gap: 14px;
        width: 100%;
        padding: 0 10px;
    }
    .main-nav a {
        padding: 15px 14px;
        font-size: 1.1em;
    }
    .main-nav .social-icons {
        display: flex;
        gap: 12px;
        margin-top: 12px;
    }
}

@media (max-width: 768px) {
    .schedule-header-row {
        flex-direction: column;
        align-items: center;
    }
    .schedule-sidebar, .now-widget {
        width: 100%; max-width: 360px; margin: 35px auto 35px auto;
    }
}
@media (min-width: 501px) {
    .schedule-buttons { flex-direction: row; width: auto; }
}
@media (min-width: 800px) {
    /* cards-container уже адаптируется автофитом */
}
@media (max-width: 774px) {
    .screen-2-section .schedule-header-row {
        align-items: flex-start;
        justify-content: center;
    }
    .screen-2-section .schedule-buttons {
        justify-content: center;
    }
}
@media (max-width: 600px) {
    .hero-subtitle {
        font-size: 1.07rem !important;
    }
    .section-subtitle {
        font-size: 1.07rem !important;
    }
}
/*=======snow*/
#snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    background-color: white;
    border-radius: 50%;
    opacity: 0.8;
    box-shadow: 0 0 10px white;
    top: -10px; /* Начинаем чуть выше экрана */
}

@keyframes fall {
    to {
        transform: translateY(100vh);
    }
}
/*==================*/
.christmas-wreath {
    position: fixed;
    top: 100px;
    left: 20px;
    z-index: 9995;
    pointer-events: none;
    animation: wreathFloat 4s ease-in-out infinite;
}

.wreath {
    font-size: 50px;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.3));
    opacity: 0.8;
}

.ribbon {
    position: absolute;
    top: -10px;
    right: 10px;
    font-size: 30px;
    transform: rotate(30deg);
    animation: ribbonSway 3s ease-in-out infinite;
}

@keyframes wreathFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes ribbonSway {
    0%, 100% { transform: rotate(30deg); }
    50% { transform: rotate(40deg); }
}