/* ═══════════════════════════════════════════
   WebSEO Theme — Main Stylesheet
   ═══════════════════════════════════════════ */

/* Variables defined in studio-system.css (loaded last) */

/* ── Reset ──────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    background: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .logo {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: 1.15rem; }

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }

:where(a, button, input, textarea, select, [tabindex]):focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}

:where(input, textarea, select):focus-visible {
    outline-offset: 1px;
}

/* ── Layout ─────────────────────────────────── */

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

.container--narrow {
    max-width: 800px;
}

.section-padding {
    padding: 80px 0;
}

.bg-gray {
    background: var(--bg-secondary);
}

/* ── Grids ──────────────────────────────────── */

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

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

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .section-padding { padding: 48px 0; }
}

/* ── Section Header ─────────────────────────── */

.section-header {
    max-width: 768px;
    margin: 0 0 48px;
}

.section-header--centered {
    text-align: center;
    margin-inline: auto;
}

.section-header p {
    color: var(--text-muted);
    margin-top: 12px;
}

.section-header--centered p {
    margin-inline: auto;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.section-footer {
    text-align: center;
    margin-top: 40px;
}

/* ── Prose (content from WYSIWYG) ───────────── */

.prose h2 { margin: 32px 0 16px; }
.prose h3 { margin: 24px 0 12px; }
.prose p { margin-bottom: 16px; color: var(--text-muted); }
.prose ul, .prose ol { margin: 0 0 16px 24px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 6px; color: var(--text-muted); }
.prose img { border-radius: var(--radius-main); margin: 24px 0; }
.prose a { color: var(--text-main); font-weight: 600; border-bottom: 2px solid var(--acid-green); }
.prose a:hover { border-color: var(--text-main); }

/* ── Breadcrumbs ────────────────────────────── */

.breadcrumbs {
    padding: 12px 24px 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.breadcrumbs .container {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    gap: 0;
    padding-top: 4px;
    padding-bottom: 4px;
}
.breadcrumbs .container::-webkit-scrollbar { display: none; }
.breadcrumbs a {
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
}
.breadcrumbs a:hover { color: var(--text-main); }
.breadcrumbs a i { font-size: 1rem; }
.breadcrumbs .sep {
    margin: 0 10px;
    opacity: 0.5;
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.breadcrumbs span:last-child {
    color: var(--text-main);
    font-weight: 500;
}

@media (max-width: 768px) {
    .breadcrumbs { padding: 8px 12px 0; font-size: 0.8rem; margin-bottom: 6px; }
    .breadcrumbs .container { padding-top: 2px; padding-bottom: 2px; }
    .breadcrumbs .sep { margin: 0 6px; }
}

/* ── Filter tabs ────────────────────────────── */

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
    justify-content: center;
}

.filter-tab {
    padding: 8px 20px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-color);
    background: transparent;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
}

.filter-tab:hover,
.filter-tab.active {
    background: var(--acid-green);
    border-color: var(--acid-green);
    color: #000;
}

.filter-tab:focus-visible { border-color: var(--focus-ring); }

/* ── Pagination ─────────────────────────────── */

.pagination { margin-top: 48px; text-align: center; }
.pagination .nav-links { display: flex; gap: 8px; justify-content: center; }
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid var(--border-color);
    font-weight: 500; font-size: 0.9rem;
    transition: var(--transition);
}
.pagination a:hover, .pagination .current {
    background: var(--acid-green); border-color: var(--acid-green); color: #000;
}

/* ── Screen reader only ─────────────────────── */

.screen-reader-text {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
