/* SEO Test Online — Main Stylesheet */
:root {
    --bg: #f5f8fc;
    --fg: #0f172a;
    --muted: #475569;
    --light: #94a3b8;
    --accent: #2F80ED;
    --accent-hover: #1d6ad4;
    --green: #22c55e;
    --yellow: #f59e0b;
    --red: #ef4444;
    --card: #ffffff;
    --line: #e2e8f0;
    --shadow: 0 4px 14px rgba(2,8,23,0.04);
    --shadow-lg: 0 8px 30px rgba(2,8,23,0.08);
    --radius: 12px;
    --radius-lg: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* Layout */
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section-dark { background: var(--fg); color: #ffffff; }
.section-light { background: var(--card); }

/* Typography */
h1 { font-size: 42px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 30px; line-height: 1.25; font-weight: 700; margin-bottom: 16px; }
h3 { font-size: 20px; line-height: 1.35; font-weight: 600; margin-bottom: 8px; }
.lead { font-size: 18px; color: var(--muted); line-height: 1.7; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* Grid */
.grid { display: grid; gap: 20px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Cards */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card-flat { box-shadow: none; }
.card-flat:hover { transform: none; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; }
.btn-lg { padding: 18px 36px; font-size: 18px; }
.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}
.btn-outline:hover { background: var(--accent); color: #fff; text-decoration: none; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.form-control {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: #fff;
    color: var(--fg);
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(47,128,237,0.15);
}
.form-control::placeholder { color: var(--light); }

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 16px 0;
}
.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--accent);
    flex-shrink: 0;
}
.checkbox-group label { font-size: 14px; color: var(--muted); cursor: pointer; font-weight: 400; }

/* Header */
.site-header {
    padding: 16px 0;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--fg);
    font-weight: 700;
    font-size: 20px;
}
.site-logo img { height: 36px; width: auto; }
.lang-switcher { position: relative; }
.lang-switcher-btn {
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
    cursor: pointer;
    font-size: 14px;
    color: var(--fg);
    display: flex;
    align-items: center;
    gap: 6px;
}
.lang-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 420px;
    z-index: 200;
    padding: 12px;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
}
.lang-dropdown.open { display: grid; }
.lang-dropdown a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    color: var(--fg);
    font-size: 13px;
    border-radius: 6px;
    white-space: nowrap;
}
.lang-dropdown a:hover { background: var(--bg); text-decoration: none; }

/* Footer */
.site-footer {
    padding: 48px 0 24px;
    background: var(--fg);
    color: #94a3b8;
    font-size: 14px;
}
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 32px; margin-bottom: 32px; }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 12px; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid #1e293b; padding-top: 24px; text-align: center; }

/* Hero */
.hero { padding: 80px 0 64px; }
.hero h1 { margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { margin-bottom: 32px; max-width: 700px; }
.hero-form {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-lg);
    max-width: 600px;
}

/* Steps */
.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 20px;
    margin-bottom: 16px;
}

/* Score Gauge */
.score-gauge {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin: 0 auto 16px;
}
.score-gauge .score-number { font-size: 48px; font-weight: 800; line-height: 1; }
.score-gauge .score-label { font-size: 14px; font-weight: 600; margin-top: 4px; }
.score-good { border: 5px solid var(--green); color: var(--green); }
.score-warning { border: 5px solid var(--yellow); color: var(--yellow); }
.score-critical { border: 5px solid var(--red); color: var(--red); }

