/**
 * Template Lingga Ujuara - Styles
 */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    /* Government Theme Palette */
    --theme-menu-bg-start: #0f172a; /* Slate 900 */
    --theme-menu-bg-end: #1e293b;   /* Slate 800 */
    --theme-menu-text: #ffffff;
    --theme-menu-hover-text: #38bdf8; /* Sky 400 */
    --theme-submenu-bg-start: #ffffff;
    --theme-submenu-bg-end: #f8fafc;
    --theme-submenu-text: #334155;
    --theme-submenu-hover-text: #0ea5e9;

    --theme-footer-bg-start: #0f172a;
    --theme-footer-bg-end: #020617;   /* Slate 950 */
    --theme-footer-text: #cbd5e1;     /* Slate 300 */
    --theme-footer-link: #e2e8f0;     /* Slate 200 */
    --theme-footer-link-hover: #38bdf8;

    --theme-heading-size-base: 32px;
    --theme-body-size: 16px;
    --theme-heading-font-stack: 'Inter', system-ui, sans-serif;
    --theme-body-font-stack: 'Inter', system-ui, sans-serif;

    --color-primary: #0ea5e9; /* Sky 500 */
    --color-accent: #f59e0b;  /* Amber 500 */
}

/* Service Card Styles */
.service-card {
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}
.dark .service-card {
    border-color: #334155;
}
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: var(--color-primary);
}

/* Base */
body {
    font-family: var(--theme-body-font-stack);
    font-size: var(--theme-body-size);
    line-height: 1.75;
}

main h1,
main h2,
main h3,
main h4,
main h5,
main h6 {
    font-family: var(--theme-heading-font-stack) !important;
}

main h1 { font-size: calc(var(--theme-heading-size-base) * 1.12) !important; }
main h2 { font-size: calc(var(--theme-heading-size-base) * 1.00) !important; }
main h3 { font-size: calc(var(--theme-heading-size-base) * 0.82) !important; }
main h4 { font-size: calc(var(--theme-heading-size-base) * 0.72) !important; }
main h5 { font-size: calc(var(--theme-heading-size-base) * 0.62) !important; }
main h6 { font-size: calc(var(--theme-heading-size-base) * 0.55) !important; }

#themeMainNav {
    background: linear-gradient(90deg, var(--theme-menu-bg-start), var(--theme-menu-bg-end)) !important;
    color: var(--theme-menu-text) !important;
}

#themeMainNav .theme-menu-link,
#themeMainNav .theme-menu-link svg {
    color: var(--theme-menu-text) !important;
}

#themeMainNav .theme-menu-link:hover,
#themeMainNav .theme-menu-link:hover svg {
    color: var(--theme-menu-hover-text) !important;
}

.theme-submenu-container,
.theme-submenu-panel {
    background: linear-gradient(180deg, var(--theme-submenu-bg-start), var(--theme-submenu-bg-end)) !important;
}

.theme-submenu-link {
    color: var(--theme-submenu-text) !important;
}

.theme-submenu-link:hover {
    color: var(--theme-submenu-hover-text) !important;
}

#themeFooter {
    background: linear-gradient(135deg, var(--theme-footer-bg-start), var(--theme-footer-bg-end)) !important;
    color: var(--theme-footer-text) !important;
}

#themeFooter p,
#themeFooter span,
#themeFooter h1,
#themeFooter h2,
#themeFooter h3,
#themeFooter h4,
#themeFooter h5,
#themeFooter h6 {
    color: var(--theme-footer-text) !important;
}

#themeFooter a {
    color: var(--theme-footer-link) !important;
}

#themeFooter a:hover {
    color: var(--theme-footer-link-hover) !important;
}

/* Hide scrollbar */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Line clamp */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Breaking news animation */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.animate-marquee {
    animation: marquee 30s linear infinite;
}
.animate-marquee:hover {
    animation-play-state: paused;
}

/* Mobile menu states */
.mobile-menu-overlay {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
    backdrop-filter: blur(1px);
}
.mobile-menu-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-drawer {
    transform: translate3d(-105%, 0, 0);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
    will-change: transform, opacity;
}
.mobile-menu-drawer.is-open {
    transform: translate3d(0, 0, 0);
    opacity: 1;
    pointer-events: auto;
}

body.mobile-menu-lock {
    overflow: hidden;
    touch-action: none;
}

