/* ============================================
   WebPedia Indonesia - CSS Stylesheet
   Teal Color Scheme (#0d9488)
   Wikipedia-inspired layout
   ============================================ */

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

:root {
    --primary: #0d9488;
    --primary-dark: #0a7c72;
    --primary-light: #5eead4;
    --primary-bg: #f0fdfa;
    --text-dark: #1a1a2e;
    --text-body: #334155;
    --text-muted: #64748b;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-gray: #f1f5f9;
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --max-width: 1200px;
    --font-sans: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    --font-serif: Georgia, 'Times New Roman', serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-body);
    background-color: var(--bg-light);
}

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

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

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

h1, h2, h3, h4, h5, h6 {
    color: var(--text-dark);
    line-height: 1.3;
}

/* --- Utility --- */
.content-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Navbar --- */
.navbar {
    background: var(--bg-white);
    border-bottom: 3px solid var(--primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-dark);
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    border-radius: 50%;
    font-family: var(--font-serif);
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}

.logo-text small {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 13px;
    display: block;
    line-height: 1;
    margin-top: -2px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 4px;
}

.nav-link {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-body);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary-bg);
    color: var(--primary);
    text-decoration: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: 0.3s;
}

/* --- Breadcrumb --- */
.breadcrumb {
    background: var(--bg-gray);
    padding: 10px 0;
    font-size: 14px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-light);
}

.breadcrumb a {
    color: var(--primary);
}

.breadcrumb span {
    color: var(--text-body);
    font-weight: 500;
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 60px 0;
    text-align: center;
    color: #fff;
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-logo-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    font-size: 40px;
    font-weight: 700;
    border-radius: 50%;
    font-family: var(--font-serif);
    margin-bottom: 20px;
}

.hero h1 {
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 16px;
    opacity: 0.92;
    margin-bottom: 28px;
    line-height: 1.6;
}

.search-box {
    display: flex;
    max-width: 560px;
    margin: 0 auto 20px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.search-box input {
    flex: 1;
    padding: 14px 18px;
    font-size: 15px;
    border: none;
    outline: none;
    font-family: var(--font-sans);
}

.search-box button {
    padding: 14px 28px;
    background: var(--primary-dark);
    color: #fff;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: background 0.2s;
}

.search-box button:hover {
    background: #086f66;
}

.hero-stats {
    font-size: 14px;
    opacity: 0.85;
}

.hero-stats a {
    color: #fff;
    text-decoration: underline;
}

/* --- Main Content --- */
.main-content {
    padding: 40px 0;
}

/* --- Featured Section --- */
.featured-section {
    margin-bottom: 48px;
}

.featured-section h2 {
    font-size: 22px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
}

.featured-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 24px 28px;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.featured-badge {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.featured-body h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.featured-body h3 a {
    color: var(--text-dark);
}

.featured-body h3 a:hover {
    color: var(--primary);
}

.featured-body p {
    margin-bottom: 12px;
    color: var(--text-body);
}

.read-more {
    display: inline-block;
    margin-top: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--primary);
}

.read-more:hover {
    color: var(--primary-dark);
}

/* --- Entries Grid --- */
.entries-section {
    margin-bottom: 48px;
}

.entries-section h2 {
    font-size: 22px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
}

.entries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.entry-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.entry-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.entry-category {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-bg);
    padding: 2px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.entry-card h3 {
    font-size: 17px;
    margin-bottom: 8px;
}

.entry-card h3 a {
    color: var(--text-dark);
}

.entry-card h3 a:hover {
    color: var(--primary);
}

.entry-card p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.entry-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* --- About Section --- */
.about-section {
    margin-bottom: 48px;
}

.about-section h2 {
    font-size: 22px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
}

.about-content {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 24px 28px;
}

.about-content p {
    margin-bottom: 12px;
}

.about-content p:last-child {
    margin-bottom: 0;
}

/* --- Did You Know --- */
.didyouknow-section {
    margin-bottom: 48px;
}

.didyouknow-section h2 {
    font-size: 22px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
}

.fact-list {
    list-style: none;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 20px 28px;
}

.fact-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    padding-left: 20px;
    position: relative;
    font-size: 15px;
}

.fact-list li::before {
    content: "\2022";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
    font-size: 18px;
}

.fact-list li:last-child {
    border-bottom: none;
}

/* ============================================
   Article Page Styles
   ============================================ */

.article-layout {
    padding: 30px 0 50px;
}

.article-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    align-items: start;
}

/* --- Article Content --- */
.article-content {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 32px 36px;
}

.article-header h1 {
    font-size: 28px;
    font-family: var(--font-serif);
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 12px;
}

