/**
 * 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;
}

.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 compact layout */
#homeStatistikSection .home-stat-shell {
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
}

#homeStatistikSection .home-stat-header {
    align-items: flex-start;
}

#homeStatistikSection .home-stat-title {
    letter-spacing: 0.03em;
    line-height: 1.2;
}

#homeStatistikSection .home-stat-subtitle,
#homeStatistikSection .home-stat-idsd-caption,
#homeStatistikSection .home-stat-idsd-source {
    line-height: 1.35;
}

#homeStatistikSection .home-stat-source {
    line-height: 1.2;
}

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

#homeStatistikSection .home-stat-grid {
    align-items: start;
}

#homeStatistikSection .home-stat-card {
    align-self: start;
    padding: 0.72rem;
    box-shadow: 0 7px 20px rgba(15, 23, 42, 0.09);
}

#homeStatistikSection .home-stat-card__header {
    gap: 0.5rem;
}

#homeStatistikSection .home-stat-card__icon {
    position: relative;
    overflow: hidden;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 0.72rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 8px 14px rgba(15, 23, 42, 0.12);
}

#homeStatistikSection .home-stat-card__icon::before,
#homeStatistikSection .home-stat-idsd-card__icon::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.02));
}

#homeStatistikSection .home-stat-card__icon::after,
#homeStatistikSection .home-stat-idsd-card__icon::after {
    content: "";
    position: absolute;
    top: -18%;
    right: -14%;
    width: 62%;
    height: 62%;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    filter: blur(6px);
}

#homeStatistikSection .home-stat-card__icon svg {
    position: relative;
    z-index: 1;
    width: 0.88rem;
    height: 0.88rem;
}

#homeStatistikSection .home-stat-card__eyebrow {
    font-size: 0.57rem;
    letter-spacing: 0.07em;
    line-height: 1.15;
}

#homeStatistikSection .home-stat-card__value-row {
    margin-top: 0.2rem;
    gap: 0.15rem 0.45rem;
}

#homeStatistikSection .home-stat-card__value {
    font-size: 0.98rem;
}

#homeStatistikSection .home-stat-card__unit,
#homeStatistikSection .home-stat-card__label,
#homeStatistikSection .home-stat-card__extra {
    font-size: 0.58rem;
    line-height: 1.15;
}

#homeStatistikSection .home-stat-card__extra {
    white-space: nowrap;
}

#homeStatistikSection .home-stat-card__footer {
    margin-top: 0.45rem;
    padding-top: 0.45rem;
}

#homeStatistikSection .home-stat-card__subgrid {
    gap: 0.3rem 0.55rem;
}

#homeStatistikSection .home-stat-card__meta {
    min-width: 0;
    line-height: 1.1;
}

#homeStatistikSection .home-stat-card__meta--right {
    justify-self: end;
}

#homeStatistikSection .home-stat-card__subvalue {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.7rem;
    white-space: nowrap;
}

#homeStatistikSection .home-stat-card__progress {
    margin-top: 0.45rem;
    height: 0.24rem;
}

#homeStatistikSection .home-stat-idsd {
    padding: 0.85rem;
}

#homeStatistikSection .home-stat-idsd-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(10.25rem, 1fr);
    gap: 0.55rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 0.2rem;
    scroll-snap-type: x proximity;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#homeStatistikSection .home-stat-idsd-grid::-webkit-scrollbar {
    display: none;
}

#homeStatistikSection .home-stat-idsd-card {
    padding: 0.7rem;
    min-width: 0;
    scroll-snap-align: start;
}

#homeStatistikSection .home-stat-idsd-card__body {
    gap: 0.55rem;
}

#homeStatistikSection .home-stat-idsd-card__label {
    display: block;
    font-size: 0.6rem;
    line-height: 1.2;
    letter-spacing: 0.05em;
}

#homeStatistikSection .home-stat-idsd-card__value {
    font-size: 1rem;
    line-height: 1.05;
}

#homeStatistikSection .home-stat-idsd-card__icon {
    position: relative;
    overflow: hidden;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 16px rgba(15, 23, 42, 0.12);
}

#homeStatistikSection .home-stat-idsd-card__icon svg {
    position: relative;
    z-index: 1;
    width: 0.9rem;
    height: 0.9rem;
}

@media (min-width: 640px) {
    #homeStatistikSection .home-stat-idsd-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-auto-flow: row;
        grid-auto-columns: auto;
        overflow-x: visible;
        padding-bottom: 0;
        scroll-snap-type: none;
    }
}

@media (min-width: 768px) {
    #homeStatistikSection .home-stat-content > * + * {
        margin-top: 1rem;
    }

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

    #homeStatistikSection .home-stat-card__icon {
        width: 2rem;
        height: 2rem;
    }

    #homeStatistikSection .home-stat-card__icon svg {
        width: 0.92rem;
        height: 0.92rem;
    }

    #homeStatistikSection .home-stat-card__eyebrow {
        font-size: 0.61rem;
    }

    #homeStatistikSection .home-stat-card__value {
        font-size: 1.3rem;
    }

    #homeStatistikSection .home-stat-card__subvalue {
        font-size: 0.76rem;
    }

    #homeStatistikSection .home-stat-idsd-card__value {
        font-size: 1.3rem;
    }
}

@media (max-width: 639px) {
    #homeStatistikSection .home-stat-shell {
        padding-top: 0.75rem;
        padding-bottom: 0.8rem;
    }

    #homeStatistikSection .home-stat-header {
        margin-bottom: 0.75rem;
        gap: 0.4rem;
    }

    #homeStatistikSection .home-stat-title {
        font-size: 0.95rem;
    }

    #homeStatistikSection .home-stat-subtitle {
        font-size: 0.68rem;
    }

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

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

    #homeStatistikSection .home-stat-grid {
        gap: 0.5rem;
    }

    #homeStatistikSection .home-stat-card {
        padding: 0.62rem;
        border-radius: 0.85rem;
    }

    #homeStatistikSection .home-stat-card__icon {
        width: 1.6rem;
        height: 1.6rem;
        border-radius: 0.62rem;
    }

    #homeStatistikSection .home-stat-card__icon svg {
        width: 0.78rem;
        height: 0.78rem;
    }

    #homeStatistikSection .home-stat-card__value {
        font-size: 0.88rem;
    }

    #homeStatistikSection .home-stat-card__subvalue {
        font-size: 0.65rem;
    }

    #homeStatistikSection .home-stat-card__footer {
        margin-top: 0.35rem;
        padding-top: 0.35rem;
    }

    #homeStatistikSection .home-stat-card__eyebrow {
        font-size: 0.52rem;
    }

    #homeStatistikSection .home-stat-card__unit,
    #homeStatistikSection .home-stat-card__label,
    #homeStatistikSection .home-stat-card__extra {
        font-size: 0.54rem;
    }

    #homeStatistikSection .home-stat-idsd {
        padding: 0.75rem;
    }

    #homeStatistikSection .home-stat-idsd-grid {
        gap: 0.45rem;
        grid-auto-columns: minmax(9.2rem, 1fr);
    }

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

    #homeStatistikSection .home-stat-idsd-card__label {
        font-size: 0.54rem;
    }

    #homeStatistikSection .home-stat-idsd-card__value {
        font-size: 0.92rem;
    }

    #homeStatistikSection .home-stat-idsd-card__icon {
        width: 1.45rem;
        height: 1.45rem;
        border-radius: 0.55rem;
    }

    #homeStatistikSection .home-stat-idsd-card__icon svg {
        width: 0.75rem;
        height: 0.75rem;
    }
}

/* 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;
    }
}
