/* ========================================
   PRODIAKON - STYLE.CSS (CLEAN VERSION)
   ======================================== */

/* 🎨 CSS VARIABLES - SEMUA DALAM SATU :root */
:root {
    /* Colors - Primary Palette */
    --primary: #2A2000;
    --secondary: #8b7500;
    --accent: #423200;
    --success: #27AE60;
    
    /* Colors - UI */
    --bg-light: #F8F9FA;
    --text-dark: #2C3E50;
    --text-muted: #6C757D;
    --border: #DEE2E6;
    --shadow: 0 4px 6px rgba(0,0,0,0.08);
    --radius: 8px;
    
    /* Navbar Variables (Elegan) */
    --nav-bg: rgba(255, 255, 255, 0.92);
    --nav-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --nav-link: #2C3E50;
    --nav-hover: #E74C3C;
    --nav-active-bg: rgba(231, 76, 60, 0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Fonts */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

/* 🧹 RESET & BASE */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background: var(--bg-light);
    line-height: 1.6;
}
a { text-decoration: none; color: var(--accent); transition: 0.2s; }
a:hover { color: var(--secondary); }
img { max-width: 100%; height: auto; display: block; }

/* 📐 LAYOUT UTILITIES */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 4rem 0; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* 📝 TYPOGRAPHY */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-dark);
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

/* 🔘 BUTTONS */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 500;
    border: 2px solid transparent;
    cursor: pointer;
    transition: 0.2s;
    text-align: center;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #2980B9; color: #fff; }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { background: #C0392B; color: #fff; }
.btn-outline { border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

/* 🃏 CARDS & BADGES */
.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s;
}
.card:hover { transform: translateY(-4px); }
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
}
.badge-new { background: #E8F5E9; color: var(--success); }
.badge-disc { background: #FFF3E0; color: #E65100; }

/* 📋 FORMS */
.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(52,152,219,0.2);
}

/* 🧭 NAVBAR ELEGAN (MERGED) */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(0,0,0,0.04);
    transition: var(--transition);
    box-shadow: var(--shadow);
}
.navbar.scrolled { box-shadow: var(--nav-shadow); }

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Logo */
.navbar-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--nav-link);
    letter-spacing: -0.5px;
}
.navbar-logo span { color: var(--nav-hover); }

.logo-img {
    height: 35px;
    width: auto;
    display: block;
}
.logo-text {
    font-family: var(--font-heading);
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--nav-link);
    letter-spacing: -0.5px;
}
.logo-text span { color: var(--nav-hover); }

/* Hamburger Toggle */
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
}
.navbar-toggle .bar {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--nav-link);
    border-radius: 2px;
    transition: var(--transition);
}

/* Menu */
.navbar-menu {
    display: flex;
    align-items: center;
    gap: 0.1rem;
}
.navbar-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.2rem;
}
.nav-link {
    position: relative;
    text-decoration: none;
    color: var(--nav-link);
    font-weight: 500;
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-link i {
    width: 16px;
    text-align: center;
    font-size: 0.95em;
}
.nav-link:hover {
    color: var(--nav-hover);
    background: #FAEBD7
}
.nav-link.active {
    color: var(--nav-hover);
    background: var(--nav-active-bg);
    font-weight: 600;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--nav-hover);
    transition: var(--transition);
    transform: translateX(-50%);
}
.nav-link:hover::after,
.nav-link.active::after { width: 65%; }

