/* =====================================================================
   DP3A & KB Kota Pangkal Pinang — Theme
   Modern Government Portal  |  Bootstrap 5.3 add-on layer
   ===================================================================== */
:root {
    --navy: #0B1E6D;
    --navy-deep: #091540;
    --blue: #2563EB;
    --blue-600: #1D4ED8;
    --pink: #FF1493;
    --purple: #7C3AED;
    --soft-purple: #F3E8FF;
    --soft-blue: #EEF6FF;
    --soft-pink: #FFF0F7;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --light-gray: #F8FAFC;
    --border: #E2E8F0;
    --ink: #1E293B;
    --muted: #64748B;

    --grad-hero: linear-gradient(135deg, #0B1E6D 0%, #1D4ED8 50%, #7C3AED 100%);
    --grad-btn: linear-gradient(90deg, #FF1493, #7C3AED);
    --grad-footer: linear-gradient(135deg, #091540, #0B1E6D);

    --shadow-sm: 0 2px 8px rgba(15, 23, 42, .06);
    --shadow: 0 10px 30px rgba(15, 23, 42, .08);
    --shadow-lg: 0 20px 50px rgba(11, 30, 109, .18);
    --radius: 18px;
    --radius-lg: 26px;
}

* { scroll-behavior: smooth; }

/* No-JS / AOS fallback — never leave content invisible */
.no-js [data-aos] { opacity: 1 !important; transform: none !important; }

body {
    font-family: 'Poppins', sans-serif;
    color: var(--ink);
    background: var(--light-gray);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; color: var(--navy); }
a { text-decoration: none; transition: all .25s ease; }
.text-pink { color: var(--pink) !important; }
.text-purple { color: var(--purple) !important; }
.text-navy { color: var(--navy) !important; }
.text-blue { color: var(--blue) !important; }
.bg-soft-blue { background: var(--soft-blue) !important; }
.bg-soft-pink { background: var(--soft-pink) !important; }
.bg-soft-purple { background: var(--soft-purple) !important; }
.fw-800 { font-weight: 800; }

/* ---------- Buttons ---------- */
.btn { border-radius: 50px; font-weight: 600; padding: .6rem 1.5rem; }
.btn-gradient {
    background: var(--grad-btn);
    color: #fff; border: none;
    box-shadow: 0 8px 20px rgba(255, 20, 147, .3);
}
.btn-gradient:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(124, 58, 237, .38); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--blue-600); color: #fff; }
.btn-outline-light-2 { border: 2px solid rgba(255,255,255,.7); color: #fff; }
.btn-outline-light-2:hover { background: #fff; color: var(--navy); }

/* ---------- Topbar ---------- */
.topbar { background: var(--navy-deep); color: #cdd7ff; font-size: .8rem; }
.topbar a { color: #cdd7ff; }
.topbar a:hover { color: #fff; }
.topbar .running-wrap { overflow: hidden; white-space: nowrap; }
.topbar .running-text { display: inline-block; padding-left: 100%; animation: marquee 22s linear infinite; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }
.topbar .social-ic { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,.1); }
.topbar .social-ic:hover { background: var(--pink); color: #fff; }

/* ---------- Header / Navbar ---------- */
.site-header { background: #fff; box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 1030; }
.brand-logo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; box-shadow: 0 4px 12px rgba(11,30,109,.2); }
.brand-name { line-height: 1.15; }
.brand-name .l1 { font-size: .95rem; font-weight: 700; color: var(--navy); }
.brand-name .l2 { font-size: .78rem; color: var(--muted); font-weight: 600; }
.navbar-nav .nav-link { font-weight: 600; color: var(--ink); margin: 0 .15rem; border-radius: 10px; padding: .5rem .85rem !important; }
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active { color: var(--blue); background: var(--soft-blue); }
.dropdown-menu { border: none; box-shadow: var(--shadow); border-radius: 14px; padding: .5rem; }
.dropdown-item { border-radius: 10px; font-weight: 500; padding: .55rem .9rem; }
.dropdown-item:hover { background: var(--soft-blue); color: var(--blue); }

/* ---------- Hero ---------- */
.hero-card {
    background: var(--grad-hero);
    border-radius: var(--radius-lg);
    color: #fff;
    position: relative;
    overflow: hidden;
    min-height: 420px;
}
.hero-card::after {
    content: ""; position: absolute; right: -60px; bottom: -60px;
    width: 280px; height: 280px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,20,147,.35), transparent 70%);
}
.hero-pill {
    display: inline-block; background: var(--grad-btn); color: #fff;
    padding: .35rem 1.1rem; border-radius: 50px; font-weight: 600; font-size: .9rem;
}
.hero-title { font-size: clamp(1.7rem, 3vw, 2.7rem); font-weight: 800; color: #fff; line-height: 1.18; }
.hero-img { border-radius: var(--radius); max-height: 360px; object-fit: cover; }

/* side cards */
.side-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); }
.qs-item { display: flex; align-items: center; gap: .8rem; padding: .6rem; border-radius: 12px; transition: .25s; }
.qs-item:hover { background: var(--soft-blue); transform: translateX(4px); }
.qs-ic { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: #fff; flex-shrink: 0; }
.hotline-card { background: var(--grad-btn); color: #fff; border-radius: var(--radius); }
.hotline-card .num { font-size: 1.6rem; font-weight: 800; letter-spacing: .5px; }
.ann-date { background: var(--soft-blue); color: var(--blue); border-radius: 12px; width: 52px; height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 700; line-height: 1; flex-shrink: 0; }
.ann-date .d { font-size: 1.2rem; }
.ann-date .m { font-size: .68rem; text-transform: uppercase; }

/* ---------- Section ---------- */
.section { padding: 3.5rem 0; }
.section-title { font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 800; }
.section-eyebrow { color: var(--pink); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: .8rem; }
.section-divider { width: 60px; height: 4px; border-radius: 4px; background: var(--grad-btn); }

/* ---------- Stat counter cards ---------- */
.stat-card { border-radius: var(--radius); color: #fff; padding: 1.4rem; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.stat-card .stat-ic { font-size: 1.8rem; opacity: .9; }
.stat-card .stat-num { font-size: 1.9rem; font-weight: 800; line-height: 1; }
.stat-card .stat-label { font-size: .85rem; opacity: .95; }

/* ---------- Generic cards ---------- */
.card-modern { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: .3s; height: 100%; }
.card-modern:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-modern .cover { height: 200px; object-fit: cover; width: 100%; }
.card-badge { background: var(--grad-btn); color: #fff; border-radius: 50px; padding: .25rem .8rem; font-size: .72rem; font-weight: 700; }
.icon-tile { width: 64px; height: 64px; border-radius: 18px; display: flex; align-items: center; justify-content: center; font-size: 1.7rem; color: #fff; }

/* service quick grid (section 2) */
.service-card { text-align: center; padding: 1.8rem 1rem; }
.service-card .icon-tile { margin: 0 auto 1rem; }

/* program slider */
.program-card .cover { height: 180px; }

/* gallery masonry */
.gallery-item { border-radius: 16px; overflow: hidden; position: relative; display: block; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: .4s; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-more { background: var(--grad-hero); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 800; border-radius: 16px; }

/* agenda list */
.agenda-item { display: flex; gap: 1rem; padding: 1rem; border-radius: 14px; background: #fff; border: 1px solid var(--border); margin-bottom: .9rem; transition: .25s; }
.agenda-item:hover { box-shadow: var(--shadow); border-color: var(--blue); }
.agenda-date { background: var(--grad-hero); color: #fff; border-radius: 14px; min-width: 64px; text-align: center; padding: .6rem; }
.agenda-date .d { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.agenda-date .m { font-size: .72rem; text-transform: uppercase; }

/* values banner */
.values-band { background: var(--grad-hero); border-radius: var(--radius-lg); color: #fff; }
.value-item { text-align: center; padding: 1rem; }
.value-item .v-ic { width: 60px; height: 60px; border-radius: 16px; background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin: 0 auto .6rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--grad-footer); color: #b9c4f0; padding-top: 3.5rem; }
.site-footer h5 { color: #fff; font-size: 1rem; margin-bottom: 1.1rem; }
.site-footer a { color: #b9c4f0; }
.site-footer a:hover { color: #fff; padding-left: 4px; }
.site-footer .footer-soc { width: 38px; height: 38px; border-radius: 12px; background: rgba(255,255,255,.08); display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.site-footer .footer-soc:hover { background: var(--grad-btn); }
.footer-bottom { background: rgba(0,0,0,.2); }
/* keep bottom links clear of the floating chat button (desktop: shift left, mobile: add space below) */
@media (min-width: 992px) {
    .footer-bottom .container { padding-right: 250px; }
}
@media (max-width: 991.98px) {
    .footer-bottom { padding-bottom: 4.5rem; }
}

/* chatbot */
.chatbot-bubble { position: fixed; right: 22px; bottom: 22px; z-index: 1040; }
.chatbot-bubble .cb-btn { background: var(--grad-btn); color: #fff; border-radius: 50px; padding: .7rem 1.2rem; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: .5rem; font-weight: 600; border: none; }
.chatbot-bubble .cb-btn:hover { transform: translateY(-3px); }

/* page header */
.page-hero { background: var(--grad-hero); color: #fff; padding: 3rem 0 2.5rem; }
.page-hero .breadcrumb a { color: #cdd7ff; }
.page-hero .breadcrumb .active { color: #fff; }

/* utilities */
.swiper-pagination-bullet-active { background: var(--pink) !important; }

/* Hero slider navigation — compact circular buttons */
.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    backdrop-filter: blur(4px);
    color: #fff !important;
    transition: background .25s ease;
}
.hero-swiper .swiper-button-next:hover,
.hero-swiper .swiper-button-prev:hover { background: var(--pink); }
.hero-swiper .swiper-button-next::after,
.hero-swiper .swiper-button-prev::after { font-size: 1rem; font-weight: 700; }
.hero-swiper .swiper-button-prev { left: 12px; }
.hero-swiper .swiper-button-next { right: 12px; }
.hero-swiper .swiper-pagination { bottom: 10px; }
.object-cover { object-fit: cover; }
.hover-lift { transition: .3s; }
.hover-lift:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .hero-card { min-height: auto; }
    .brand-name .l1 { font-size: .8rem; }
    .brand-name .l2 { font-size: .68rem; }
}
@media (max-width: 767.98px) {
    /* On phones the hero text fills the width — arrows would overlap it; rely on swipe + pagination */
    .hero-swiper .swiper-button-next,
    .hero-swiper .swiper-button-prev { display: none; }
    .hero-swiper .swiper-pagination { bottom: 6px; }
    .chatbot-bubble { right: 16px; bottom: 16px; }
    .chatbot-bubble .cb-btn { padding: .65rem; border-radius: 50%; }
}
@media (max-width: 575.98px) {
    .section { padding: 2.2rem 0; }
    .hero-title { font-size: 1.5rem; }
    .topbar .topbar-meta { font-size: .72rem; }
    .hero-card .p-4 { padding: 1.25rem !important; }
    .hero-card .btn { width: 100%; }
    .stat-card { padding: 1.1rem; }
    .stat-card .stat-num { font-size: 1.6rem; }
}
