@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #046a38;
    --primary-dark: #024724;
    --primary-light: #0d8a4d;
    --primary-soft: #eaf6ef;
    --secondary: #d4af37;
    --secondary-dark: #b89320;
    --accent: #e5b826;
    --dark: #0f172a;
    --slate: #334155;
    --muted: #64748b;
    --light: #f8fafc;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    color: var(--slate);
    background-color: #f1f5f9;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* ==========================================================================
   TOP BAR & RUNNING TEXT
   ========================================================================== */
.top-bar {
    background: #024724;
    color: #e2e8f0;
    font-size: 0.8rem;
    padding: 6px 0;
    border-bottom: 2px solid var(--secondary);
}

.top-bar a {
    color: #e2e8f0;
}

.top-bar a:hover {
    color: var(--secondary);
}

.running-text-wrap {
    background: #04542d;
    color: #fef08a;
    font-size: 0.82rem;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
}

.badge-breaking {
    background: #dc2626;
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    margin-right: 12px;
}

/* ==========================================================================
   HEADER BANNER SECTION
   ========================================================================== */
.main-header {
    background: #ffffff;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo-kemenag {
    height: 84px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.12));
}

.brand-text h1 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.brand-text h2 {
    font-size: 1.02rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.brand-text p {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 500;
    margin-bottom: 0;
}

.header-badges {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.header-badge-img {
    height: 64px;
    width: auto;
    max-width: 360px;
    object-fit: contain;
    border-radius: 6px;
    transition: all 0.25s ease;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.05));
}

.header-badge-img:hover {
    transform: translateY(-2px) scale(1.02);
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.1));
}

@media (max-width: 991px) {
    .brand-wrapper {
        justify-content: center;
        text-align: center;
    }
    .header-badges {
        justify-content: center;
        margin-top: 10px;
        gap: 10px;
    }
    .header-badge-img {
        max-width: 48%;
        height: auto;
        max-height: 48px;
    }
}

/* ==========================================================================
   MAIN NAVIGATION (DYNAMIC MENUBAR)
   ========================================================================== */
.main-navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 4px 15px rgba(4, 106, 56, 0.25);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.main-navbar .navbar-nav .nav-link {
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 14px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    transition: all 0.2s ease;
}

.main-navbar .navbar-nav .nav-link i {
    font-size: 0.85rem;
    color: var(--secondary);
}

.main-navbar .navbar-nav .nav-link:hover,
.main-navbar .navbar-nav .nav-link:focus,
.main-navbar .navbar-nav .nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.main-navbar .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 14px;
    right: 14px;
    height: 3px;
    background: var(--secondary);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.main-navbar .navbar-nav .nav-link:hover::after,
.main-navbar .navbar-nav .nav-link.active::after {
    transform: scaleX(1);
}

/* Dropdown styling */
.main-navbar .dropdown-menu {
    border: none;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    min-width: 230px;
    margin-top: 0;
    background: #ffffff;
    border-top: 3px solid var(--secondary);
    animation: fadeInDown 0.2s ease;
}

.main-navbar .dropdown-item {
    font-size: 0.825rem;
    font-weight: 500;
    padding: 8px 18px;
    color: var(--slate);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.15s ease;
}

.main-navbar .dropdown-item i {
    font-size: 0.8rem;
    color: var(--primary);
    width: 16px;
    text-align: center;
}

.main-navbar .dropdown-item:hover {
    background-color: var(--primary-soft);
    color: var(--primary-dark);
    padding-left: 22px;
}

/* ==========================================================================
   HERO SLIDER
   ========================================================================== */
.hero-slider-wrap {
    position: relative;
    background: #0f172a;
}

.hero-slide-item {
    position: relative;
    height: 520px;
    overflow: hidden;
}

.hero-slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.85);
    transition: transform 8s ease;
}

.carousel-item.active .hero-slide-img {
    transform: scale(1.05);
}

.hero-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 71, 36, 0.92) 0%, rgba(2, 71, 36, 0.6) 60%, rgba(0, 0, 0, 0.3) 100%);
    display: flex;
    align-items: center;
}

.hero-slide-content {
    color: #ffffff;
    max-width: 680px;
}

.hero-slide-content .badge-hero {
    background: rgba(212, 175, 55, 0.2);
    border: 1px solid var(--secondary);
    color: #fef08a;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 5px 14px;
    border-radius: 30px;
    display: inline-block;
    margin-bottom: 12px;
}