.article-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.article-intro {
    background: var(--primary-bg);
    border-left: 4px solid var(--primary);
    padding: 16px 20px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 24px;
    font-size: 15px;
}

.article-intro p {
    margin: 0;
}

/* --- Table of Contents --- */
.toc {
    background: var(--bg-gray);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    margin-bottom: 28px;
}

.toc-title {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.toc-list {
    padding-left: 20px;
}

.toc-list li {
    padding: 3px 0;
    font-size: 14px;
}

.toc-list a {
    color: var(--primary);
}

.toc-list a:hover {
    text-decoration: underline;
}

/* --- Article Sections --- */
.article-content section {
    margin-bottom: 28px;
}

.article-content section h2 {
    font-size: 22px;
    font-family: var(--font-serif);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 6px;
    margin-bottom: 14px;
}

.article-content section h3 {
    font-size: 18px;
    margin-top: 18px;
    margin-bottom: 8px;
}

.article-content section p {
    margin-bottom: 12px;
}

.article-content section ul,
.article-content section ol {
    padding-left: 24px;
    margin-bottom: 12px;
}

.article-content section li {
    margin-bottom: 6px;
}

/* --- References --- */
.references-section {
    border-top: 2px solid var(--border-light);
    padding-top: 20px;
}

.references-list {
    padding-left: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.references-list li {
    margin-bottom: 8px;
}

/* --- External Links --- */
.external-links-section ul {
    list-style: disc;
    padding-left: 24px;
}

.external-links-section li {
    margin-bottom: 6px;
}

/* --- Sidebar / Infobox --- */
.article-sidebar {
    position: sticky;
    top: 80px;
}

.infobox {
    background: var(--bg-white);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 20px;
}

.infobox-header {
    background: var(--primary);
    color: #fff;
    text-align: center;
    padding: 12px 16px;
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-serif);
}

.infobox-image {
    text-align: center;
    padding: 16px;
    background: var(--primary-bg);
}

.infobox-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 80px;
    background: var(--primary);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    letter-spacing: 1px;
}

.infobox-caption {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.infobox-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.infobox-table tr {
    border-bottom: 1px solid var(--border-light);
}

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

.infobox-table th {
    background: var(--bg-gray);
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    width: 40%;
    vertical-align: top;
}

.infobox-table td {
    padding: 8px 12px;
    color: var(--text-body);
}

.sidebar-box {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 20px;
}

.sidebar-box h3 {
    font-size: 15px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-light);
    color: var(--primary-dark);
}

.sidebar-box ul {
    list-style: none;
}

.sidebar-box li {
    padding: 4px 0;
    font-size: 14px;
}

.sidebar-box p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================
   Footer
   ============================================ */

.footer {
    background: var(--text-dark);
    color: #cbd5e1;
    padding: 40px 0 0;
    margin-top: 20px;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col h4 {
    color: #fff;
    font-size: 15px;
    margin-bottom: 12px;
}

.footer-col p {
    font-size: 13px;
    line-height: 1.6;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    padding: 3px 0;
}

.footer-col a {
    color: #94a3b8;
    font-size: 13px;
    transition: color 0.2s;
}

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

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    font-size: 13px;
    color: #64748b;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1024px) {
    .article-grid {
        grid-template-columns: 1fr 260px;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    /* Navbar */
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        padding: 10px 0;
        border-bottom: 2px solid var(--primary);
        box-shadow: var(--shadow-md);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-link {
        padding: 10px 20px;
    }

    /* Hero */
    .hero {
        padding: 40px 0;
    }

    .hero h1 {
        font-size: 22px;
    }

    .search-box {
        flex-direction: column;
        border-radius: var(--radius-md);
    }

    .search-box input,
    .search-box button {
        border-radius: 0;
    }

    .search-box input {
        border-radius: var(--radius-md) var(--radius-md) 0 0;
    }

    .search-box button {
        border-radius: 0 0 var(--radius-md) var(--radius-md);
    }

    /* Entries */
    .entries-grid {
        grid-template-columns: 1fr;
    }

    /* Article Grid */
    .article-grid {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        position: static;
        order: -1;
    }

    .article-content {
        padding: 20px 22px;
    }

    .article-header h1 {
        font-size: 22px;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 19px;
    }

    .featured-card {
        padding: 16px 18px;
    }

    .entry-card {
        padding: 16px 18px;
    }

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

    .article-content {
        padding: 16px 18px;
    }

    .article-content section h2 {
        font-size: 19px;
    }

    .infobox-table th,
    .infobox-table td {
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* --- Print Styles --- */
@media print {
    .navbar, .search-box, .nav-toggle, .footer {
        display: none;
    }

    body {
        background: #fff;
        color: #000;
        font-size: 12pt;
    }

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

    a {
        color: #000;
        text-decoration: underline;
    }
}
