/**
 * Template Lingga Ujuara - Styles
 */

: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);
}

/* 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.125rem;
    line-height: 1.8;
}
.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 {
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}
.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: 1rem;
    }
}

/* ========================================
   Global Skeleton Loader (Gov Template)
======================================== */
body.gov-skeleton-active {
    overflow: hidden;
}
.gov-global-skeleton {
    position: fixed;
    inset: 0;
    z-index: 11000;
    background: #f3f4f6;
    display: flex;
    align-items: stretch;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity .34s ease, visibility .34s ease;
}
.dark .gov-global-skeleton {
    background: #020617;
}
.gov-global-skeleton.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.gov-global-skeleton__inner {
    width: min(1200px, 100%);
    padding: 24px 18px 28px;
    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: 18px;
}
.gov-global-skeleton__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.gov-global-skeleton__hero {
    height: clamp(160px, 25vh, 290px);
    border-radius: 16px;
    background: linear-gradient(130deg, rgba(148, 163, 184, 0.22), rgba(148, 163, 184, 0.35));
    animation: govSkeletonPulse 1.2s ease-in-out infinite;
}
.dark .gov-global-skeleton__hero {
    background: linear-gradient(130deg, rgba(51, 65, 85, 0.55), rgba(51, 65, 85, 0.3));
}
.gov-global-skeleton__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.gov-global-skeleton__card {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.6);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.dark .gov-global-skeleton__card {
    border-color: rgba(51, 65, 85, 0.5);
    background: rgba(15, 23, 42, 0.55);
}
.gov-global-skeleton__thumb {
    display: block;
    border-radius: 10px;
    height: 120px;
    background: linear-gradient(125deg, rgba(148, 163, 184, 0.2), rgba(148, 163, 184, 0.35));
    animation: govSkeletonPulse 1.2s ease-in-out infinite;
}
.dark .gov-global-skeleton__thumb {
    background: linear-gradient(125deg, rgba(51, 65, 85, 0.5), rgba(51, 65, 85, 0.32));
}
.gov-global-skeleton__line {
    display: block;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(125deg, rgba(148, 163, 184, 0.2), rgba(148, 163, 184, 0.35));
    animation: govSkeletonPulse 1.2s ease-in-out infinite;
}
.dark .gov-global-skeleton__line {
    background: linear-gradient(125deg, rgba(51, 65, 85, 0.5), rgba(51, 65, 85, 0.32));
}
.gov-w-64 { width: 86%; }
.gov-w-56 { width: 72%; }
.gov-w-52 { width: 68%; }
.gov-w-48 { width: 60%; }
.gov-w-44 { width: 54%; }
.gov-w-40 { width: 38%; }
.gov-w-36 { width: 46%; }
.gov-w-24 { width: 22%; }
@keyframes govSkeletonPulse {
    0%, 100% { opacity: .58; }
    50% { opacity: 1; }
}
@media (max-width: 900px) {
    .gov-global-skeleton__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 640px) {
    .gov-global-skeleton__inner {
        padding: 18px 12px 22px;
        gap: 14px;
    }
    .gov-global-skeleton__hero {
        height: 160px;
        border-radius: 12px;
    }
    .gov-global-skeleton__grid {
        grid-template-columns: 1fr;
    }
    .gov-global-skeleton__thumb {
        height: 96px;
    }
    .gov-hide-mobile {
        display: none;
    }
}

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