#galeriFotoHomeSlider {
    scroll-snap-type: x proximity;
    scroll-padding-inline: 0;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}

#galeriFotoHomeSlider > .home-galeri-link {
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

#galeriFotoHomePrev,
#galeriFotoHomeNext {
    position: relative;
    z-index: 2;
    min-width: 40px;
    min-height: 40px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.mobileSubmenuPanel {
    opacity: 0.98;
    will-change: max-height;
}
.mobileSubmenuPanel.is-open {
    opacity: 1;
}

.mobileDrawerSubmenuPanel {
    background: #eef2f7;
}
.dark .mobileDrawerSubmenuPanel {
    background: #0f172a;
}

.mobileDrawerSubmenuLink {
    color: #334155;
}
.mobileDrawerSubmenuLink:hover {
    color: #0f172a;
    background: rgba(148, 163, 184, 0.18);
}
.dark .mobileDrawerSubmenuLink {
    color: #e2e8f0;
}
.dark .mobileDrawerSubmenuLink:hover {
    color: #ffffff;
    background: rgba(71, 85, 105, 0.45);
}

.mobileMenuQuickLink {
    line-height: 1.3;
}

/* Sticky header state */
#themeHeader.is-scrolled {
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
}
.dark #themeHeader.is-scrolled {
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

/* Homepage statistics */
#homeStatistikSection {
    --stat-bg: #f8fafc;
    --stat-surface: #fff;
    --stat-border: #e2e8f0;
    --stat-text: #0f172a;
    --stat-subtext: #334155;
    --stat-muted: #64748b;
    --stat-link: #0369a1;
    --stat-link-border: #bae6fd;
    --stat-hover: #f0f9ff;
    --stat-soft: #f1f5f9;
    --stat-primary-soft: #e0f2fe;
    --stat-positive: #047857;
    --stat-error-bg: #fff1f2;
    --stat-error-border: #fecaca;
    --stat-error-text: #be123c;
    margin-top: 1rem;
    padding: 1.5rem 0;
    border-block: 1px solid var(--stat-border);
    background: var(--stat-bg);
    color: var(--stat-text);
}

.dark #homeStatistikSection {
    --stat-bg: #0f172a;
    --stat-surface: #1e293b;
    --stat-border: #334155;
    --stat-text: #f1f5f9;
    --stat-subtext: #e2e8f0;
    --stat-muted: #94a3b8;
    --stat-link: #7dd3fc;
    --stat-link-border: #334155;
    --stat-hover: #334155;
    --stat-soft: #334155;
    --stat-primary-soft: #0c4a6e;
    --stat-positive: #6ee7b7;
    --stat-error-bg: #450a0a;
    --stat-error-border: #7f1d1d;
    --stat-error-text: #fecaca;
}

#homeStatistikSection .home-stat-header,
#homeStatistikSection .home-stat-idsd-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

#homeStatistikSection .home-stat-header {
    align-items: flex-end;
    margin-bottom: 1rem;
}

#homeStatistikSection .home-stat-kicker {
    display: block;
    margin-bottom: 0.2rem;
    color: #0284c7;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

#homeStatistikSection .home-stat-title {
    font-size: clamp(1.2rem, 3vw, 1.75rem);
    font-weight: 700;
    line-height: 1.2;
}

#homeStatistikSection .home-stat-subtitle,
#homeStatistikSection .home-stat-idsd-caption,
#homeStatistikSection .home-stat-idsd-source {
    margin-top: 0.25rem;
    color: var(--stat-muted);
    font-size: 0.75rem;
    line-height: 1.4;
}

#homeStatistikSection .home-stat-source {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--stat-link-border);
    border-radius: 0.6rem;
    background: var(--stat-surface);
    color: var(--stat-link);
    font-size: 0.72rem;
    font-weight: 700;
}

#homeStatistikSection .home-stat-source:hover {
    background: var(--stat-hover);
}

#homeStatistikSection .home-stat-status {
    padding: 0.8rem 1rem;
    border: 1px solid var(--stat-border);
    border-radius: 0.75rem;
    background: var(--stat-surface);
    color: var(--stat-muted);
    font-size: 0.8rem;
}

#homeStatistikSection .home-stat-status--error {
    border-color: var(--stat-error-border);
    background: var(--stat-error-bg);
    color: var(--stat-error-text);
}

