/* =========================================================
   МалышАги — общий файл стилей для всех страниц сайта
   ========================================================= */

/* ---------- Base reset ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

:focus-visible {
    outline: 3px solid #f59e0b;
    outline-offset: 2px;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ---------- Header ---------- */
.header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    gap: 20px;
    position: relative;
}

.logo {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: none;
    white-space: nowrap;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav a {
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav a:hover {
    color: #fbbf24;
}

/* Гамбургер-кнопка (скрыта на десктопе) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fbbf24;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero (главная страница) ---------- */
.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    color: white;
    padding: 90px 0;
    margin-bottom: 60px;
    border-radius: 0 0 40px 40px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -80px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.18) 0%, rgba(251, 191, 36, 0) 70%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    max-width: 680px;
}

.hero h1 {
    font-size: 52px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero p {
    font-size: 20px;
    opacity: 0.9;
    max-width: 600px;
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #0f172a;
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.35);
}

/* ---------- Section titles ---------- */
.section-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    color: #0f172a;
}

.section-subtitle {
    color: #64748b;
    font-size: 17px;
    margin-bottom: 40px;
    max-width: 640px;
}

/* ---------- Articles grid (главная) ---------- */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
    margin-bottom: 80px;
    scroll-margin-top: 100px;
}

.article-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.card-image-wrap {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #e2e8f0;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-card:hover .card-image {
    transform: scale(1.05);
}

.card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-category {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #f59e0b;
    font-weight: 600;
    margin-bottom: 12px;
}

.card-title {
    font-size: 21px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.card-excerpt {
    color: #64748b;
    font-size: 15px;
}

/* ---------- About section (главная) ---------- */
.about {
    scroll-margin-top: 100px;
    margin-bottom: 80px;
}

.about-inner {
    background: white;
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 48px;
    align-items: center;
}

.about-text p {
    color: #475569;
    font-size: 17px;
    margin-bottom: 16px;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.about-stat {
    background: #f8fafc;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

.about-stat strong {
    display: block;
    font-size: 32px;
    color: #f59e0b;
    margin-bottom: 6px;
}

.about-stat span {
    color: #64748b;
    font-size: 14px;
}

/* ---------- Article page layout ---------- */
.content-wrapper {
    display: flex;
    gap: 48px;
    margin: 60px 0;
    align-items: flex-start;
}

main {
    flex: 2;
    min-width: 0;
}

aside {
    flex: 1;
    min-width: 0;
    position: sticky;
    top: 100px;
}

.breadcrumbs {
    font-size: 14px;
    color: #64748b;
    margin: 24px 0 0;
}

.breadcrumbs a {
    color: #64748b;
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: #f59e0b;
}

.article-header h1 {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}

.article-meta {
    color: #64748b;
    margin-bottom: 30px;
    font-size: 14px;
}

.article-image {
    width: 100%;
    border-radius: 24px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

article h2 {
    font-size: 28px;
    margin: 40px 0 20px;
    font-weight: 600;
    color: #0f172a;
}

article h3 {
    font-size: 22px;
    margin: 30px 0 15px;
    font-weight: 600;
    color: #0f172a;
}

article p {
    margin-bottom: 20px;
    font-size: 18px;
    color: #334155;
}

article ul,
article ol {
    margin: 20px 0 20px 30px;
}

article li {
    margin-bottom: 10px;
    font-size: 18px;
    color: #334155;
}

article strong {
    color: #0f172a;
}

/* ---------- Content boxes used inside articles ---------- */
.tip-box {
    background: #fef3c7;
    border-left: 5px solid #f59e0b;
    padding: 20px;
    border-radius: 16px;
    margin: 25px 0;
}

.checklist {
    background: #ecfdf5;
    padding: 24px;
    border-radius: 20px;
    margin: 30px 0;
}

.checklist li {
    list-style: none;
    margin-bottom: 12px;
}

.checklist li::before {
    content: "✓ ";
    color: #10b981;
    font-weight: bold;
}

.strategy-box {
    background: #eff6ff;
    padding: 20px;
    border-radius: 20px;
    margin: 20px 0;
}

.exercise-card,
.game-card,
.product-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.exercise-card strong {
    color: #f59e0b;
    font-size: 20px;
}

.product-card {
    border-left: 5px solid #f59e0b;
    margin-bottom: 25px;
}

/* ---------- Sidebar ---------- */
.sidebar-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.sidebar-card h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #0f172a;
}

.sidebar-links a {
    display: block;
    padding: 12px 0;
    color: #1e293b;
    text-decoration: none;
    border-bottom: 1px solid #e2e8f0;
    transition: color 0.3s;
}

.sidebar-links a:last-child {
    border-bottom: none;
}

.sidebar-links a:hover {
    color: #f59e0b;
}

.newsletter-box {
    background: #f1f5f9;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

/* ---------- Footer ---------- */
.footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 60px 0 30px;
    margin-top: 60px;
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-col p {
    font-size: 14px;
    line-height: 1.6;
}

.footer a {
    color: #94a3b8;
    text-decoration: none;
    display: block;
    margin-bottom: 12px;
    transition: color 0.3s;
}

.footer a:hover {
    color: #fbbf24;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #1e293b;
    font-size: 14px;
}

/* =========================================================
   Адаптивность
   ========================================================= */

@media (max-width: 1024px) {
    .about-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .content-wrapper {
        flex-direction: column;
    }

    aside {
        position: static;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .hero {
        padding: 60px 0;
        border-radius: 0 0 28px 28px;
    }

    .hero h1 {
        font-size: 34px;
    }

    .hero p {
        font-size: 17px;
    }

    .section-title {
        font-size: 28px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .about-inner {
        padding: 32px 24px;
    }

    .article-header h1 {
        font-size: 30px;
    }

    article p,
    article li {
        font-size: 16px;
    }

    /* Мобильное меню */
    .nav-toggle {
        display: flex;
    }

    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #0f172a;
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        border-radius: 0 0 16px 16px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    }

    .nav.is-open {
        max-height: 300px;
    }

    .nav a {
        padding: 16px 24px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
    }

    .about-stats {
        grid-template-columns: 1fr 1fr;
    }
}
