/* lokasi file : assets/style.css (v.7 - Layout Fixed & Fully Responsive) */

:root { 
    --bg-color: #f3f4f6; 
    --text-color: #1f2937; 
    --text-muted: #6b7280; 
    --card-bg: #ffffff; 
    --border-color: #e5e7eb; 
    --hover-bg: #f9fafb; 
    --primary-grad: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%); 
    --accent-color: #2563eb; 
}
[data-theme="dark"] { 
    --bg-color: #0b0f19; 
    --text-color: #f3f4f6; 
    --text-muted: #9ca3af; 
    --card-bg: #111827; 
    --border-color: #374151; 
    --hover-bg: #1f2937; 
    --primary-grad: linear-gradient(135deg, #020617 0%, #0f172a 100%); 
    --accent-color: #3b82f6; 
}
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', system-ui, sans-serif; }
body { background-color: var(--bg-color); color: var(--text-color); line-height: 1.6; transition: 0.3s; overflow-x: hidden; width: 100%; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* 1. HEADER & TOP BAR */
.top-bar-wrapper { background: var(--primary-grad); color: #ffffff; position: sticky; top: 0; z-index: 100; box-shadow: 0 4px 15px rgba(0,0,0,0.1); animation: slideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; transform: translateY(-100%); width: 100%; }
@keyframes slideDown { to { transform: translateY(0); } }

.marquee-container { border-bottom: 1px solid rgba(255,255,255,0.1); padding: 8px 0; overflow: hidden; white-space: nowrap; font-size: 0.85rem; width: 100%; }
.marquee-content { display: inline-block; animation: marquee 25s linear infinite; }
@keyframes marquee { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

header { padding: 15px 5%; display: flex; justify-content: space-between; align-items: center; max-width: 1400px; margin: 0 auto; width: 100%; }
.logo img { max-height: 40px; width: auto; }
.desktop-menu { display: flex; gap: 20px; align-items: center; }
.desktop-menu a { font-size: 0.95rem; font-weight: 600; opacity: 0.9; position: relative; white-space: nowrap; }
.desktop-menu a::after { content:''; position:absolute; width:0; height:2px; background:#fff; bottom:-5px; left:0; transition:0.3s;}
.desktop-menu a:hover::after { width:100%; }

.nav-controls { display: flex; gap: 10px; align-items: center; }
.btn-icon { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); padding: 8px 12px; cursor: pointer; color: #ffffff; border-radius: 6px; font-size: 1.1rem; transition: 0.2s; display: flex; align-items: center;}
.btn-icon:hover { background: rgba(255,255,255,0.3); transform: scale(1.05);}

.mobile-menu { display: none; background: var(--card-bg); border-bottom: 1px solid var(--border-color); overflow-x: auto; white-space: nowrap; padding: 12px 5%; gap: 20px; width: 100%; }
.mobile-menu::-webkit-scrollbar { display: none; }
.mobile-menu a { font-size: 0.9rem; font-weight: 600; color: var(--text-color); }

/* 2. OVERLAY SEARCH */
#searchOverlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.95); z-index: 1000; justify-content: center; align-items: center; backdrop-filter: blur(8px); }
.search-box { width: 90%; max-width: 700px; position: relative; text-align: center; animation: popUp 0.3s ease-out; }
@keyframes popUp { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.close-search { position: absolute; top: -40px; right: 0; font-size: 2rem; cursor: pointer; color: #fff; transition: 0.2s;}
.close-search:hover { color: #ef4444; transform: rotate(90deg); }
.search-input-group { display: flex; gap: 5px; margin-bottom: 25px; background: #fff; padding: 8px; border-radius: 50px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); width: 100%; }
.search-input-group input { flex-grow: 1; padding: 10px 20px; font-size: 1.2rem; border: none; background: transparent; color: #1f2937; outline: none; border-radius: 50px; width: 100%; }
.btn-search { background: var(--accent-color); color: #fff; border: none; padding: 0 35px; border-radius: 40px; font-weight: bold; cursor: pointer; font-size: 1rem; transition: 0.2s; white-space: nowrap;}
.btn-search:hover { background: #1d4ed8; }
.search-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.tag { background: rgba(255,255,255,0.1); color: #fff; padding: 6px 15px; border-radius: 20px; font-size: 0.9rem; border: 1px solid rgba(255,255,255,0.3); cursor: pointer; transition: 0.2s;}
.tag:hover { background: var(--accent-color); border-color: var(--accent-color); }

/* 3. HERO SECTION */
.hero { display: flex; min-height: 55vh; background: #000; position: relative; overflow: hidden; width: 100%; }
.hero-slides { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.hero-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.5s ease; }
.hero-slide.active { opacity: 1; }
.hero::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(90deg, rgba(15,23,42, 0.95) 0%, rgba(15,23,42, 0.7) 50%, transparent 100%); z-index: 2; }
.hero-content { display: flex; width: 100%; z-index: 3; position: relative; max-width: 1400px; margin: 0 auto;}
.hero-left { flex: 1; padding: 5%; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.hero-title { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 15px; font-weight: 800; color: #ffffff; line-height: 1.2;}
.hero-desc { font-size: 1.1rem; margin-bottom: 25px; max-width: 600px; color: #e2e8f0; }
.btn-primary { background: var(--accent-color); color: #fff; padding: 12px 24px; border-radius: 6px; font-weight: 600; border: none; cursor: pointer; font-size: 1rem; transition: 0.2s; white-space: nowrap; }
.btn-outline { background: transparent; color: #fff; padding: 12px 24px; border-radius: 6px; font-weight: 600; border: 2px solid #fff; cursor: pointer; font-size: 1rem; transition: 0.2s; white-space: nowrap; }
.btn-outline:hover { background: #fff; color: #000; }

/* 4. MAIN LAYOUT & GRID FIX (Mencegah Breakout/Berantakan) */
.main-container { display: grid; grid-template-columns: 2.8fr 1.2fr; gap: 40px; padding: 40px 5%; max-width: 1400px; margin: 0 auto; width: 100%; }
.content-left, .content-right { min-width: 0; width: 100%; } /* CRITICAL FIX: Mencegah konten mendesak grid melebar melebihi layar */

.section-title { font-size: 1.5rem; font-weight: 800; color: var(--text-color); border-bottom: 2px solid var(--border-color); padding-bottom: 10px; margin-bottom: 25px; display: inline-block; position: relative; max-width: 100%; word-wrap: break-word;}
.section-title::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 60px; height: 3px; background: var(--accent-color); }

/* 5. ABOUT SECTION & TEAM CAROUSEL */
.about-section { display: flex; flex-direction: column; margin-bottom: 50px; background: var(--card-bg); padding: 30px; border-radius: 12px; border: 1px solid var(--border-color); width: 100%; }
.about-content-wrapper { display: flex; gap: 30px; align-items: center; width: 100%; flex-wrap: wrap; }
.about-img { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; border: 4px solid var(--border-color); flex-shrink: 0;}

.team-carousel-wrapper { display: flex; gap: 20px; overflow-x: auto; padding: 10px 5px 20px 5px; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--accent-color) var(--border-color); margin-top: 15px; width: 100%; }
.team-carousel-wrapper::-webkit-scrollbar { height: 8px; }
.team-carousel-wrapper::-webkit-scrollbar-track { background: var(--border-color); border-radius: 10px; }
.team-carousel-wrapper::-webkit-scrollbar-thumb { background: var(--accent-color); border-radius: 10px; }
.team-card { flex: 0 0 250px; background: var(--bg-color); border: 1px solid var(--border-color); border-radius: 12px; padding: 25px 20px; text-align: center; scroll-snap-align: start; transition: transform 0.3s, box-shadow 0.3s; max-width: 100%; }
.team-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); border-color: var(--accent-color); }
.team-img { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; margin: 0 auto 15px auto; border: 3px solid var(--border-color); transition: border-color 0.3s; }
.team-card:hover .team-img { border-color: var(--accent-color); }
.team-name { font-weight: 800; font-size: 1.1rem; color: var(--text-color); margin-bottom: 5px; }
.team-position { font-size: 0.85rem; color: var(--accent-color); font-weight: 700; text-transform: uppercase; margin-bottom: 12px; letter-spacing: 1px; }
.team-about { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* 6. SERVICES & ARTICLES GRID */
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 15px; margin-bottom: 50px; width: 100%; }
.service-card { background: var(--card-bg); padding: 30px 15px; border: 1px solid var(--border-color); border-radius: 12px; text-align: center; transition: 0.3s; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; width: 100%; }
.service-icon { font-size: 3.5rem; display: block; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.05)); transition: 0.3s;}
.service-card:hover { transform: translateY(-5px); border-color: var(--accent-color); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }

.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-bottom: 40px; width: 100%; }
.article-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; transition: 0.2s; width: 100%; }
.article-card:hover { box-shadow: 0 10px 25px rgba(0,0,0,0.08); transform: translateY(-3px);}
.article-img-wrap { position: relative; padding-top: 55%; width: 100%; }
.article-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.article-content { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; width: 100%; }
.article-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; line-height: 1.4;}

/* 7. SIDEBAR (Ads & Trending) */
.ads-square { background: var(--hover-bg); border: 2px dashed var(--border-color); border-radius: 12px; padding: 15px; text-align: center; margin-bottom: 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 280px; width: 100%; }
.sidebar-widget { background: var(--card-bg); padding: 25px; border-radius: 12px; border: 1px solid var(--border-color); margin-bottom: 30px; width: 100%; overflow: hidden; }
.trending-list { list-style: none; counter-reset: trend; }
.trending-item { padding: 15px 0; border-bottom: 1px dashed var(--border-color); display: flex; gap: 15px; align-items: center;}
.trending-item:last-child { border-bottom: none; padding-bottom: 0;}
.trending-item::before { counter-increment: trend; content: counter(trend); font-size: 2rem; font-weight: 900; font-family: Impact; transition: 0.3s;}

.trending-item:nth-child(1)::before { color: #f97316; }
.trending-item:nth-child(2)::before { color: #fdba74; text-shadow: 0 0 8px rgba(253, 186, 116, 0.7); }
.trending-item:nth-child(3)::before { color: #9ca3af; }
.trending-item:nth-child(n+4)::before { color: #d1d5db; }
.trend-meta { font-size: 0.8rem; color: var(--accent-color); font-weight: 700; display: block; margin-bottom: 5px; text-transform: uppercase;}

/* 8. TESTIMONIALS & SKELETON */
.testi-section { padding: 60px 5%; background: var(--card-bg); border-top: 1px solid var(--border-color); width: 100%; }
.testi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; max-width: 1400px; margin: 0 auto; width: 100%; }
.testi-card { background: var(--bg-color); padding: 30px; border-radius: 12px; border: 1px solid var(--border-color); position: relative; width: 100%; }
.testi-card::before { content: '"'; position: absolute; top: 10px; right: 20px; font-size: 5rem; color: var(--border-color); opacity: 0.3; font-family: serif; line-height: 1;}
.testi-msg { font-style: italic; color: var(--text-muted); margin-bottom: 20px; position: relative; z-index: 2;}

.skeleton { background: linear-gradient(90deg, var(--border-color) 25%, var(--card-bg) 50%, var(--border-color) 75%); background-size: 200% 100%; animation: loading 1.5s infinite; border-radius: 8px; width: 100%; }
@keyframes loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
html.fast-load .skeleton-layer { display: none !important; }
html.fast-load .real-layer { display: block !important; opacity: 1 !important; }
.real-layer { display: none; opacity: 0; transition: opacity 0.5s ease; width: 100%; }

/* 9. RESPONSIVE MEDIA QUERIES (Mencegah Overflow di Mobile) */
@media (max-width: 992px) { 
    .desktop-menu { display: none; } 
    .mobile-menu { display: flex; } 
    .main-container { grid-template-columns: 1fr; } 
    .about-content-wrapper { flex-direction: column; text-align: center; } 
    .hero::after { background: rgba(15,23,42, 0.85); } 
}

@media (max-width: 768px) { 
    .search-input-group { flex-direction: column; background: transparent; box-shadow: none; padding: 0; } 
    .search-input-group input { background: #fff; border-radius: 12px; padding: 15px; } 
    .btn-search { padding: 15px; border-radius: 12px; width: 100%; } 
    
    .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .service-card { padding: 20px 10px; }
    .service-icon { font-size: 2.8rem; }
    
    .articles-grid { grid-template-columns: 1fr; }
    .testi-grid { grid-template-columns: 1fr; }
    .team-card { flex: 0 0 85%; }
}