/* Report Sections */
.report-section { margin-bottom: 32px; }
.report-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--line);
}
.report-section-header h2 { margin-bottom: 0; font-size: 24px; }
.report-item {
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 12px;
    border-left: 4px solid;
}
.report-item-error { background: #fef2f2; border-color: var(--red); }
.report-item-warning { background: #fffbeb; border-color: var(--yellow); }
.report-item-notice { background: #eff6ff; border-color: var(--accent); }
.report-item-success { background: #f0fdf4; border-color: var(--green); }
.report-item h4 { font-size: 15px; margin-bottom: 4px; }
.report-item p { font-size: 14px; color: var(--muted); margin: 0; }
.report-value { font-family: monospace; background: #f1f5f9; padding: 2px 8px; border-radius: 4px; font-size: 13px; }

/* Status badges */
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-error { background: #fef2f2; color: var(--red); }
.badge-warning { background: #fffbeb; color: #b45309; }
.badge-notice { background: #eff6ff; color: var(--accent); }
.badge-success { background: #f0fdf4; color: #15803d; }

/* Counters */
.issue-counters { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.issue-counter { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.issue-dot { width: 10px; height: 10px; border-radius: 50%; }

/* Loading overlay */
.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
}
.loading-overlay.active { display: flex; }
.spinner {
    width: 48px; height: 48px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: #fff; font-size: 18px; font-weight: 600; }

/* Success message */
.success-message {
    display: none;
    text-align: center;
    padding: 32px;
}
.success-message.active { display: block; }
.success-icon { font-size: 48px; margin-bottom: 16px; }

/* CTA block */
.cta-block {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    border-radius: var(--radius-lg);
    padding: 48px;
    text-align: center;
    color: #fff;
}
.cta-block h2 { color: #fff; }
.cta-block p { color: #94a3b8; margin-bottom: 24px; }

/* Check categories */
.check-icon { font-size: 28px; margin-bottom: 12px; }

/* Navigation */
.site-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}
.nav-dropdown { position: relative; }
.nav-dropdown-btn {
    padding: 8px 14px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--fg);
    font-family: inherit;
}
.nav-dropdown-btn:hover { color: var(--accent); }
.nav-dropdown-menu {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 4px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    z-index: 200;
    padding: 8px 0;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
    display: block;
    padding: 8px 16px;
    color: var(--fg);
    font-size: 14px;
}
.nav-dropdown-menu a:hover { background: var(--bg); text-decoration: none; }
.hamburger {
    display: none;
    border: none;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
}

/* Proof bar (social proof counters) */
.proof-bar {
    background: var(--fg);
    padding: 28px 0;
}
.proof-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}
.proof-stat { text-align: center; }
.proof-stat .number {
    font-size: 32px;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}
.proof-stat .label {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 4px;
}

/* Testimonials */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.testimonial-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: left;
    box-shadow: var(--shadow);
}
.testimonial-card blockquote {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.6;
    margin: 0 0 16px;
    font-style: italic;
}
.testimonial-card blockquote::before { content: '"'; font-size: 32px; color: var(--accent); line-height: 0; vertical-align: -12px; margin-right: 4px; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px;
}
.testimonial-name { font-weight: 600; font-size: 14px; }
.testimonial-role { font-size: 13px; color: var(--muted); }

/* Use case cards */
.usecase-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}
.usecase-card:hover { transform: translateY(-3px); }
.usecase-icon { font-size: 36px; margin-bottom: 12px; }

/* Scroll to top */
.scroll-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    font-size: 22px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.scroll-top.visible { opacity: 1; visibility: visible; }
.scroll-top:hover { background: var(--accent-hover); }

/* Report spacing improvements */
.report-section { margin-bottom: 48px; padding-bottom: 16px; }
.report-section-header { margin-bottom: 20px; padding-bottom: 16px; }
.report-item { margin-bottom: 16px; padding: 20px; }
.report-item .fix-tip {
    margin-top: 10px;
    padding: 10px 14px;
    background: rgba(47,128,237,0.06);
    border-radius: 8px;
    font-size: 13px;
    color: var(--fg);
    line-height: 1.5;
}
.report-item .fix-tip strong { color: var(--accent); }

/* Responsive */
@media (max-width: 900px) {
    h1 { font-size: 32px; }
    h2 { font-size: 24px; }
    .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
    .hero { padding: 48px 0 32px; }
    .hero .container > div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
    .section { padding: 40px 0; }
    .hero-form { padding: 20px; }
    .cta-block { padding: 32px 20px; }
    .footer-grid { flex-direction: column; }
    .testimonials-grid { grid-template-columns: 1fr; }
    .site-nav { gap: 8px; }
    .nav-dropdown-btn { padding: 6px 10px; font-size: 14px; }
    .proof-stats { gap: 24px; }
}
@media (max-width: 640px) {
    h1 { font-size: 26px; }
    .container { padding: 0 16px; }
    .btn-lg { padding: 14px 24px; font-size: 16px; }
    .hamburger { display: block; }
    .site-nav .nav-dropdown,
    .site-nav .btn-outline,
    .site-nav .lang-switcher { display: none; }
    .site-nav.open { position: absolute; top: 100%; left: 0; right: 0; background: var(--card); flex-direction: column; padding: 16px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); }
    .site-nav.open .nav-dropdown,
    .site-nav.open .btn-outline,
    .site-nav.open .lang-switcher { display: block; }
    .site-nav.open .nav-dropdown-menu { position: static; box-shadow: none; border: none; }
}
