/* ============================================
   ProverkaCheka Blog — Shared Styles
   Dark editorial aesthetic with gradient accents
   ============================================ */

/* Font loaded via <link> in HTML <head> for performance */

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

:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #161625;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.07);
    --border-card: rgba(255, 255, 255, 0.08);
    --border-card-hover: rgba(255, 255, 255, 0.15);
    --text-primary: #f0f0f5;
    --text-secondary: #8892b0;
    --text-muted: #5a6380;
    --accent-start: #f12711;
    --accent-end: #f5af19;
    --font-stack: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --content-width: 780px;
    --page-width: 1100px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-stack);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* ---- NAV ---- */
.blog-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 15, 26, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-card);
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--accent-start), var(--accent-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a.active {
    color: var(--text-primary);
}

/* ---- BREADCRUMBS ---- */
.breadcrumbs {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 6.5rem 2rem 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.breadcrumbs a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: var(--text-primary);
}

.breadcrumbs .sep {
    margin: 0 0.5rem;
    opacity: 0.4;
}

/* ---- BLOG INDEX ---- */
.blog-hero {
    text-align: center;
    padding: 8rem 2rem 3rem;
    position: relative;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(241, 39, 17, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.blog-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
    position: relative;
}

.blog-hero .subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 520px;
    margin: 0 auto;
    position: relative;
}

.gradient-text {
    background: linear-gradient(90deg, var(--accent-start), var(--accent-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- ARTICLE CARDS GRID ---- */
.articles-grid {
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 2rem 2rem 5rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s, border-color 0.25s, background 0.25s;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-start), var(--accent-end));
    opacity: 0;
    transition: opacity 0.3s;
}

.article-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-card-hover);
    background: var(--bg-card-hover);
}

.article-card:hover::before {
    opacity: 1;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.card-tag {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    background: rgba(241, 39, 17, 0.1);
    color: #f5af19;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.article-card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.article-card .excerpt {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 1.25rem;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.read-more {
    font-size: 0.85rem;
    font-weight: 600;
    background: linear-gradient(90deg, var(--accent-start), var(--accent-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.read-more svg {
    width: 14px;
    height: 14px;
    stroke: var(--accent-end);
    transition: transform 0.2s;
}

.article-card:hover .read-more svg {
    transform: translateX(3px);
}

.reading-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ---- ARTICLE PAGE ---- */
.article-header {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 2rem 2rem 0;
    text-align: center;
}

.article-header .tag {
    display: inline-block;
    padding: 0.3rem 1rem;
    border-radius: 50px;
    background: rgba(241, 39, 17, 0.1);
    color: #f5af19;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
}

.article-header h1 {
    font-size: clamp(1.75rem, 4.5vw, 2.75rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.article-meta .dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-muted);
}

/* ---- ARTICLE CONTENT ---- */
.article-content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 2rem 3rem;
}

.article-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 3rem 0 1rem;
    line-height: 1.3;
    position: relative;
    padding-left: 1.25rem;
}

.article-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.2em;
    bottom: 0.2em;
    width: 3px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--accent-start), var(--accent-end));
}

.article-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem;
    color: var(--text-primary);
}

.article-content p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    font-size: 1.02rem;
    line-height: 1.8;
}

.article-content a {
    color: var(--accent-end);
    text-decoration: underline;
    text-decoration-color: rgba(245, 175, 25, 0.3);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s;
}

.article-content a:hover {
    text-decoration-color: var(--accent-end);
}

.article-content ul,
.article-content ol {
    margin: 0 0 1.25rem 1.5rem;
    color: var(--text-secondary);
}

.article-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
    font-size: 1.02rem;
}

.article-content li::marker {
    color: var(--accent-end);
}

.article-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Highlight box */
.highlight-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-card);
    border-left: 3px solid;
    border-image: linear-gradient(180deg, var(--accent-start), var(--accent-end)) 1;
    border-radius: 0 12px 12px 0;
    padding: 1.5rem 1.75rem;
    margin: 2rem 0;
}

