:root {
    --gold: #eab308;
    --gold-dark: #ca8a04;
    --gold-light: #fde047;
    --red: #dc2626;
    --bg: #09090b;
    --bg-2: #111113;
    --bg-3: #18181b;
    --line: rgba(234, 179, 8, .25);
    --text: #e4e4e7;
    --muted: #a1a1aa;
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: 'Poppins', sans-serif; background: var(--bg); color: var(--text); }
h1, h2, h3, .font-oswald { font-family: 'Oswald', sans-serif; }
a { color: inherit; }

/* NAVBAR */
.navbar { background: rgba(0, 0, 0, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: .6rem 0; }
.navbar-brand { display: flex; align-items: center; gap: .6rem; color: var(--gold) !important; font-family: 'Oswald', sans-serif; font-weight: 700; letter-spacing: 1px; line-height: 1.1; }
.navbar-brand img { height: 46px; width: 46px; object-fit: contain; }
.navbar-brand small { display: block; font-family: 'Poppins', sans-serif; font-size: .55rem; font-weight: 400; color: var(--muted); letter-spacing: 2px; }
.navbar .nav-link { color: #d4d4d8; font-size: .82rem; font-weight: 500; padding: .5rem .9rem !important; }
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--gold); }
.navbar-toggler { border-color: var(--line); }
.navbar-toggler-icon { filter: invert(1); }