.hero-slide-content h2 {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 14px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.hero-slide-content p {
    font-size: 1rem;
    color: #e2e8f0;
    line-height: 1.6;
    margin-bottom: 22px;
}

/* ==========================================================================
   QUICK SERVICE / PTSP CARDS
   ========================================================================== */
.quick-access-bar {
    position: relative;
    margin-top: -45px;
    z-index: 10;
}

.quick-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 18px 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0,0,0,0.05);
    border-bottom: 3px solid var(--primary);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 14px;
    height: 100%;
}

.quick-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-bottom-color: var(--secondary);
}

.quick-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.quick-card:hover .quick-card-icon {
    background: var(--primary);
    color: #ffffff;
}

.quick-card-text h6 {
    font-size: 0.925rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 2px;
}

.quick-card-text p {
    font-size: 0.775rem;
    color: var(--muted);
    margin-bottom: 0;
    line-height: 1.3;
}

/* ==========================================================================
   PRAYER TIMES & TRACKING WIDGET
   ========================================================================== */
.ptsp-track-box {
    background: linear-gradient(135deg, #046a38 0%, #034826 100%);
    color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
}

.ptsp-track-box h5 {
    font-weight: 800;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.prayer-schedule-box {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.prayer-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 12px 6px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 88px;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.prayer-item:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.prayer-item.active-prayer,
.prayer-item.active {
    background: linear-gradient(145deg, #046a38 0%, #064e29 100%);
    color: #ffffff;
    border-color: #046a38;
    box-shadow: 0 6px 16px rgba(4, 106, 56, 0.25);
    transform: translateY(-2px);
}

.prayer-item .name {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #64748b;
    margin-bottom: 2px;
    transition: color 0.2s ease;
}

.prayer-item.active-prayer .name,
.prayer-item.active .name {
    color: #fef08a;
}

.prayer-item .time {
    font-size: 1.18rem;
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
    letter-spacing: -0.5px;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.prayer-item.active-prayer .time,
.prayer-item.active .time {
    color: #ffffff;
}

.prayer-item .tz {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    margin-top: 2px;
    transition: color 0.2s ease;
}

.prayer-item.active-prayer .tz,
.prayer-item.active .tz {
    color: rgba(255, 255, 255, 0.85);
}

.prayer-item.active-prayer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #f59e0b;
}

/* ==========================================================================
   SECTION HEADINGS & CARDS
   ========================================================================== */
.section-title {
    position: relative;
    margin-bottom: 28px;
}

.section-title .badge-sub {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.775rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 4px;
}

.section-title h3 {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--dark);
}

.section-title h3::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: var(--secondary);
    border-radius: 2px;
    margin-top: 8px;
}

/* News Cards */
.news-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.25s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.news-card-thumb {
    position: relative;
    height: 190px;
    overflow: hidden;
}

.news-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card:hover .news-card-thumb img {
    transform: scale(1.08);
}

.news-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
}

.news-card-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-card-meta {
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.news-card-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
    color: var(--dark);
}

.news-card-title a {
    color: var(--dark);
}

.news-card-title a:hover {
    color: var(--primary);
}

.news-card-excerpt {
    font-size: 0.825rem;
    color: var(--slate);
    line-height: 1.5;
    margin-bottom: 14px;
    flex-grow: 1;
}

/* Sambutan Kepala Kantor */
.sambutan-box {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.sambutan-img-wrap {
    height: 100%;
    min-height: 380px;
    position: relative;
}

.sambutan-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sambutan-content {
    padding: 36px 30px;
}

/* Agenda Card */
.agenda-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
    transition: all 0.2s ease;
}

.agenda-card:hover {
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.agenda-date-box {
    width: 64px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    border-radius: 8px;
    text-align: center;
    padding: 10px 4px;
    flex-shrink: 0;
}

.agenda-date-box .day {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1;
}

.agenda-date-box .month {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer-main {
    background: #0b1e13;
    color: #cbd5e1;
    font-size: 0.85rem;
    padding-top: 50px;
    border-top: 4px solid var(--secondary);
}

.footer-main h5 {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 10px;
}

.footer-main h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 2px;
    background: var(--secondary);
}

.footer-main a {
    color: #94a3b8;
}

.footer-main a:hover {
    color: var(--secondary);
    padding-left: 4px;
}

.footer-social-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: #ffffff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    transition: all 0.2s ease;
}

.footer-social-btn:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    background: #06120b;
    padding: 16px 0;
    font-size: 0.8rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

/* ==========================================================================
   RESPONSIVE STYLING
   ========================================================================== */
@media (max-width: 991.98px) {
    .header-badges {
        justify-content: flex-start;
        margin-top: 12px;
    }
    .hero-slide-item {
        height: 420px;
    }
    .hero-slide-content h2 {
        font-size: 1.6rem;
    }
    .quick-access-bar {
        margin-top: 15px;
    }
}

@media (max-width: 575.98px) {
    .brand-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
    .hero-slide-item {
        height: 360px;
    }
    .hero-slide-content h2 {
        font-size: 1.35rem;
    }
    .brand-logo-kemenag {
        height: 56px;
    }
}

/* ==========================================================================
   AKSESIBILITAS WEB & DISABILITAS WIDGET
   ========================================================================== */
:root {
    --acc-font-zoom: 1;
}

html {
    font-size: calc(16px * var(--acc-font-zoom));
}

.btn-accessibility-float {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #0284c7;
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    z-index: 1050;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-accessibility-float:hover {
    background: #0369a1;
    transform: scale(1.08);
}

.accessibility-toolbar {
    position: fixed;
    bottom: 80px;
    left: 24px;
    width: 290px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    z-index: 1050;
    display: none;
    overflow: hidden;
    animation: fadeInSlide 0.25s ease-out;
}

.accessibility-toolbar.active {
    display: block;
}

.acc-header {
    background: #f8fafc;
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.acc-header h6 {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 700;
}

.btn-close-acc {
    background: none;
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
}

.acc-body {
    padding: 14px;
}

.acc-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #334155;
}

/* High Contrast Mode */
body.acc-high-contrast {
    background-color: #121212 !important;
    color: #f1f5f9 !important;
}

body.acc-high-contrast .site-header,
body.acc-high-contrast .navbar-main,
body.acc-high-contrast .quick-card,
body.acc-high-contrast .prayer-schedule-box,
body.acc-high-contrast .sambutan-box,
body.acc-high-contrast .news-card,
body.acc-high-contrast .card {
    background-color: #1e1e1e !important;
    color: #f8fafc !important;
    border-color: #333333 !important;
}

body.acc-high-contrast a {
    color: #38bdf8 !important;
}

/* Grayscale Mode */
body.acc-grayscale {
    filter: grayscale(100%) !important;
}

/* ==========================================================================
   ASISTEN VIRTUAL "SOBAT MANDAR"
   ========================================================================== */
.btn-sobat-mandar {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    color: #ffffff;
    border: 3px solid #fde047;
    box-shadow: 0 6px 18px rgba(4, 120, 87, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    z-index: 1050;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-sobat-mandar:hover {
    transform: scale(1.08);
}

.bot-badge-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background-color: #ef4444;
    border: 2px solid #ffffff;
    border-radius: 50%;
    animation: pulse 1.8s infinite;
}

.sobat-mandar-box {
    position: fixed;
    bottom: 88px;
    right: 24px;
    width: 350px;
    max-width: calc(100vw - 48px);
    height: 480px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #cbd5e1;
    z-index: 1050;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: fadeInSlide 0.25s ease-out;
}

.sobat-mandar-box.active {
    display: flex;
}

.bot-header {
    background: linear-gradient(135deg, #024724 0%, #047857 100%);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bot-avatar {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fde047;
    font-size: 1.1rem;
}

.btn-close-bot {
    background: none;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
}

.btn-close-bot:hover {
    color: #ffffff;
}

.bot-chat-body {
    flex: 1;
    padding: 14px;
    overflow-y: auto;
    background-color: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bot-msg {
    display: flex;
    width: 100%;
}

.bot-msg-incoming {
    justify-content: flex-start;
}

.bot-msg-outgoing {
    justify-content: flex-end;
}

.msg-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.8rem;
    line-height: 1.5;
}

.bot-msg-incoming .msg-bubble {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-top-left-radius: 2px;
}

.bot-msg-outgoing .msg-bubble {
    background: #047857;
    color: #ffffff;
    border-top-right-radius: 2px;
}

.bot-options-list {
    padding: 8px 14px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    max-height: 140px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.btn-faq-option {
    text-align: left;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-faq-option:hover {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.bot-footer {
    padding: 8px 14px 12px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
}

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

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

