/* cookie  */
.cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #1e2a38;
    /* ваш тёмно-синий (primary_color) */
    color: #fff;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    z-index: 9999;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
    gap: 15px;
}

.cookie-notice__text a {
    color: #f28c28;
    /* ваш акцентный цвет */
    text-decoration: underline;
}

.cookie-notice__button {
    background: #f28c28;
    color: #1e2a38;
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.cookie-notice__button:hover {
    opacity: 0.9;
}

/* Скрытие плашки после принятия */
.cookie-notice.hidden {
    display: none;
}

:root {
    --primary: #1e3a8a;
    --primary-light: #2563eb;
    --accent: #e11d48;
    --text-dark: #0f172a;
    --text-muted: #475569;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    /* padding: 20px 20px 40px; */
    /* padding-bottom: 20px; */

    flex: 1;
    height: fit-content;
}

/* Messages */
.messages-box {
    margin-bottom: 20px;
}

.message {
    padding: 14px 20px;
    margin: 10px 0;
    border-radius: var(--radius-sm);
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
}

.message.success {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.message.error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.message.warning {
    background-color: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.message.info {
    background-color: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* Header Card */
.body {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 24px 32px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.navbar-1 .img img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-md);
    border: 3px solid #eff6ff;
}

.title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-align: center;
    line-height: 1.3;
    flex: 1;
    letter-spacing: -0.02em;
}

.navbar-2 {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Auth & Menu buttons */
.dropbtn {
    background: #f1f5f9;
    color: var(--text-dark);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.dropbtn:hover {
    background: var(--primary);
    color: #ffffff;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.dropbtn a {
    display: block;
    width: 100%;
    height: 100%;
}

.navbar-2 .dropbtn {
    background: #e2e8f0;
}

.navbar-2 .dropbtn:hover {
    background: var(--accent);
    color: #ffffff;
}

/* Menu Area */
.box-menu {
    padding-top: 20px;
}

.mobile-menu-header {
    display: none;
}

.menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.title-2 {
    display: none;
}

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

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-card);
    min-width: 180px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-sm);
    z-index: 100;
    padding: 8px;
    border: 1px solid var(--border-color);
    margin-top: 1px;
}

.dropdown-content a {
    padding: 10px 14px;
    display: block;
    border-radius: 6px;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.9rem;
}

.dropdown-content a:hover {
    background-color: #eff6ff;
    color: var(--primary-light);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown:hover .dropbtn {
    background: var(--primary);
    color: #ffffff;
}

/* Content Container */
.content {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 36px 40px;
    min-height: 60vh;
}

/* Footer */
.site-footer {
    background-color: #0f172a;
    padding: 24px 20px;
    font-size: 0.9rem;
    color: #94a3b8;
    text-align: center;
    width: 100%;
    margin-top: auto;

}

.site-footer p {
    margin: 0;
}

/* Telegram reg button inside comments if needed */
.telegram-register {
    background-color: #0088cc;
    color: #ffffff !important;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
}

/* Cards system for materials & results */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #bfdbfe;
}

.card__title {
    margin: 0 0 12px;
    font-size: 1.15rem;
}

.card__title a {
    color: var(--primary);
    font-weight: 700;
}

.card__title a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.card__link {
    display: inline-block;
    margin-bottom: 12px;
    color: #0284c7;
    font-weight: 600;
}

.card__date {
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid #e2e8f0;
    padding-top: 10px;
    text-align: right;
}

/* Responsive Media Queries (Tablets and Mobiles) */
@media (max-width: 940px) {
    .body {
        padding: 20px;
    }

    .navbar {
        flex-direction: column;
        text-align: center;
        gap: 14px;
    }

    .title {
        font-size: 1.3rem;
        margin: 5px 0;
    }

    .content {
        padding: 24px 20px;
    }

    /* Burger Menu Header */
    .mobile-menu-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: #1e3a8a;
        color: #ffffff;
        padding: 14px 20px;
        border-radius: var(--radius-sm);
        cursor: pointer;
        user-select: none;
        margin-bottom: 12px;
        box-shadow: var(--shadow-sm);
        transition: background-color 0.2s;
    }

    .mobile-menu-header:hover {
        background: #1d4ed8;
    }

    .mobile-menu-label {
        font-weight: 700;
        font-size: 1.05rem;
        letter-spacing: 0.3px;
    }

    .burger-btn {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 18px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
    }

    .burger-line {
        width: 100%;
        height: 2.5px;
        background-color: #ffffff;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .burger-btn.is-active .burger-line:nth-child(1) {
        transform: translateY(7.5px) rotate(45deg);
    }

    .burger-btn.is-active .burger-line:nth-child(2) {
        opacity: 0;
    }

    .burger-btn.is-active .burger-line:nth-child(3) {
        transform: translateY(-7.5px) rotate(-45deg);
    }

    /* Nav Menu Collapsed & Expanded */
    .menu {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, opacity 0.25s ease;
    }

    .menu.is-open {
        max-height: 800px;
        opacity: 1;
        padding-bottom: 16px;
    }

    .dropbtn {
        width: 100%;
        padding: 4px 8px;
        font-size: 1rem;
        text-align: center;
    }

    .dropdown {
        width: 100%;
        text-align: center;
    }

    .dropdown-content {
        display: none;
        position: static;
        width: 100%;
        box-shadow: none;
        background: #e2e8f0;
        margin-top: 6px;
        border-radius: 8px;
    }

    .dropdown.dropdown-open .dropdown-content,
    .dropdown:hover .dropdown-content {
        display: block;
    }
}

@media (max-width: 600px) {
    .title {
        display: block;
        text-align: center;
        font-size: 1rem;
        font-weight: 800;
        color: var(--primary);
        margin-top: 8px;
        line-height: 1;
    }

    .navbar-2 {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }

    .navbar-2 .dropbtn {
        padding: 4px;
    }
}