#homeStatistikSection .home-stat-content > * + * {
    margin-top: 1rem;
}

#homeStatistikSection .home-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

#homeStatistikSection .home-stat-card {
    --stat-accent: #0284c7;
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 0.8rem;
    border: 1px solid var(--stat-border);
    border-radius: 0.85rem;
    background: var(--stat-surface);
}

#homeStatistikSection .home-stat-card--indigo { --stat-accent: #4f46e5; }
#homeStatistikSection .home-stat-card--emerald { --stat-accent: #059669; }
#homeStatistikSection .home-stat-card--rose { --stat-accent: #e11d48; }
#homeStatistikSection .home-stat-card--violet { --stat-accent: #7c3aed; }
#homeStatistikSection .home-stat-card--amber { --stat-accent: #d97706; }

#homeStatistikSection .home-stat-card__head,
#homeStatistikSection .home-stat-card__value-row {
    display: flex;
    min-width: 0;
    align-items: center;
}

#homeStatistikSection .home-stat-card__head {
    gap: 0.45rem;
}

#homeStatistikSection .home-stat-card__marker {
    width: 0.45rem;
    height: 0.45rem;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--stat-accent);
}

#homeStatistikSection .home-stat-card__eyebrow,
#homeStatistikSection .home-stat-card__subvalue,
#homeStatistikSection .home-stat-idsd-card__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#homeStatistikSection .home-stat-card__eyebrow {
    color: var(--stat-muted);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

#homeStatistikSection .home-stat-card__value-row {
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.2rem 0.4rem;
    margin-top: 0.55rem;
}

#homeStatistikSection .home-stat-card__value {
    overflow-wrap: anywhere;
    font-size: clamp(1rem, 4vw, 1.45rem);
    line-height: 1;
}

#homeStatistikSection .home-stat-card__unit,
#homeStatistikSection .home-stat-card__extra,
#homeStatistikSection .home-stat-card__label {
    color: var(--stat-muted);
    font-size: 0.65rem;
    line-height: 1.3;
}

#homeStatistikSection .home-stat-card__extra {
    margin-top: 0.35rem;
    color: var(--stat-positive);
    font-weight: 600;
}

#homeStatistikSection .home-stat-card__details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
    margin-top: auto;
    padding-top: 0.65rem;
}

#homeStatistikSection .home-stat-card__detail {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.1rem;
    padding-top: 0.45rem;
    border-top: 1px solid var(--stat-border);
}

#homeStatistikSection .home-stat-card__detail:only-child {
    grid-column: 1 / -1;
}

#homeStatistikSection .home-stat-card__subvalue {
    color: var(--stat-subtext);
    font-size: 0.72rem;
    line-height: 1.25;
}

#homeStatistikSection .home-stat-idsd {
    padding: 0.85rem;
    border: 1px solid var(--stat-border);
    border-radius: 0.85rem;
    background: var(--stat-surface);
}

#homeStatistikSection .home-stat-idsd-header {
    align-items: baseline;
    margin-bottom: 0.65rem;
}

#homeStatistikSection .home-stat-idsd-title {
    font-size: 0.85rem;
    font-weight: 700;
}

#homeStatistikSection .home-stat-idsd-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

#homeStatistikSection .home-stat-idsd-card {
    min-width: 0;
    padding: 0.65rem;
    border-radius: 0.65rem;
    background: var(--stat-soft);
}

#homeStatistikSection .home-stat-idsd-card--primary {
    background: var(--stat-primary-soft);
}

#homeStatistikSection .home-stat-idsd-card__label {
    display: block;
    color: var(--stat-muted);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
}

#homeStatistikSection .home-stat-idsd-card__value {
    display: block;
    margin-top: 0.25rem;
    font-size: 1rem;
    line-height: 1;
}

@media (min-width: 768px) {
    #homeStatistikSection {
        margin-top: 1.5rem;
        padding: 2rem 0;
    }

    #homeStatistikSection .home-stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.85rem;
    }

    #homeStatistikSection .home-stat-card {
        padding: 1rem;
    }
}

@media (max-width: 639px) {
    #homeStatistikSection .home-stat-header {
        align-items: flex-start;
    }

    #homeStatistikSection .home-stat-source {
        padding: 0.42rem 0.55rem;
        font-size: 0.65rem;
    }

    #homeStatistikSection .home-stat-source svg {
        display: none;
    }

    #homeStatistikSection .home-stat-idsd-header {
        display: block;
    }

    #homeStatistikSection .home-stat-idsd-caption {
        display: block;
    }
}

