/*
 * Main Stylesheet — Eturing Co
 * Theme colours injected as CSS variables by layout.php from site config.
 * Do not hardcode theme colours here — always use var(--spn-*).
 */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', Candara, Arial, sans-serif;
    background: var(--spn-bg, #faf7ee);
    color: var(--spn-text, #1c1e2d);
    line-height: 1.75;
}

a { color: var(--spn-accent, #c09b3d); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ── Layout Containers ── */
.spn-header-inner,
.spn-footer-inner,
#spn-main,
.spn-section-inner {
    max-width: var(--spn-max-width, 1100px);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

/* ── Header ── */
.spn-header {
    background: var(--spn-primary, #2c3e6e);
    color: #fff;
    padding: 0.85rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 6px rgba(44,62,110,0.18);
}

.spn-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Logo — the <a> element itself carries this class */
.spn-logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
    text-decoration: none;
    flex-shrink: 0;
}
.spn-logo:hover { color: #fff; text-decoration: none; }

/* Hamburger toggle (checkbox trick) */
.spn-nav-toggle { display: none; }

.spn-nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
}

.spn-nav-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.2s;
}

/* Nav */
.spn-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.spn-nav ul li a {
    color: rgba(255,255,255,0.88);
    font-size: 0.88rem;
    font-weight: 500;
    transition: color 0.15s;
    text-decoration: none;
}

.spn-nav ul li a:hover {
    color: #fff;
    text-decoration: none;
}

/* ── Hero ── */
.spn-hero {
    background: var(--spn-primary, #2c3e6e);
    color: #fff;
    padding: 3.5rem 1.25rem 3rem;
    text-align: center;
}

.spn-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.spn-hero p {
    font-size: 1.1rem;
    opacity: 0.88;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── Topic Cards ── */
.spn-topic-cards {
    padding: 2.75rem 1.25rem 1.5rem;
    background: var(--spn-bg, #faf7ee);
}

.spn-topic-cards h2 {
    text-align: center;
    font-size: 1.45rem;
    color: var(--spn-primary, #2c3e6e);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.spn-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    max-width: 1100px;
    margin: 0 auto;
}

.spn-card {
    background: #fff;
    border: 1px solid rgba(44,62,110,0.1);
    border-radius: 6px;
    padding: 1.5rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    box-shadow: 0 1px 4px rgba(44,62,110,0.06);
    transition: box-shadow 0.15s;
}

.spn-card:hover { box-shadow: 0 3px 10px rgba(44,62,110,0.12); }

.spn-card-title { font-size: 1.05rem; font-weight: 700; }
.spn-card-title a { color: var(--spn-primary, #2c3e6e); }
.spn-card-summary { font-size: 0.9rem; color: #4a4a5a; line-height: 1.55; flex: 1; }
.spn-card-cta { font-size: 0.85rem; font-weight: 600; color: var(--spn-accent, #c09b3d); margin-top: auto; }

/* ── Latest Articles ── */
.spn-latest-articles {
    background: #fff;
    padding: 2.25rem 1.25rem;
    border-top: 1px solid rgba(44,62,110,0.08);
    border-bottom: 1px solid rgba(44,62,110,0.08);
}

.spn-latest-articles-inner { max-width: 1100px; margin: 0 auto; }

.spn-latest-articles h2 {
    font-size: 1.25rem;
    color: var(--spn-primary, #2c3e6e);
    margin-bottom: 1rem;
    font-weight: 700;
}

.spn-latest-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.spn-latest-list li { border-bottom: 1px solid rgba(44,62,110,0.07); padding-bottom: 0.5rem; }
.spn-latest-list li:last-child { border-bottom: none; }
.spn-latest-list a { font-size: 0.95rem; color: var(--spn-primary, #2c3e6e); font-weight: 500; }
.spn-latest-list a:hover { color: var(--spn-accent, #c09b3d); }

/* ── Site Description ── */
.spn-site-desc {
    padding: 1.75rem 1.25rem;
    max-width: 1100px;
    margin: 0 auto;
    font-size: 0.9rem;
    color: #555566;
    line-height: 1.65;
}

/* ── Main Content ── */
#spn-main {
    padding-top: 2rem;
    padding-bottom: 3rem;
    min-height: 60vh;
}

/* ── Article ── */
.spn-article-header { margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 2px solid var(--spn-accent, #c09b3d); }
.spn-article-title { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; color: var(--spn-primary, #2c3e6e); line-height: 1.3; margin-bottom: 0.4rem; }
.spn-article-meta { font-size: 0.82rem; color: #666677; }
.spn-article-body { max-width: 740px; }
.spn-article-body h2 { font-size: 1.2rem; color: var(--spn-primary, #2c3e6e); margin: 1.75rem 0 0.65rem; font-weight: 700; }
.spn-article-body p { margin-bottom: 1rem; }
.spn-article-body ul, .spn-article-body ol { margin: 0.75rem 0 1rem 1.5rem; }
.spn-article-body li { margin-bottom: 0.4rem; line-height: 1.6; }
.spn-article-body strong { color: var(--spn-primary, #2c3e6e); }

.spn-checklist { list-style: none; margin-left: 0 !important; }
.spn-checklist li { padding-left: 1.4em; position: relative; margin-bottom: 0.5rem; }
.spn-checklist li::before { content: '✓'; position: absolute; left: 0; color: var(--spn-accent, #c09b3d); font-weight: 700; }

/* ── FAQ ── */
.spn-faq { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid rgba(44,62,110,0.1); }
.spn-faq h2 { font-size: 1.15rem; color: var(--spn-primary, #2c3e6e); margin-bottom: 1rem; font-weight: 700; }
.spn-faq-item { margin-bottom: 1.25rem; }
.spn-faq-q { font-weight: 700; color: var(--spn-primary, #2c3e6e); margin-bottom: 0.35rem; }
.spn-faq-a { font-size: 0.95rem; color: #3a3a4a; line-height: 1.65; }

/* ── Related Articles ── */
.spn-related { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid rgba(44,62,110,0.1); }
.spn-related h2 { font-size: 1rem; color: var(--spn-primary, #2c3e6e); margin-bottom: 0.65rem; font-weight: 700; }
.spn-related ul { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.spn-related a { font-size: 0.9rem; color: var(--spn-accent, #c09b3d); font-weight: 500; }

/* ── AdSense Slots ── */
.spn-adsense-top, .spn-adsense-mid, .spn-adsense-bottom { margin: 1.5rem 0; min-height: 90px; }

/* ── Policy Pages ── */
.spn-policy-header { margin-bottom: 1.5rem; padding-bottom: 0.75rem; border-bottom: 2px solid var(--spn-accent, #c09b3d); }
.spn-policy-title { font-size: 1.7rem; font-weight: 700; color: var(--spn-primary, #2c3e6e); }
.spn-policy-body h2 { font-size: 1.1rem; color: var(--spn-primary, #2c3e6e); margin: 1.5rem 0 0.5rem; font-weight: 700; }
.spn-policy-body p { margin-bottom: 0.85rem; line-height: 1.7; }
.spn-policy-body ul { margin: 0.5rem 0 1rem 1.5rem; }
.spn-policy-body li { margin-bottom: 0.35rem; line-height: 1.6; }
.spn-policy-body a { color: var(--spn-accent, #c09b3d); }

/* ── Category / Guide Pages ── */
.spn-category-header { margin-bottom: 1.5rem; padding-bottom: 0.75rem; border-bottom: 2px solid var(--spn-accent, #c09b3d); }
.spn-category-title { font-size: 1.7rem; font-weight: 700; color: var(--spn-primary, #2c3e6e); }
.spn-category-desc { font-size: 0.95rem; color: #555566; margin-top: 0.4rem; }
.spn-category-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.25rem; }
.spn-category-list li { padding: 0.75rem 1rem; background: #fff; border: 1px solid rgba(44,62,110,0.1); border-radius: 4px; }
.spn-category-list a { font-weight: 600; color: var(--spn-primary, #2c3e6e); font-size: 0.95rem; }
.spn-category-list a:hover { color: var(--spn-accent, #c09b3d); }

/* ── Guide Section ── */
.spn-guide-section { max-width: 740px; }
.spn-guide-section h2 { font-size: 1.2rem; color: var(--spn-primary, #2c3e6e); margin: 1.5rem 0 0.6rem; font-weight: 700; }
.spn-guide-section p { margin-bottom: 0.9rem; line-height: 1.7; }
.spn-guide-section ul { margin: 0.5rem 0 1rem 1.5rem; }
.spn-guide-section li { margin-bottom: 0.4rem; line-height: 1.6; }

/* ── Coming Soon ── */
.spn-coming-soon { text-align: center; padding: 3rem 1rem; color: #666677; font-size: 1rem; }
.spn-coming-soon h2 { color: var(--spn-primary, #2c3e6e); margin-bottom: 0.5rem; }

/* ── Operations Note ── */
.spn-operations-note { background: #fff; border-left: 4px solid var(--spn-accent, #c09b3d); padding: 1.25rem 1.5rem; border-radius: 0 4px 4px 0; max-width: 660px; margin-top: 1rem; }
.spn-operations-note p { margin-bottom: 0.7rem; font-size: 0.95rem; line-height: 1.65; }
.spn-operations-note p:last-child { margin-bottom: 0; }

/* ── Article Index ── */
.spn-article-index h2 { font-size: 1.5rem; color: var(--spn-primary, #2c3e6e); margin-bottom: 1.25rem; font-weight: 700; }
.spn-article-cards { display: flex; flex-direction: column; gap: 1rem; max-width: 780px; }
.spn-card.spn-article-card { flex-direction: row; align-items: flex-start; gap: 1rem; }
.spn-article-card-body { flex: 1; }
.spn-article-card-body h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.3rem; }
.spn-article-card-body h3 a { color: var(--spn-primary, #2c3e6e); }
.spn-article-card-body p { font-size: 0.88rem; color: #555566; margin: 0; }
.spn-article-card-meta { font-size: 0.78rem; color: #888899; margin-top: 0.3rem; }

/* ── Sitemap Page ── */
.spn-sitemap h2 { font-size: 1.1rem; color: var(--spn-primary, #2c3e6e); margin: 1.5rem 0 0.5rem; font-weight: 700; }
.spn-sitemap ul { list-style: none; margin-left: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.spn-sitemap a { font-size: 0.9rem; color: var(--spn-accent, #c09b3d); }

/* ── Footer ── */
.spn-footer {
    background: var(--spn-primary, #2c3e6e);
    color: rgba(255,255,255,0.8);
    padding: 2.5rem 1.25rem 1.5rem;
    margin-top: 3rem;
    font-size: 0.88rem;
}

.spn-footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto 1.5rem;
}

.spn-footer-col h3 {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fff;
    margin-bottom: 0.75rem;
}
.spn-footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.3rem; }
.spn-footer-col li { margin-bottom: 0.35rem; }
.spn-footer-col a { color: rgba(255,255,255,0.7); font-size: 0.83rem; }
.spn-footer-col a:hover { color: #fff; text-decoration: none; }

.spn-footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 1rem;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
    max-width: 1100px;
    margin: 0 auto;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .spn-nav-hamburger { display: flex; }
    .spn-nav { display: none; width: 100%; padding-bottom: 0.75rem; }
    .spn-nav-toggle:checked ~ .spn-nav { display: block; }
    .spn-nav ul { flex-direction: column; gap: 0.5rem; }
    .spn-header-inner { flex-wrap: wrap; }
    .spn-hero { padding: 2.5rem 1rem 2rem; }
    .spn-card-grid { grid-template-columns: 1fr; }
    .spn-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .spn-footer-grid { grid-template-columns: 1fr; }
}
