/* ================= VARIABLES ================= */
:root {
    --bg-surface: #151A25;
    --bg-card: #1E2330;
    --bg-card-hover: #262c3b;
    --text-muted: #94A3B8;
    --accent: #22C55E;
    --accent-glow: rgba(34, 197, 94, 0.3);
    --gradient: linear-gradient(135deg, #10B981 0%, #22C55E 100%);
    --gradient-alert: linear-gradient(135deg, #ff0844 0%, #ffb199 100%);

    --border-color: rgba(255,255,255, 0.08);
    --radius: 16px;

    --font-heading: 'Onest', sans-serif;
}

/* ================= FONTS ================= */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/inter-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/onest-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/onest-700.woff2') format('woff2');
}

/* ================= RESET & BASE ================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-text);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: #fff;
    margin-bottom: 1rem;
    font-weight: 700;
}

h1 { font-size: 24px; }
h2 { font-size: 20px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }
strong { font-weight: 600; color: #fff; }

a {
    color: var(--accent);
    text-decoration: none;
    transition: 0.3s ease;
}

a:hover {
    color: #fff;
}

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

/* Утилиты */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-success { color: #00e676; }
.text-danger { color: #ff1744; }
.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.pb-4 { padding-bottom: 1.5rem; }
.border-bottom { border-bottom: 1px solid var(--border-color); }

.rounded-img { border-radius: var(--radius); }
.shadow-img { box-shadow: 0 10px 30px rgba(0,0,0,0.5); border: 1px solid var(--border-color); }
.align-center { margin: 0 auto; }

/* Кнопки */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    font-family: var(--font-heading);
}

.btn-primary {
    background: var(--gradient);
    color: #000 !important;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px var(--accent-glow);
    transform: translateY(-2px);
    color: #000;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: #000;
}

/* ================= HEADER ================= */
.header {
    background: rgba(11, 14, 20, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-list a {
    color: var(--text-main);
    font-weight: 500;
}

.nav-list a:hover {
    color: var(--accent);
}

.hamburger {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    display: none;
}

/* ================= HERO ================= */

.hero-text {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.hero-author {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--bg-surface);
    padding: 10px 15px;
    border-radius: 12px;
    display: inline-flex;
    border: 1px solid var(--border-color);
}

.hero-author img {
    border-radius: 50%;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: #fff;
    font-size: 14px;
}

.author-role {
    font-size: 12px;
    color: var(--text-muted);
}

/* ================= STICKY CTA ================= */
.sticky-cta {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    background: rgba(30, 35, 48, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--accent);
    border-radius: 16px;
    padding: 12px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(34, 197, 94, 0.2);
    z-index: 9999;
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
}

.sticky-cta.visible {
    bottom: 20px;
}

.sticky-close {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.sticky-close:hover {
    color: #fff;
    border-color: #fff;
}

.sticky-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.sticky-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sticky-text {
    display: flex;
    flex-direction: column;
}

.sticky-title {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.2;
}

.sticky-bonus {
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--accent);
    line-height: 1.2;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

@media (min-width: 768px) {
    .sticky-cta {
        left: 20px;
        transform: none;
        max-width: 400px;
    }
}

/* ================= TOC ================= */
.toc-section { padding: 20px 0; }
.toc-details {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 15px 20px;
}
.toc-summary {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
}
.toc-summary::-webkit-details-marker { display: none; }
.toc-content { margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--border-color); }
.toc-content ol { padding-left: 20px; color: var(--accent); }
.toc-content a { color: var(--text-muted); }
.toc-content a:hover { color: var(--accent); }

/* ================= RATING CARDS ================= */
.rating-section { padding: 40px 0; }
.rating-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    transition: 0.3s;
}
.rating-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
}
.brand-logo-wrap {
    position: relative;
    background: var(--bg-main);
    border-radius: 12px;
    padding: 10px;
    text-align: center;
}
.brand-logo { margin: 0 auto; }
.rank-badge {
    position: absolute;
    top: -10px;
    left: -10px;
    background: var(--gradient);
    color: #000;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.rank-badge span { font-size: 12px; opacity: 0.8; margin-left: 4px; }
.bonus-highlight {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
}
.bonus-sub { font-size: 14px; color: var(--text-muted); }
.features-list { list-style: none; font-size: 14px; color: var(--text-muted); }
.features-list li { margin-bottom: 4px; }
.read-review-link { font-size: 12px; text-decoration: underline; color: var(--text-muted); }

/* ================= TEXT SECTION & TABLES ================= */
.text-section { padding: 40px 0; }
.text-content p { margin-bottom: 20px; }
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0;
}
table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}
th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
th {
    background: var(--bg-surface);
    font-family: var(--font-heading);
    color: #fff;
}
tr:hover td { background: var(--bg-card); }

.steps-list {
    padding-left: 1.2rem;
    color: var(--text-muted);
}

.steps-list li {
    margin-bottom: 1.25rem;
    padding-left: 0.5rem;
}

.steps-list li::marker {
    color: var(--accent);
    font-weight: 700;
    font-family: var(--font-heading);
}

.steps-list strong {
    display: inline;
    color: #fff;
    font-family: var(--font-heading);
}

/* ================= PROS / CONS ================= */
.review-section { padding: 40px 0; }
.pros-cons-box {
    background: var(--bg-surface);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    height: 100%;
}
.custom-list { list-style: none; padding-left: 0; }
.custom-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
}
.custom-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.pros-list li::before { background: #00e676; box-shadow: 0 0 8px #00e676; }
.cons-list li::before { background: #ff1744; box-shadow: 0 0 8px #ff1744; }

/* ================= PROMO TILES ================= */
.promo-section { padding: 40px 0; }
.promo-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: 0.3s;
}
.promo-card:hover { transform: translateY(-5px); border-color: var(--accent); }
.promo-card img { width: 100%; object-fit: cover; }
.promo-content { padding: 20px; }
.promo-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

/* ================= COLOR BLOCK ================= */
.color-alert-section {
    background: var(--gradient-alert);
    padding: 40px 0;
    border-radius: var(--radius);
    margin: 40px 15px;
    color: #fff;
    box-shadow: 0 10px 30px rgba(255, 8, 68, 0.2);
}
.color-alert-section h2 { color: #fff; margin-bottom: 15px; }

/* ================= AUTHOR ================= */
.author-section { padding: 40px 0; }
.author-card-big {
    background: var(--bg-surface);
    border-radius: var(--radius);
    padding: 30px;
    margin: 0 5px;
    border: 1px solid var(--border-color);
}
.author-avatar { border-radius: 50%; border: 3px solid var(--accent); }
.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: var(--bg-card);
    border-radius: 50%;
    margin-right: 10px;
    font-size: 18px;
}
.social-links a:hover { background: var(--accent); color: #000; }

/* ================= FAQ ================= */
.faq-section { padding: 40px 0; }
.faq-wrapper { max-width: 800px; margin: 0 auto; }
.faq-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
}
.faq-item summary {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { margin: 0; font-size: 16px; }
.faq-answer {
    padding: 0 20px 20px;
    color: var(--text-muted);
}
.faq-item[open] summary .bi-chevron-down {
    transform: rotate(180deg);
}
.faq-item summary .bi { transition: 0.3s; }

/* ================= FOOTER ================= */
.footer {
    background: var(--bg-surface);
    padding: 60px 0 20px;
    border-top: 1px solid var(--border-color);
}
.footer-title { margin-bottom: 20px; font-size: 18px; }
.footer-nav { list-style: none; }
.footer-nav li { margin-bottom: 10px; }
.footer-nav a { color: var(--text-muted); }
.footer-nav a:hover { color: var(--accent); }
.responsible-logos img { margin-right: 10px; margin-bottom: 10px; opacity: 0.7; }

/* ================= NDFL CALCULATOR ================= */
.ndfl-calc {
    background: var(--bg-surface);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 24px;
    margin: 24px 0;
}

.ndfl-calc h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

.calc-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .calc-inputs { grid-template-columns: 1fr; }
}

.calc-field label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.calc-field input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 16px;
    font-family: var(--font-text);
    transition: border-color 0.2s;
}

