/* --- VARIABLES & RESET --- */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --bg-body: #f3f4f6;
    --bg-card: #ffffff;
    --border: #e5e7eb;
    --nav-height: 70px;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --container-width: 1280px;
}

[data-theme="dark"] {
    --primary: #3b82f6;
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --bg-body: #111827;
    --bg-card: #1f2937;
    --border: #374151;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg-body); color: var(--text-main); padding-top: var(--nav-height); line-height: 1.6; }
a { text-decoration: none; color: inherit; transition: 0.2s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container { max-width: var(--container-width); margin: 0 auto; padding: 0 1.5rem; }

/* --- HEADER --- */
.site-header { background: var(--bg-card); border-bottom: 1px solid var(--border); height: var(--nav-height); position: fixed; top: 0; left: 0; right: 0; z-index: 100; display: flex; align-items: center; }
.header-inner { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo { font-weight: 800; font-size: 1.4rem; color: var(--text-main); display: flex; align-items: center; gap: 0.5rem; }
.logo span { color: var(--primary); }

.main-nav ul { display: flex; gap: 2rem; }
.main-nav a { font-weight: 600; font-size: 0.95rem; color: var(--text-muted); position: relative; }
.main-nav a:hover { color: var(--primary); }
.main-nav a.active { color: var(--primary); }
.main-nav a.active::after { content: ''; position: absolute; bottom: -24px; left: 0; right: 0; height: 3px; background: var(--primary); border-radius: 3px 3px 0 0; }

.header-actions { display: flex; gap: 0.5rem; align-items: center; }
.header-actions button { background: none; border: none; color: var(--text-main); font-size: 1.2rem; cursor: pointer; padding: 0.5rem; border-radius: 50%; transition: background 0.2s; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.header-actions button:hover { background: rgba(0,0,0,0.05); }
[data-theme="dark"] .header-actions button:hover { background: rgba(255,255,255,0.1); }

/* Mobile Menu */
.mobile-menu-btn { display: none !important; }
@media (max-width: 768px) {
    .mobile-menu-btn { display: flex !important; }
    .main-nav { position: fixed; top: var(--nav-height); left: 0; right: 0; background: var(--bg-card); border-bottom: 1px solid var(--border); padding: 1.5rem; transform: translateY(-150%); transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 99; box-shadow: var(--shadow); }
    .main-nav.active { transform: translateY(0); }
    .main-nav ul { flex-direction: column; text-align: center; gap: 1.5rem; }
    .main-nav a.active::after { display: none; }
    .main-nav a.active { background: rgba(37, 99, 235, 0.1); padding: 0.5rem 1rem; border-radius: 50px; display: inline-block; }
}

/* --- HERO SLIDER --- */
.hero-slider { 
    position: relative; 
    height: 480px; 
    margin: 2rem 0; 
    border-radius: var(--radius); 
    overflow: hidden; 
    background: var(--bg-card);
    box-shadow: var(--shadow); 
}

.slide { 
    position: absolute; 
    inset: 0; 
    opacity: 0; 
    transition: opacity 0.8s ease; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background-size: cover; 
    background-position: center; 
    z-index: 1;
}
.slide.active { opacity: 1; z-index: 10; }
.slide-inner { width: 100%; max-width: 1100px; padding: 2rem; display: flex; align-items: center; justify-content: center; height: 100%; z-index: 2; position: relative; }

.slide-layout-center { text-align: center; color: white; max-width: 800px; }
.slide-layout-center h2 { font-size: clamp(1.8rem, 5vw, 2.5rem); margin-bottom: 1rem; font-weight: 800; line-height: 1.2; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }

.slide-layout-split { display: flex; align-items: center; gap: 3rem; width: 100%; justify-content: space-between; color: white; }
.slide-img-col { 
    flex: 0 0 400px; 
    height: 320px; 
    background: rgba(0, 0, 0, 0.3); 
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px; 
    padding: 1rem; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); 
}
.slide-img-col img { max-width: 100%; max-height: 100%; object-fit: contain; }
.slide-text-col { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.slide-text-col h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); margin-bottom: 1rem; font-weight: 800; line-height: 1.2; }
.slide-text-col p { 
    font-size: 1rem; margin-bottom: 1.5rem; opacity: 0.9; line-height: 1.5; max-width: 500px;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}

.slide-badge { display: inline-block; background: rgba(255,255,255,0.2); backdrop-filter: blur(5px); border: 1px solid rgba(255,255,255,0.3); padding: 6px 16px; border-radius: 50px; font-size: 0.75rem; font-weight: 700; margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: white; }
.slide-btn { display: inline-flex; align-items: center; gap: 0.5rem; background: white; color: #1f2937; padding: 0.75rem 1.5rem; border-radius: 50px; font-weight: 700; text-transform: uppercase; font-size: 0.85rem; transition: transform 0.2s; cursor: pointer; border: none; align-self: flex-start; }
.slide-btn:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.2); color: var(--primary); }

@media (max-width: 768px) {
    .hero-slider { height: auto; min-height: 520px; }
    .slide { position: absolute; min-height: 100%; padding: 1rem 0; }
    .slide-inner { padding: 1rem; height: 100%; align-items: center; }
    .slide-layout-split { flex-direction: column; text-align: center; gap: 1rem; align-items: center; justify-content: center; }
    .slide-img-col { flex: 0 0 140px; height: 140px; width: 140px; padding: 0.5rem; } 
    .slide-text-col { align-items: center; }
    .slide-text-col p { -webkit-line-clamp: 3; margin-bottom: 1rem; font-size: 0.9rem; line-height: 1.4; }
    .slide-layout-center h2 { font-size: 1.6rem; }
    .slide-btn { align-self: center; margin: 0 auto; padding: 0.6rem 1.2rem; font-size: 0.8rem; }
}

/* Background Gradients */
.bg-gradient-blue { background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%); }
.bg-gradient-dark { background: linear-gradient(135deg, #0f172a 0%, #334155 100%); }
.bg-gradient-teal { background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%); }
.bg-gradient-purple { background: linear-gradient(135deg, #581c87 0%, #8b5cf6 100%); }

/* --- SEARCH SECTION --- */
.search-section { margin: 2rem 0; }
.search-box { position: relative; max-width: 600px; margin: 0 auto; }
.search-input { width: 100%; padding: 1rem 1.5rem 1rem 3rem; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-main); outline: none; }
.search-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); }