/* Navbar Actions (Buttons) */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.nav-btn {
    padding: 0.55rem 0.4rem;
    border-radius: 50px;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.88rem;
    transition: var(--transition);
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.nav-btn i {
    width: 16px;
    text-align: center;
    font-size: 0.95em;
}
.nav-btn.btn-primary { background: var(--accent); color: #fff; }
.nav-btn.btn-primary:hover {
    background: #2980B9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52,152,219,0.25);
}
.nav-btn.btn-secondary { background: var(--secondary); color: #fff; }
.nav-btn.btn-secondary:hover {
    background: #C0392B;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231,76,60,0.25);
}
.nav-btn.btn-outline {
    border-color: var(--primary);
    color: var(--primary);
    background: transparent;
}
.nav-btn.btn-outline:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

/* Mobile Navbar */
@media (max-width: 992px) {
    .navbar-toggle { display: flex; }
    .navbar-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 260px;
        height: 100vh;
        background: #fff;
        flex-direction: column;
        align-items: flex-start;
        padding: 5rem 1.5rem 2rem;
        gap: 1.2rem;
        box-shadow: -4px 0 20px rgba(0,0,0,0.08);
        transition: right 0.4s cubic-bezier(0.4,0,0.2,1);
        z-index: 999;
    }
    .navbar-menu.open { right: 0; }
    .navbar-links {
        flex-direction: column;
        width: 100%;
        gap: 0.4rem;
    }
    .nav-link {
        width: 100%;
        padding: 0.75rem 0.8rem;
    }
    .nav-link::after { display: none; }
    .navbar-actions {
        flex-direction: column;
        width: 100%;
        margin-top: 1rem;
    }
    .nav-btn { width: 100%; text-align: center; }
    
    /* Hamburger Animation */
    .navbar-toggle.open .bar:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    .navbar-toggle.open .bar:nth-child(2) { opacity: 0; }
    .navbar-toggle.open .bar:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    /* Overlay */
    .nav-overlay {
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100%;
        background: rgba(0,0,0,0.35);
        z-index: 998;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
    }
    .nav-overlay.show {
        opacity: 1;
        pointer-events: auto;
    }
}

/* Logo Responsive */
@media (max-width: 576px) {
    .logo-img { height: 38px; }
    .logo-text { font-size: 1.3rem; }
}

/* 🎨 HERO SECTION */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    padding: 2rem 0;
    text-align: center;
}
.hero h1 { font-size: 3rem; margin-bottom: 1rem; color: #fff; }
.hero p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

/* 📦 GRID SYSTEM */
.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* 🛍️ ITEM CARD */
.item-card .thumb {
    height: 200px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.item-card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.item-card .body { padding: 1.5rem; }
.item-card .meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.item-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.item-card .price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary);
}

/* 🔢 PAGINATION */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.pagination a:hover { background: var(--bg-light); }
.pagination .active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* 🦶 FOOTER */
footer {
    background: var(--primary);
    color: #b8860b;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}
footer a { color: #fff; }
footer a:hover { color: #fff; }
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
}

/* 🧰 TOOLBAR HINT (Editor) */
.toolbar-hint {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px dashed #ddd;
}
.toolbar-hint span {
    font-size: 0.75rem;
    color: #555;
    background: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #eee;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.toolbar-hint span b {
    color: var(--primary);
    font-weight: 600;
}

/* ========================================
   📄 ARTICLE DETAIL PAGE
   ======================================== */
.article-container {
    max-width: 800px;
    margin: 0 auto;
}

.article-title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-weight: 700;
}

.article-meta {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.8rem;
    align-items: center;
}
.article-meta .meta-separator {
    color: var(--border);
    font-weight: normal;
}

.article-featured-image {
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.article-content {
    line-height: 1.8;
    font-size: 1.05rem;
    overflow-wrap: break-word;
    word-break: break-word;
    color: var(--text-dark);
}
.article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem 0;
    border-radius: var(--radius);
}

.article-share {
    margin: 2rem 0;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
}
.share-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}
.share-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.related-ebooks {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px dashed var(--border);
}
.related-ebooks h3 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}
.related-ebooks .text-muted {
    margin-bottom: 1.5rem;
}

.breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.breadcrumb a {
    color: var(--accent);
    text-decoration: none;
}
.breadcrumb a:hover {
    text-decoration: underline;
}

/* 📱 RESPONSIVE ARTICLE */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    
    .article-title {
        font-size: 1.4rem;
        line-height: 1.4;
    }
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }
    .article-meta .meta-separator { display: none; }
    .article-share {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .grid-4 { grid-template-columns: 1fr; }
}
/* ===== Footer YouTube Grid Layout ===== */
.footer-youtube {
    grid-column: 1 / -1; /* Full width di footer grid */
}

.footer-youtube h4 {
    margin-bottom: 1rem;
    color: #fff;
    font-size: 1.1rem;
    border-bottom: 2px solid #ff0000;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.video-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Responsive grid */
    gap: 1rem;
    margin-bottom: 1rem;
}

.video-item {
    display: flex;
    flex-direction: column;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
    max-width: 250px; /* Batasi ukuran maksimal */
}

.video-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.3);
}

.video-thumb {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Rasio 16:9 */
    background: #000;
    overflow: hidden;
}

.video-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.video-item:hover .video-thumb img {
    transform: scale(1.05);
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 0, 0, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s;
}

.video-item:hover .play-icon {
    opacity: 1;
}

.video-info {
    padding: 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.video-title {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Batasi 2 baris */
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    color: #fff;
}

.video-date {
    color: #aaa;
    font-size: 0.75rem;
    margin: 0;
}

.view-all {
    display: inline-block;
    color: #ffffff; /* ✅ Ubah dari #ff0000 ke putih */
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s, opacity 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.3); /* Optional: border halus */
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.view-all:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15); /* Efek hover halus */
    text-decoration: none;
    opacity: 0.9;
}

.view-all:active {
    opacity: 0.7;
}

/* ===== Responsive: Mobile ===== */
@media (max-width: 768px) {
    .video-list {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); /* Lebih kecil di mobile */
        gap: 0.75rem;
    }
    
    .video-title {
        font-size: 0.8rem;
    }
    
    .video-thumb {
        padding-top: 56.25%;
    }
}

@media (max-width: 480px) {
    .video-list {
        grid-template-columns: 1fr; /* 1 kolom di layar sangat kecil */
    }
    
    .video-item {
        max-width: 100%;
        flex-direction: row; /* Horizontal di mobile */
    }
    
    .video-thumb {
        width: 120px;
        padding-top: 0;
        flex-shrink: 0;
    }
    
    .video-info {
        padding: 0.5rem 0.75rem;
    }
}