/* Dynamic CMS - Default Styles */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --background: #ffffff;
    --background-alt: #f9fafb;
    --max-width: 1200px;
    --spacing: 1rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--background);
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 600;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Header */
.site-header {
    background: var(--background);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.site-branding {
    flex: 0 0 auto;
}

.site-title {
    margin: 0;
    font-size: 1.5rem;
}

.site-title a {
    color: var(--text-color);
    text-decoration: none;
}

.site-title a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* Navigation */
.main-navigation {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
}

.menu ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.menu li {
    margin: 0;
}

.menu a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 0;
    display: block;
    transition: color 0.3s;
}

.menu a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* Main Content */
.site-main {
    padding: 3rem 0;
    min-height: calc(100vh - 200px);
}

.page-content {
    max-width: 800px;
    margin: 0 auto;
}

.entry-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.entry-title {
    margin: 0;
    color: var(--text-color);
}

.entry-content {
    font-size: 1.125rem;
    line-height: 1.8;
}

.entry-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.entry-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.entry-content ul,
.entry-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
}

.entry-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-light);
}

.entry-content code {
    background: var(--background-alt);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.entry-content pre {
    background: var(--background-alt);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.entry-content pre code {
    background: none;
    padding: 0;
}

/* Footer */
.site-footer {
    background: var(--background-alt);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-navigation {
    margin-bottom: 1.5rem;
}

.footer-navigation .menu ul {
    justify-content: center;
    gap: 1.5rem;
}

.site-info {
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
}

.site-info p {
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .main-navigation {
        width: 100%;
        margin-top: 1rem;
    }
    
    .menu ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .entry-content {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .site-main {
        padding: 2rem 0;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ======================================================================
   Quiz layout polish — keeps content tight, no big blank gaps
   ====================================================================== */

/* Reduce the heroic 3rem main padding */
.site-main { padding: 1.5rem 0; }

/* Categories grid on the homepage */
.categories {
    list-style: none;
    margin: 1rem 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.categories li.category {
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    padding: 14px 16px;
    background: #fff;
    transition: border-color .15s, transform .15s, box-shadow .15s;
}
.categories li.category:hover {
    border-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,.06);
}
.categories li.category a { font-size: 16px; color: #111; text-decoration: none; }
.categories li.category a:hover { color: #2563eb; }
.categories .category-desc { margin: 6px 0 0; color: #6b7280; font-size: 13px; line-height: 1.4; }

/* Round listing on category hub pages */
.quiz-rounds {
    list-style: none;
    margin: 1rem 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
}
.quiz-rounds .quiz-round {
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 6px;
    padding: 10px 14px;
    background: #fff;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    line-height: 1.3;
}
.quiz-rounds a { color: #1f2937; text-decoration: none; font-weight: 500; }
.quiz-rounds a:hover { color: #2563eb; text-decoration: underline; }
.quiz-rounds .quiz-answers-link { color: #4b5563; font-weight: 400; }
.quiz-rounds .quiz-sep { color: #9ca3af; }

/* Quiz Q & A lists */
.quiz {
    counter-reset: q;
    list-style: none;
    padding: 0;
    margin: 1rem 0 1.5rem;
}
.quiz > li {
    counter-increment: q;
    padding: 12px 14px 12px 48px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    position: relative;
    line-height: 1.5;
}
.quiz > li:last-child { border-bottom: none; }
.quiz > li::before {
    content: counter(q) ".";
    position: absolute;
    left: 14px;
    top: 12px;
    font-weight: 600;
    color: #2563eb;
    font-variant-numeric: tabular-nums;
    min-width: 24px;
    text-align: right;
}
.quiz-questions > li { background: transparent; }
.quiz-answers   > li { background: #f9fafb; }

/* When AdSense doesn't fill (e.g. local dev), kill the empty space */
ins.adsbygoogle:empty,
ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }

/* Tighten paragraph spacing inside page content */
.page-content p { margin: 0 0 0.75rem; }
.page-content > h2,
.page-content > h3 { margin: 1.2rem 0 0.5rem; }