/* --- GRID LAYOUTS --- */
.section-title { font-size: 1.8rem; margin-bottom: 1.5rem; font-weight: 700; display: flex; align-items: center; gap: 0.75rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.blog-card { background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; cursor: pointer; display: flex; flex-direction: column; height: 100%; min-height: 200px; }
.blog-card:hover { transform: translateY(-5px); border-color: var(--primary); box-shadow: 0 10px 20px -5px rgba(0,0,0,0.1); }

/* Blog Image Wrapper - Contain Style */
.blog-img-wrap {
    height: 160px;
    width: 100%; 
    overflow: hidden;
    background-color: #f1f5f9; 
    border-bottom: 1px solid var(--border);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

[data-theme="dark"] .blog-img-wrap {
    background-color: #1f2937;
}

.blog-img {
    width: 100%; 
    height: 100%;
    object-fit: contain; 
    object-position: center; 
    transition: transform 0.5s ease;
    mix-blend-mode: multiply;
}

[data-theme="dark"] .blog-img {
    mix-blend-mode: normal;
}

.blog-card:hover .blog-img { transform: scale(1.05); }

/* Font Size & Susunan */
.blog-content { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }

.blog-title { 
    margin: 0 0 0.5rem 0; 
    font-size: 1.15rem; 
    font-weight: 800; 
    line-height: 1.35; 
    color: var(--text-main); 
}

.blog-date { 
    font-size: 0.75rem; 
    color: var(--text-muted); 
    display: flex; 
    align-items: center; 
    gap: 0.4rem; 
    font-weight: 500; 
    margin-top: auto; 
}

.read-more-link { display: none; }

/* UPDATE: Service Image Styles */
.service-img-wrap {
    height: 100px; width: 100%; overflow: hidden;
    background-color: #e2e8f0; border-bottom: 1px solid var(--border); position: relative;
}
.service-img {
    width: 100%; height: 100%; 
    object-fit: contain; /* UPDATED: Guna contain */
    object-position: center; /* UPDATED: Center lebih kemas */
    transition: transform 0.5s ease; 
    padding: 20px;
}
.blog-card:hover .service-img { transform: scale(1.05); }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.5rem; }
.product-card { background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; transition: 0.2s; display: flex; flex-direction: column; height: 100%; position: relative; color: inherit; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); border-color: var(--primary); }
.product-img-wrap { height: 180px; overflow: hidden; background: #f8fafc; display: flex; align-items: center; justify-content: center; padding: 1rem; }
[data-theme="dark"] .product-img-wrap { background: #1f2937; }
.product-img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
[data-theme="dark"] .product-img { mix-blend-mode: normal; }
.product-info { padding: 1rem; flex-grow: 1; display: flex; flex-direction: column; }
.product-badge { position: absolute; top: 10px; right: 10px; background: #333; padding: 4px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 700; color: white; box-shadow: 0 2px 4px rgba(0,0,0,0.1); z-index: 2; }
.product-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 2.8em; }

/* --- MODAL (POPUP) --- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 1000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(8px); padding: 1.5rem; }
.modal-overlay.active { display: flex; animation: fadeIn 0.3s ease-out; }
.modal-content { 
    background: var(--bg-card); width: 100%; max-width: 1200px; 
    max-height: 90vh; overflow-y: auto; border-radius: 16px; 
    position: relative; padding: 3rem; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); 
}
.modal-close { position: absolute; top: 1.5rem; right: 1.5rem; background: var(--bg-body); border: none; font-size: 1.5rem; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; color: var(--text-main); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal-close:hover { background: #fee2e2; color: #ef4444; }

/* --- MARKDOWN CONTENT --- */
.modal-body { font-size: 1.1rem; line-height: 1.8; color: var(--text-main); }
.modal-body h1 { font-size: 2.2rem; margin-bottom: 1.5rem; line-height: 1.2; font-weight: 800; border-bottom: 2px solid var(--border); padding-bottom: 1rem; }
.modal-body h2 { font-size: 1.7rem; margin-top: 2.5rem; margin-bottom: 1.2rem; color: var(--primary); font-weight: 700; }
.modal-body h3 { font-size: 1.4rem; margin-top: 2rem; margin-bottom: 1rem; font-weight: 700; }
.modal-body h4 { font-size: 1.2rem; margin-top: 1.5rem; margin-bottom: 0.5rem; font-weight: 700; }
.modal-body p { margin-bottom: 1.5rem; }
.modal-body img { max-width: 100%; height: auto; border-radius: 12px; margin: 2rem auto; display: block; box-shadow: var(--shadow); }

.modal-body ul { list-style: disc; margin-bottom: 1.5rem; padding-left: 1.5rem; }
.modal-body ol { list-style: decimal; margin-bottom: 1.5rem; padding-left: 1.5rem; }
.modal-body li { margin-bottom: 0.6rem; }

.modal-body blockquote { border-left: 5px solid var(--primary); padding: 1.5rem; background: rgba(37, 99, 235, 0.05); color: var(--text-muted); font-style: italic; border-radius: 0 8px 8px 0; margin: 2rem 0; }
.modal-body code { background: rgba(0,0,0,0.05); padding: 0.2rem 0.5rem; border-radius: 5px; font-family: 'Courier New', monospace; font-size: 0.9em; color: #d63384; }
.modal-body pre { background: #1e1e1e; color: #fff; padding: 1.5rem; border-radius: 10px; overflow-x: auto; margin: 1.5rem 0; }
.modal-body pre code { background: transparent; color: inherit; padding: 0; }
.modal-body table { width: 100%; border-collapse: collapse; margin: 2rem 0; overflow-x: auto; display: block; }
.modal-body th, .modal-body td { border: 1px solid var(--border); padding: 1rem; text-align: left; }
.modal-body th { background: var(--bg-body); font-weight: 700; }
.modal-body tr:nth-child(even) { background-color: rgba(0,0,0,0.02); }
.modal-body hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }

/* --- SHARE BAR --- */
.modal-share { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.share-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; border-radius: 50px; border: 1px solid var(--border); background: var(--bg-body); color: var(--text-main); font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: 0.2s; }
.share-btn:hover { background: var(--bg-card); border-color: var(--primary); color: var(--primary); }
.share-btn.primary { background: var(--primary); color: white; border-color: var(--primary); }
.share-btn.primary:hover { background: var(--primary-dark); }

/* --- IKLAN MODAL --- */
.modal-ad-section { margin-top: 4rem; padding-top: 2rem; border-top: 2px dashed var(--border); }
.modal-ad-title { font-size: 0.9rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; margin-bottom: 1.2rem; display: flex; align-items: center; gap: 0.5rem; }
.modal-ad-card { display: flex; gap: 1.5rem; background: var(--bg-body); padding: 1.2rem; border-radius: 12px; align-items: center; text-decoration: none; border: 1px solid transparent; }
.modal-ad-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.modal-ad-img { width: 80px; height: 80px; object-fit: contain; background: white; border-radius: 8px; flex-shrink: 0; }
.modal-ad-info h4 { font-size: 1.1rem; color: var(--text-main); margin-bottom: 0.3rem; }
.modal-ad-info p { font-size: 0.85rem; color: var(--text-muted); margin: 0; line-clamp: 2; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }

@media (max-width: 600px) {
    .modal-ad-card { flex-direction: column; text-align: center; }
    .modal-ad-img { width: 120px; height: 120px; }
    .modal-content { padding: 1.5rem; }
}

/* --- PAGINATION & FOOTER --- */
.pagination { display: flex; justify-content: center; gap: 0.5rem; margin: 3rem 0; }
.page-btn { padding: 0.6rem 1.2rem; border: 1px solid var(--border); background: var(--bg-card); border-radius: 8px; cursor: pointer; color: var(--text-main); font-weight: 600; transition: 0.2s; }
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

.site-footer { background: var(--bg-card); text-align: center; padding: 3rem 1rem; color: var(--text-muted); border-top: 1px solid var(--border); margin-top: auto; }
.site-footer a { color: var(--primary); font-weight: 600; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }