/* styles.css — полностью обновленная версия */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

:root {
    --bg-light: #f0f4fa;
    --white: #ffffff;
    --primary: #0b2b44;
    --primary-light: #1f4b70;
    --primary-dark: #051e2f;
    --text-dark: #1a2b3c;
    --text-soft: #2c3e50;
    --border-pale: #cbd6e6;
    --shadow-sm: 0 4px 12px rgba(0,20,40,0.05);
    --shadow-hover: 0 10px 25px rgba(0,35,70,0.1);
    --accent-blue: #e3ecf7;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========== НОВАЯ ВЕРХНЯЯ ПАНЕЛЬ ========== */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

/* Логотип */
.logo {
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s;
}

.logo:hover {
    transform: scale(1.02);
}

.logo span {
    font-size: 2rem;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

/* ========== ДЕСКТОПНОЕ МЕНЮ ========== */
.desktop-menu {
    display: flex;
    gap: 0.5rem;
}

.menu-item {
    position: relative;
}

.menu-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.7rem 1.2rem;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.menu-button:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.menu-button i {
    font-size: 1.2rem;
}

/* Выпадающее меню */
.submenu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 220px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1001;
}

.menu-item:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu a {
    display: block;
    padding: 0.8rem 1.5rem;
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.submenu a:hover {
    background: var(--accent-blue);
    border-left-color: var(--primary);
    padding-left: 2rem;
}

/* ========== МОБИЛЬНОЕ МЕНЮ (бургер) ========== */
.mobile-menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.5rem;
    padding: 0.5rem 1rem;
    border-radius: 40px;
    cursor: pointer;
    align-items: center;
    gap: 8px;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
}

.mobile-menu {
    display: none;
    width: 100%;
    background: var(--primary-dark);
    margin-top: 1rem;
    border-radius: 20px;
    padding: 0.5rem;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu-item {
    width: 100%;
}

.mobile-menu-button {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 1rem;
    text-align: left;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.3rem;
}

.mobile-menu-button i {
    font-size: 1.3rem;
}

.mobile-submenu {
    display: none;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
}

.mobile-submenu.active {
    display: block;
}

.mobile-submenu a {
    display: block;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s;
}

.mobile-submenu a:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* основной контейнер */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    flex: 1;
}

/* главная страница */
.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-soft);
    max-width: 700px;
    margin: 0 auto;
}

/* карточки */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1.8rem;
    margin: 2rem 0;
}

.card {
    background: var(--white);
    border-radius: 28px;
    padding: 1.8rem 1.2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    border: 1px solid rgba(255,255,255,0.6);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card h3 {
    font-size: 1.7rem;
    margin-bottom: 0.6rem;
    color: var(--primary);
}

.card p {
    color: #2c3e50;
    margin-bottom: 1.4rem;
}

.card-link {
    text-decoration: none;
    font-weight: 600;
    color: var(--primary-light);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.card-link:hover {
    border-bottom-color: var(--primary-light);
}

/* страницы памяток */
.memo-page h2 {
    font-size: 2.3rem;
    font-weight: 650;
    color: var(--primary);
    border-bottom: 4px solid var(--primary);
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

.memo-section {
    background: var(--white);
    border-radius: 30px;
    padding: 1.8rem 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border-left: 8px solid var(--primary);
}

.memo-section h3 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 1.2rem;
}

.memo-section ul {
    margin-left: 1.8rem;
}

.memo-section li {
    margin-bottom: 0.6rem;
    font-size: 1.05rem;
}

.back-home {
    display: inline-block;
    margin-top: 2rem;
    background: var(--white);
    padding: 0.8rem 1.8rem;
    border-radius: 40px;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border-pale);
    transition: background 0.2s;
}

.back-home:hover {
    background: var(--accent-blue);
}

/* footer */
footer {
    background: var(--primary);
    color: rgba(255,255,255,0.8);
    text-align: center;
    padding: 1.2rem;
    font-size: 0.95rem;
    margin-top: 2.5rem;
}

/* ========== АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ ========== */
@media (max-width: 768px) {
    .desktop-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .header-container {
        padding: 0.8rem 1rem;
    }
    
    .logo {
        font-size: 1.6rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .info-cards {
        grid-template-columns: 1fr;
    }
    
    .memo-page h2 {
        font-size: 1.8rem;
    }
    
    .memo-section {
        padding: 1.2rem;
    }
    
    .memo-section h3 {
        font-size: 1.4rem;
    }
}