*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #fff8f0;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

/* NAVBAR */
.navbar {
    background-color: #ff6b35;
    border-bottom: 2px solid #d84315;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    gap: 12px;
}

.navbar-brand {
    font-weight: 700;
    font-size: 18px;
    white-space: nowrap;
    color: #ffffff;
}

.navbar-brand span {
    color: #fff8f0;
}

/* Бургер-меню */
.burger-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 100;
}

.burger-btn span {
    width: 25px;
    height: 3px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.burger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

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

.burger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.navbar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 14px;
}

.navbar-link {
    padding: 6px 12px;
    border-radius: 6px;
    color: #ffffff;
    transition: background-color 0.15s ease;
    font-weight: 500;
}

.navbar-link:hover {
    background-color: rgba(255,255,255,0.2);
}

/* HEADER / HERO */
.hero {
    background: linear-gradient(135deg, #ff8c42 0%, #ff6b35 100%);
    border-bottom: 2px solid #d84315;
    color: #ffffff;
}

.hero-inner {
    padding: 32px 0 24px;
    text-align: center;
}

.hero-heading {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

h1 {
    font-size: 26px;
    line-height: 1.3;
    font-weight: 800;
    color: #ffffff;
}

.hero-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
}

/* CTA кнопка - по центру */
.cta-wrapper {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 999px;
    background: #ffffff;
    color: #ff6b35;
    font-weight: 700;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.cta-button:active {
    transform: translateY(0);
}

/* Основной контент */
.main {
    flex: 1;
    padding: 24px 0 40px;
}

.layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

/* Table of contents - сверху */
.toc {
    background-color: #fff8f0;
    border-radius: 12px;
    border: 2px solid #ff6b35;
    padding: 20px;
    margin-bottom: 24px;
}

.toc-title {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 12px;
    color: #d84315;
}

.toc-list {
    list-style: none;
    font-size: 14px;
    display: grid;
    gap: 8px;
}

.toc-item {
    padding-left: 16px;
    position: relative;
}

.toc-item::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #ff6b35;
    font-weight: bold;
}

.toc-link {
    color: #d84315;
    transition: color 0.15s ease;
}

.toc-link:hover {
    color: #ff6b35;
    text-decoration: underline;
}

.hero-media {
    margin-bottom: 24px;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid #ff6b35;
    background: #fff8f0;
}

.hero-media img {
    width: 100%;
    object-fit: cover;
}

/* SEO текст / контент */
.content-card {
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid #ffb88c;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.content-card h2 {
    font-size: 22px;
    margin-top: 24px;
    margin-bottom: 12px;
    color: #d84315;
    font-weight: 700;
    scroll-margin-top: 80px;
}

.content-card h2:first-child {
    margin-top: 0;
}

.content-card h3 {
    font-size: 18px;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #ff6b35;
    font-weight: 600;
    scroll-margin-top: 80px;
}

.content-card h4 {
    font-size: 16px;
    margin-top: 16px;
    margin-bottom: 8px;
    color: #ff8c42;
    font-weight: 600;
    scroll-margin-top: 80px;
}

.content-card h5 {
    font-size: 15px;
    margin-top: 14px;
    margin-bottom: 8px;
    color: #ff8c42;
    font-weight: 600;
    scroll-margin-top: 80px;
}

.content-card h6 {
    font-size: 14px;
    margin-top: 12px;
    margin-bottom: 8px;
    color: #ff8c42;
    font-weight: 600;
    scroll-margin-top: 80px;
}

.content-card p {
    font-size: 15px;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.7;
}

.content-card ul, .content-card ol {
    margin-left: 24px;
    margin-bottom: 12px;
    font-size: 15px;
    color: #1a1a1a;
}

.content-card li {
    margin-bottom: 6px;
    line-height: 1.6;
}

/* Облако тегов */
.keywords-cloud {
    margin-top: 32px;
    padding: 24px;
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid #ffb88c;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.keywords-cloud-title {
    font-size: 18px;
    font-weight: 700;
    color: #d84315;
    margin-bottom: 16px;
    margin-top: 0;
    text-align: center;
}

.keywords-cloud h2.keywords-cloud-title {
    font-size: 18px;
    font-weight: 700;
    color: #d84315;
    margin-bottom: 16px;
    margin-top: 0;
    text-align: center;
}

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

.keywords-tag {
    display: inline-block;
    padding: 8px 16px;
    background-color: #fff8f0;
    border: 2px solid #ff6b35;
    border-radius: 20px;
    color: #d84315;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.keywords-tag:hover {
    background-color: #ff6b35;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
}

.keywords-tag.size-small {
    font-size: 12px;
    padding: 6px 12px;
}

.keywords-tag.size-medium {
    font-size: 14px;
    padding: 8px 16px;
}

.keywords-tag.size-large {
    font-size: 16px;
    padding: 10px 20px;
    font-weight: 600;
}

/* FOOTER */
.footer {
    border-top: 2px solid #ff6b35;
    padding: 20px 0 24px;
    font-size: 13px;
    color: #666;
    background-color: #fff8f0;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.footer-links a {
    color: #d84315;
    transition: color 0.15s ease;
}

.footer-links a:hover {
    color: #ff6b35;
}

/* Адаптив */
@media (max-width: 767px) {
    .burger-btn {
        display: flex;
    }

    .navbar-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: #ff6b35;
        flex-direction: column;
        padding: 80px 24px 24px;
        gap: 0;
        transition: right 0.3s ease;
        box-shadow: -2px 0 10px rgba(0,0,0,0.2);
        z-index: 99;
    }

    .navbar-nav.active {
        right: 0;
    }

    .navbar-link {
        padding: 12px 16px;
        border-bottom: 1px solid rgba(255,255,255,0.2);
        width: 100%;
    }

    .hero-inner {
        padding: 24px 0 20px;
    }

    h1 {
        font-size: 22px;
    }

    .toc {
        padding: 16px;
    }

    .content-card {
        padding: 18px;
    }

    .keywords-cloud {
        padding: 18px;
        margin-top: 24px;
    }

    .keywords-cloud-title {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .keywords-cloud h2.keywords-cloud-title {
        font-size: 16px;
        margin-bottom: 12px;
        margin-top: 0;
    }

    .keywords-cloud-tags {
        gap: 8px;
    }

    .keywords-tag {
        font-size: 12px;
        padding: 6px 12px;
    }

    .keywords-tag.size-large {
        font-size: 14px;
        padding: 8px 16px;
    }
}

@media (min-width: 768px) {
    .navbar-inner {
        padding: 14px 0;
    }

    .hero-inner {
        padding: 40px 0 28px;
    }

    h1 {
        font-size: 32px;
    }

    .main {
        padding-top: 24px;
    }

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

@media (min-width: 1024px) {
    h1 {
        font-size: 38px;
    }

    .layout {
        grid-template-columns: minmax(0, 1fr);
    }
}