/* Pagination */
.pagination {
    display: flex;
}
.pagination a, .pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    border-right: 1px solid #e5e7eb;
    transition: all 0.2s;
}
.dark .pagination a, .dark .pagination span {
    color: #9ca3af;
    border-color: #374151;
}
.pagination a:hover {
    background: #f3f4f6;
    color: #111827;
}
.dark .pagination a:hover {
    background: #374151;
    color: white;
}
.pagination .active span,
.pagination span.current {
    background: #0d9488;
    color: white;
}
.pagination a:last-child, .pagination span:last-child {
    border-right: none;
}

/* Article cards */
.article-card {
    transition: transform 0.3s, box-shadow 0.3s;
}
.article-card:hover {
    transform: translateY(-2px);
}

/* Featured image detail page: keep fixed crop height across devices */
.featured-image-fixed {
    display: block;
    width: 100%;
    height: clamp(220px, 56.25vw, 464px);
    object-fit: cover;
    object-position: center;
}

/* Image zoom on hover */
.img-zoom {
    overflow: hidden;
}
.img-zoom img {
    transition: transform 0.5s;
}
.img-zoom:hover img {
    transform: scale(1.05);
}

/* Prose styles */
.prose {
    font-size: 1.1rem;
    line-height: 1.4;
}
.prose h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
}
.prose h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}
.prose p {
    margin-bottom: 1.25rem;
}
.prose img {
    display: block;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}
.prose figure,
.prose .wp-caption {
    max-width: 100% !important;
    width: auto !important;
    margin-left: auto;
    margin-right: auto;
}
.prose a {
    color: #0d9488;
    text-decoration: underline;
}
.prose blockquote {
    border-left: 4px solid #0d9488;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #6b7280;
}
.prose ul, .prose ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}
.prose ul {
    list-style-type: disc;
}
.prose ol {
    list-style-type: decimal;
}
.prose li {
    display: list-item;
    margin-bottom: 0.5rem;
}
.prose ul ul {
    list-style-type: circle;
    margin-top: 0.5rem;
}
.prose ul ul ul {
    list-style-type: square;
}
.prose ol ol {
    list-style-type: lower-alpha;
    margin-top: 0.5rem;
}
.prose ol ol ol {
    list-style-type: lower-roman;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        font-size: clamp(14px, calc(var(--theme-body-size) * 0.93), 17px);
        line-height: 1.65;
    }

    main h1 { font-size: calc(var(--theme-heading-size-base) * 0.98) !important; line-height: 1.28 !important; }
    main h2 { font-size: calc(var(--theme-heading-size-base) * 0.88) !important; line-height: 1.3 !important; }
    main h3 { font-size: calc(var(--theme-heading-size-base) * 0.76) !important; line-height: 1.35 !important; }
    main h4 { font-size: calc(var(--theme-heading-size-base) * 0.68) !important; }
    main h5 { font-size: calc(var(--theme-heading-size-base) * 0.60) !important; }
    main h6 { font-size: calc(var(--theme-heading-size-base) * 0.54) !important; }
}

@media (max-width: 640px) {
    .prose {
        font-size: 1.1rem;
        line-height: 1.4;
    }
    .prose img {
        max-height: 62vh;
        margin: 1rem auto;
    }
    .prose figure,
    .prose .wp-caption {
        width: 100% !important;
    }
}

/* Print */
@media print {
    header, footer, nav, #backToTop, .sidebar-ad {
        display: none !important;
    }
}

/* Samakan proporsi banner dengan Diskominfo tanpa melewati lebar Government. */
#heroSlider.hero-slider-clean {
    position: relative;
    width: calc(100% + 2rem);
    aspect-ratio: 3 / 1;
    min-height: 0;
    margin: -1.5rem -1rem 0;
    overflow: hidden;
    isolation: isolate;
}

#heroSlider.hero-slider-clean .hero-slide,
#heroSlider.hero-slider-clean .hero-slide > div:first-child {
    position: absolute;
    inset: 0;
}

#heroSlider.hero-slider-clean picture {
    display: block;
    width: 100%;
    height: 100%;
}

#heroSlider.hero-slider-clean .hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