.highlight-box p {
    margin-bottom: 0;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.highlight-box strong {
    color: var(--accent-end);
}

/* Info box */
.info-box {
    background: rgba(241, 39, 17, 0.04);
    border: 1px solid rgba(241, 39, 17, 0.12);
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
    margin: 2rem 0;
}

.info-box .info-title {
    font-weight: 700;
    color: var(--accent-end);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-box p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Steps */
.steps-list {
    counter-reset: step;
    list-style: none;
    margin: 1.5rem 0;
    padding: 0;
}

.steps-list li {
    counter-increment: step;
    position: relative;
    padding-left: 3.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-card);
}

.steps-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.steps-list li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    line-height: 2.25rem;
    text-align: center;
}

/* Table scroll wrapper for mobile */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 2rem 0;
    border-radius: 12px;
    border: 1px solid var(--border-card);
}

/* Comparison table */
.comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
}

.comparison-table th {
    background: var(--bg-secondary);
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-card);
}

.comparison-table td {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-card);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:hover td {
    background: var(--bg-card);
}

.check-yes {
    color: #34d399;
    font-weight: 600;
}

.check-no {
    color: #f87171;
    font-weight: 600;
}

/* ---- CTA SECTION ---- */
.article-cta {
    max-width: var(--content-width);
    margin: 0 auto 3rem;
    padding: 0 2rem;
}

.cta-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-card);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-start), var(--accent-end));
}

.cta-box h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.cta-box p {
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: none;
    min-height: 48px;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent-start), var(--accent-end));
    color: #fff;
}

.btn-primary:hover {
    box-shadow: 0 8px 30px rgba(241, 39, 17, 0.3);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-card);
}

.btn-secondary:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

/* ---- RELATED ARTICLES ---- */
.related-section {
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 0 2rem 5rem;
}

.related-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

/* ---- FOOTER ---- */
.blog-footer {
    border-top: 1px solid var(--border-card);
    padding: 2rem;
    text-align: center;
}

.footer-inner {
    max-width: var(--page-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.82rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* ---- HAMBURGER MENU ---- */
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    margin: 5px 0;
    border-radius: 1px;
    transition: transform 0.3s, opacity 0.3s;
}

.nav-hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.nav-hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ---- RELATED SECTION headings ---- */
.related-grid .article-card h2 {
    font-size: 1.1rem;
}

/* ---- ANIMATIONS ---- */
/* No-JS fallback: show content if JS doesn't load */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .fade-in {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Staggered delays for cards */
.article-card:nth-child(1) { transition-delay: 0s; }
.article-card:nth-child(2) { transition-delay: 0.08s; }
.article-card:nth-child(3) { transition-delay: 0.16s; }
.article-card:nth-child(4) { transition-delay: 0.24s; }
.article-card:nth-child(5) { transition-delay: 0.32s; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .blog-nav {
        padding: 0.75rem 1.25rem;
    }

    .nav-hamburger {
        display: block;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(15, 15, 26, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2.5rem;
        z-index: 100;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        font-size: 1.25rem;
    }

    .blog-hero {
        padding: 7rem 1.25rem 2rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        padding: 1.5rem 1.25rem 4rem;
    }

    .breadcrumbs {
        padding: 5.5rem 1.25rem 0;
    }

    .article-header {
        padding: 1.5rem 1.25rem 0;
        text-align: left;
    }

    .article-meta {
        justify-content: flex-start;
    }

    .article-content {
        padding: 0 1.25rem 2rem;
    }

    .article-content h2 {
        font-size: 1.3rem;
    }

    .article-cta {
        padding: 0 1.25rem;
    }

    .cta-box {
        padding: 2rem 1.5rem;
    }

    .related-section {
        padding: 0 1.25rem 4rem;
    }

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

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .comparison-table {
        font-size: 0.85rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.65rem 0.75rem;
    }

    .steps-list li {
        padding-left: 3rem;
    }
}

@media (max-width: 480px) {
    .article-header h1 {
        font-size: 1.5rem;
    }

    .article-card h2 {
        font-size: 1.1rem;
    }
}

/* No-JS: make content visible even without JS */
noscript + * .fade-in,
html:not(.js-loaded) .fade-in {
    opacity: 1;
    transform: none;
}