.calc-field input:focus {
    outline: none;
    border-color: var(--accent);
}

.calc-field input::-webkit-outer-spin-button,
.calc-field input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.calc-results {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.calc-row-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
    color: var(--text-muted);
}

.calc-row-result:last-of-type { border-bottom: none; }

.calc-row-result strong {
    color: var(--accent);
    font-family: var(--font-heading);
    font-size: 16px;
}

.calc-info {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    background: var(--bg-card);
    color: var(--text-muted);
    border-left: 3px solid var(--border-color);
}

.calc-info.info-success { border-left-color: #22c55e; }
.calc-info.info-warning { border-left-color: #f59e0b; }
.calc-info.info-neutral { border-left-color: var(--text-muted); }

/* ================= MEDIA QUERIES ================= */
@media (min-width: 768px) {
    h1 { font-size: 42px; }
    h2 { font-size: 32px; }
    h3 { font-size: 24px; }
    body { font-size: 16px; }

    .color-alert-section { margin: 60px auto; max-width: 1200px; }
}

@media (max-width: 991px) {
    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-surface);
        border-bottom: 1px solid var(--border-color);
        display: none;
        padding: 20px;
    }
    .nav.active { display: block; }
    .nav-list {
        flex-direction: column;
        align-items: center;
    }
    .hamburger { display: block; }

    .rating-card .text-lg-start { text-align: center; }
    .rating-card .text-lg-end { text-align: center; margin-top: 15px; }
    .features-list { display: flex; flex-direction: column; align-items: center; margin-top: 10px; }
}