/* BUTTONS */
.btn-brand { background: linear-gradient(to bottom, var(--gold-light), var(--gold) 55%, var(--gold-dark)); color: #000; font-weight: 700; border: 0; border-radius: 8px; font-size: .85rem; text-transform: uppercase; padding: .65rem 1.4rem; }
.btn-brand:hover { color: #000; filter: brightness(1.08); }
.btn-ghost { background: var(--bg-3); color: #fff; border: 1px solid #3f3f46; border-radius: 8px; font-weight: 600; font-size: .85rem; text-transform: uppercase; padding: .65rem 1.4rem; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-sm-brand { padding: .4rem .9rem; font-size: .7rem; }

/* HERO */
.hero .carousel-item { height: 100vh; min-height: 560px; background: #000; }
.hero .slide-bg { position: absolute; inset: 0; }
.slide-1 { background: radial-gradient(circle at 75% 45%, rgba(234,179,8,.22), transparent 55%), linear-gradient(135deg, #1a1405, #000 70%); }
.slide-2 { background: radial-gradient(circle at 70% 50%, rgba(220,38,38,.25), transparent 55%), linear-gradient(135deg, #1a0a0a, #000 70%); }
.slide-3 { background: radial-gradient(circle at 75% 50%, rgba(234,179,8,.18), transparent 50%), linear-gradient(135deg, #0d0d12, #000 70%); }
.hero .slide-bg::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px); background-size: 48px 48px; }
.hero-logo { position: absolute; right: 8%; top: 50%; transform: translateY(-50%); width: min(38vw, 460px); filter: drop-shadow(0 0 40px rgba(234,179,8,.35)); }
.hero .carousel-caption { left: 0; right: 0; bottom: auto; top: 50%; transform: translateY(-50%); text-align: left; padding: 0; }
.hero .carousel-caption .container { max-width: 1140px; }
.hero-badge { display: inline-block; border: 1px solid var(--gold-dark); background: rgba(234,179,8,.1); color: var(--gold); font-size: .68rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; padding: .3rem .9rem; border-radius: 999px; margin-bottom: 1rem; }
.hero-title { font-size: clamp(2.2rem, 6vw, 4.2rem); font-weight: 700; line-height: 1.05; color: #fff; text-transform: uppercase; }
.text-highlight { background: linear-gradient(to bottom, var(--gold-light), var(--gold-dark)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero .lead { max-width: 560px; color: #d4d4d8; font-size: 1.05rem; margin: 1rem 0 1.6rem; }
.carousel-control-prev, .carousel-control-next { width: 5%; }
.carousel-control-prev-icon, .carousel-control-next-icon { background-color: rgba(0,0,0,.5); border: 1px solid var(--gold-dark); border-radius: 50%; width: 2.2rem; height: 2.2rem; background-size: 45%; }
.carousel-indicators [data-bs-target] { background-color: var(--gold); }

/* SECTIONS */
.section-pad { padding: 5rem 0; }
.section-title { text-align: center; margin-bottom: 2.5rem; }
.section-title h2 { font-size: 2.2rem; font-weight: 700; color: #fff; letter-spacing: 1px; position: relative; display: inline-block; padding-bottom: .8rem; }
.section-title h2::after { content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 70px; height: 3px; background: linear-gradient(90deg, var(--gold), var(--red)); border-radius: 3px; }
.section-title p { color: var(--muted); margin-top: .8rem; }
.alt-bg { background: var(--bg-2); border-top: 1px solid #1f1f23; border-bottom: 1px solid #1f1f23; }

/* ABOUT */
.eyebrow { color: var(--gold); font-weight: 700; font-size: .72rem; letter-spacing: 2px; text-transform: uppercase; }
.about-section h2 { font-size: 2.3rem; color: #fff; font-weight: 700; margin: .5rem 0 1rem; }
.about-section p.lead { color: var(--muted); font-size: 1rem; }
.feature-item { background: var(--bg-3); border: 1px solid #27272a; border-radius: 12px; padding: .9rem 1rem; height: 100%; transition: .2s; }
.feature-item:hover { border-color: var(--gold-dark); transform: translateY(-3px); }
.feature-icon-box { width: 42px; height: 42px; flex-shrink: 0; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: rgba(234,179,8,.12); color: var(--gold); }
.feature-item h6 { color: #fff; font-size: .85rem; }
.feature-item small { color: var(--muted); font-size: .72rem; }
.about-visual { position: relative; background: radial-gradient(circle, rgba(234,179,8,.18), transparent 65%); border: 1px solid var(--line); border-radius: 20px; padding: 2rem; text-align: center; }
.about-visual img { max-width: 100%; max-height: 380px; filter: drop-shadow(0 0 30px rgba(234,179,8,.3)); }
.stats-badge { position: absolute; left: -14px; bottom: -14px; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #000; border-radius: 14px; padding: .8rem 1.2rem; display: flex; align-items: center; gap: .7rem; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.stats-number { font-family: 'Oswald', sans-serif; font-size: 2rem; font-weight: 700; line-height: 1; }
.stats-text { font-size: .72rem; font-weight: 700; line-height: 1.2; text-transform: uppercase; }

/* EVENTS */
.search-container { max-width: 600px; margin: 0 auto 2.5rem; }
.search-input { background: var(--bg-3); border: 1px solid #3f3f46; color: #fff; padding: .75rem 1.1rem; border-radius: 10px 0 0 10px; }
.search-input:focus { background: var(--bg-3); color: #fff; border-color: var(--gold); box-shadow: none; }
.search-btn { border-radius: 0 10px 10px 0 !important; }
.event-card { background: var(--bg-3); border: 1px solid #27272a; border-radius: 16px; overflow: hidden; height: 100%; display: flex; flex-direction: column; transition: .25s; }
.event-card:hover { transform: translateY(-5px); border-color: var(--gold-dark); box-shadow: 0 14px 34px rgba(0,0,0,.5); }
.event-poster-container { position: relative; height: 190px; background: linear-gradient(135deg, #1f1a08, #0a0a0a); display: flex; align-items: center; justify-content: center; }
.event-poster-container img { height: 120px; opacity: .85; }
.event-status { position: absolute; top: 12px; left: 12px; font-size: .68rem; font-weight: 700; padding: .3rem .7rem; border-radius: 999px; text-transform: uppercase; }
.event-card .card-body { padding: 1.2rem; display: flex; flex-direction: column; flex: 1; }
.event-title { font-size: 1.15rem; font-weight: 600; color: #fff; text-transform: uppercase; min-height: 2.8rem; }
.info-list { list-style: none; padding: 0; margin: .8rem 0 1.2rem; flex: 1; }
.info-list li { display: flex; gap: .8rem; margin-bottom: .7rem; font-size: .8rem; }
.info-list i { color: var(--gold); margin-top: 3px; width: 16px; text-align: center; }
.label-text { color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .5px; }
.value-text { color: #fff; font-weight: 500; }
.no-result { display: none; text-align: center; color: var(--muted); padding: 2rem 0; }

/* PERINGKAT */
.lb-filter .btn { border-color: var(--gold-dark); color: var(--gold); font-size: .8rem; }
.lb-filter .btn.active, .lb-filter .btn:hover { background: var(--gold); color: #000; border-color: var(--gold); }
.podium-card { background: var(--bg-3); border: 1px solid #27272a; border-radius: 16px; padding: 1.5rem 1rem; text-align: center; position: relative; height: 100%; }
.podium-1 { border-color: var(--gold); background: linear-gradient(180deg, rgba(234,179,8,.14), var(--bg-3)); transform: translateY(-10px); }
.podium-2 { border-color: #a1a1aa; }
.podium-3 { border-color: #b45309; }
.podium-rank { position: absolute; top: 10px; left: 14px; font-family: 'Oswald', sans-serif; font-size: 1.6rem; color: var(--muted); }
.podium-medal { font-size: 2.2rem; margin-bottom: .5rem; }
.podium-1 .podium-medal { color: var(--gold); } .podium-2 .podium-medal { color: #d4d4d8; } .podium-3 .podium-medal { color: #d97706; }
.podium-name { color: #fff; font-weight: 600; margin: 0; }
.podium-contingent { color: var(--muted); font-size: .8rem; margin: .2rem 0 .8rem; }
.podium-medals { display: flex; justify-content: center; gap: 1rem; font-size: .85rem; }
.medal-emas { color: var(--gold); } .medal-perak { color: #d4d4d8; } .medal-perunggu { color: #d97706; }
.podium-poin { margin-top: .8rem; font-weight: 700; color: var(--gold); }
.lb-table { --bs-table-bg: var(--bg-3); --bs-table-color: var(--text); --bs-table-border-color: #27272a; --bs-table-striped-bg: #1c1c20; --bs-table-striped-color: var(--text); font-size: .88rem; }
.lb-table thead th { background: #000; color: var(--gold); font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid var(--gold-dark); }

/* NEWS */
.landing-news-main-image { width: 100%; height: 280px; object-fit: cover; background: #1f1a08; }
.news-ph { background: linear-gradient(135deg, #2a1f0a, #0a0a0a); display: flex; align-items: center; justify-content: center; color: var(--gold); font-size: 3rem; }
.landing-news-item { display: flex; gap: 1rem; background: var(--bg-3); border: 1px solid #27272a; border-radius: 12px; padding: .6rem; text-decoration: none; margin-bottom: 1rem; transition: .2s; }
.landing-news-item:hover { border-color: var(--gold-dark); }
.landing-news-item .thumb { width: 110px; height: 85px; border-radius: 8px; flex-shrink: 0; font-size: 1.6rem; }
.landing-news-item h5 { font-size: .9rem; color: #fff; margin: 0 0 .3rem; font-family: 'Poppins', sans-serif; font-weight: 600; }
.landing-news-item small { color: var(--muted); }

/* FOOTER */
footer { background: #000; border-top: 1px solid var(--line); padding: 3.5rem 0 1rem; }
.footer-brand { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; }
.footer-brand img { height: 56px; }
.brand-text { font-family: 'Oswald', sans-serif; color: var(--gold); font-size: 1.4rem; font-weight: 700; letter-spacing: 1px; }
footer h5 { color: var(--gold); font-size: .95rem; letter-spacing: 1px; text-transform: uppercase; font-weight: 700; margin-bottom: 1rem; }
footer p, footer li { color: var(--muted); font-size: .88rem; }
footer a { text-decoration: none; color: var(--muted); }
footer a:hover { color: var(--gold); }
footer hr { border-color: #1f1f23; }

/* BACK TO TOP */
#btn-back-to-top { position: fixed; right: 22px; bottom: 22px; width: 44px; height: 44px; border-radius: 50%; display: none; background: var(--gold); color: #000; border: 0; z-index: 99; }

/* MODAL */
.modal-content { background: var(--bg-3); color: var(--text); border: 1px solid var(--gold-dark) !important; }
.modal-header { background: #000; border-bottom: 1px solid var(--line); }
.btn-close { filter: invert(1); }
.modal-poster { min-height: 280px; background: linear-gradient(135deg, #2a1f0a, #000); display: flex; align-items: center; justify-content: center; }
.modal-poster img { width: 140px; }

@media (max-width: 991px) {
    .hero-logo { display: none; }
    .navbar-collapse { background: #000; padding: 1rem; border-radius: 10px; margin-top: .6rem; }
    .stats-badge { left: 10px; }
}

/* =====================================================
   TEMA TERANG  (aktif via <html data-theme="light">)
   ===================================================== */
.theme-toggle { width: 38px; height: 38px; border-radius: 50%; border: 1px solid #3f3f46; background: var(--bg-3); color: var(--gold); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: .2s; }
.theme-toggle:hover { border-color: var(--gold); }
.theme-toggle .fa-sun { display: none; }
[data-theme="light"] .theme-toggle .fa-moon { display: none; }
[data-theme="light"] .theme-toggle .fa-sun { display: inline; }

[data-theme="light"] {
    --bg: #fafaf7;
    --bg-2: #f3f1ea;
    --bg-3: #ffffff;
    --line: rgba(202, 138, 4, .35);
    --text: #27272a;
    --muted: #6b7280;
}
[data-theme="light"] body { background: var(--bg); color: var(--text); }

/* Navbar */
[data-theme="light"] .navbar { background: rgba(255,255,255,.95); box-shadow: 0 2px 14px rgba(0,0,0,.08); }
[data-theme="light"] .navbar-brand { color: var(--gold-dark) !important; }
[data-theme="light"] .navbar .nav-link { color: #3f3f46; }
[data-theme="light"] .navbar .nav-link:hover,
[data-theme="light"] .navbar .nav-link.active { color: var(--gold-dark); }
[data-theme="light"] .navbar-toggler-icon { filter: none; }
[data-theme="light"] .navbar-collapse { background: #fff; }
[data-theme="light"] .btn-ghost { background: #fff; color: #27272a; border-color: #d4d4d8; }
[data-theme="light"] .btn-ghost:hover { color: var(--gold-dark); border-color: var(--gold-dark); }
[data-theme="light"] .theme-toggle { background: #fff; border-color: #d4d4d8; color: var(--gold-dark); }
/* Hero tetap gelap agar teks putih terbaca (seperti banner foto) */

/* Section */
[data-theme="light"] .section-title h2,
[data-theme="light"] .about-section h2,
[data-theme="light"] .event-title,
[data-theme="light"] .value-text,
[data-theme="light"] .podium-name,
[data-theme="light"] .feature-item h6,
[data-theme="light"] .landing-news-item h5,
[data-theme="light"] .about-section p.lead strong { color: #18181b !important; }
[data-theme="light"] .eyebrow { color: var(--gold-dark); }
[data-theme="light"] .alt-bg { border-color: #e7e5df; }
[data-theme="light"] .feature-item,
[data-theme="light"] .event-card,
[data-theme="light"] .podium-card,
[data-theme="light"] .landing-news-item { border-color: #e4e4e7; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
[data-theme="light"] .feature-item:hover,
[data-theme="light"] .event-card:hover,
[data-theme="light"] .landing-news-item:hover { border-color: var(--gold-dark); box-shadow: 0 12px 28px rgba(0,0,0,.12); }
[data-theme="light"] .about-visual { background: radial-gradient(circle, rgba(234,179,8,.25), #fff 70%); }
[data-theme="light"] .event-poster-container,
[data-theme="light"] .news-ph,
[data-theme="light"] .modal-poster { background: linear-gradient(135deg, #fef3c7, #fde68a); }
[data-theme="light"] .search-input { background: #fff; color: #18181b; border-color: #d4d4d8; }
[data-theme="light"] .search-input:focus { background: #fff; color: #18181b; }
[data-theme="light"] .podium-1 { background: linear-gradient(180deg, rgba(234,179,8,.22), #fff); }
[data-theme="light"] .podium-2 .podium-medal { color: #9ca3af; }
[data-theme="light"] .medal-perak { color: #9ca3af; }
[data-theme="light"] .lb-filter .btn { color: var(--gold-dark); }
[data-theme="light"] .lb-filter .btn.active,
[data-theme="light"] .lb-filter .btn:hover { color: #000; }
[data-theme="light"] .lb-table { --bs-table-bg: #fff; --bs-table-color: #27272a; --bs-table-border-color: #e4e4e7; --bs-table-striped-bg: #faf8f0; --bs-table-striped-color: #27272a; }
[data-theme="light"] .lb-table thead th { background: #fef3c7; color: #854d0e; border-bottom-color: var(--gold-dark); }

/* Footer & modal */
[data-theme="light"] footer { background: #fff; border-top: 1px solid #e4e4e7; }
[data-theme="light"] .brand-text,
[data-theme="light"] footer h5 { color: var(--gold-dark); }
[data-theme="light"] footer hr { border-color: #e4e4e7; }
[data-theme="light"] .modal-header { background: #fafaf7; }
[data-theme="light"] .btn-close { filter: none; }
[data-theme="light"] .modal-content h3 { color: #18181b !important; }
[data-theme="light"] .text-white:not(.hero-title):not(.hero *) { color: #18181b !important; }
[data-theme="light"] .text-secondary { color: #6b7280 !important; }

/* Transisi halus saat ganti tema */
body, .navbar, .event-card, .feature-item, .podium-card, footer, .alt-bg { transition: background-color .25s, color .25s, border-color .25s; }

/* =====================================================
   RESPONSIVE (tablet & HP)
   ===================================================== */
html, body { overflow-x: hidden; }
img { max-width: 100%; }

@media (max-width: 991px) {
    .navbar-collapse { max-height: calc(100vh - 80px); overflow-y: auto; }
    .navbar .nav-link { padding: .7rem .5rem !important; border-bottom: 1px solid rgba(128,128,128,.15); }
    .section-pad { padding: 3.5rem 0; }
    .about-section h2 { font-size: 1.9rem; }
    .podium-1 { transform: none; }
}

@media (max-width: 767px) {
    .hero .carousel-item { height: 88vh; min-height: 520px; }
    .hero .carousel-caption { padding: 0 1.5rem; }
    .hero .lead { font-size: .95rem; margin: .8rem 0 1.2rem; }
    .hero .btn { display: block; width: 100%; margin: 0 0 .6rem 0 !important; }
    .carousel-control-prev, .carousel-control-next { display: none; }
    .section-title h2 { font-size: 1.6rem; }
    .section-title { margin-bottom: 1.8rem; }
    .about-section h2 { font-size: 1.6rem; }
    .about-visual { padding: 1.2rem; }
    .about-visual img { max-height: 240px; }
    .stats-badge { left: 8px; bottom: -12px; padding: .6rem .9rem; }
    .stats-number { font-size: 1.5rem; }
    .event-poster-container { height: 160px; }
    .landing-news-main-image { height: 190px; }
    .landing-news-item .thumb { width: 84px; height: 70px; }
    .landing-news-item h5 { font-size: .82rem; }
    .lb-table { font-size: .8rem; }
    .modal-poster { min-height: 160px; }
    .modal-poster img { width: 90px; }
    footer { padding-top: 2.5rem; text-align: left; }
    #btn-back-to-top { right: 14px; bottom: 14px; }
}

@media (max-width: 400px) {
    .navbar-brand img { height: 38px; width: 38px; }
    .navbar-brand { font-size: 1rem; }
    .hero-title { font-size: 2rem; }
    .search-input { padding: .6rem .8rem; font-size: .85rem; }
}
