/**
 * Template Lingga Ujuara - Styles
 */

:root {
    --theme-menu-bg-start: #0D9488;
    --theme-menu-bg-end: #0F766E;
    --theme-menu-text: #FFFFFF;
    --theme-menu-hover-text: #FFFFFF;
    --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: #1E293B;
    --theme-footer-text: #E2E8F0;
    --theme-footer-link: #F8FAFC;
    --theme-footer-link-hover: #2DD4BF;

    --theme-heading-size-base: 34px;
    --theme-body-size: 16px;
    --theme-heading-font-stack: 'Inter', sans-serif;
    --theme-body-font-stack: 'Inter', sans-serif;
}

.lju-section-head {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1rem;
}

.lju-section-title {
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #0f172a;
}

.dark .lju-section-title {
    color: #f8fafc;
}

.lju-section-rule {
    height: 2px;
    flex: 1;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(14, 165, 233, .95), rgba(14, 165, 233, 0));
}

.lju-section-action {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .75rem;
    font-weight: 600;
    color: #0d9488;
    transition: color .2s ease;
}

.lju-section-action:hover {
    color: #0f766e;
}

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

@media (prefers-reduced-motion: reduce) {
    .animate-marquee {
        animation: none !important;
    }
    html,
    body {
        scroll-behavior: auto !important;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

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

/* Homepage card loading states (shared) */
.epaper-home-overlay {
    background: linear-gradient(180deg, rgba(10, 37, 88, 0.78) 0%, rgba(12, 55, 138, 0.22) 36%, rgba(2, 8, 23, 0.92) 100%);
}

.epaper-home-bottom {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.epaper-home-title {
    font-family: var(--theme-heading-font-stack);
    font-size: clamp(14px, calc(var(--theme-heading-size-base) * 0.42), 18px);
    min-height: 2.9em;
}

.epaper-home-cta {
    font-family: var(--theme-body-font-stack);
    font-size: clamp(13px, calc(var(--theme-body-size) * 0.95), 16px);
    font-weight: 700;
}

.epaper-home-link.is-loading .epaper-home-cta {
    pointer-events: none;
    opacity: .92;
}

.epaper-home-link.is-loading .epaper-home-cta-icon {
    display: none;
}

.epaper-home-link.is-loading .epaper-home-cta::before {
    content: "";
    width: 14px;
    height: 14px;
    border-radius: 9999px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    margin-right: .45rem;
    animation: ljuSpin .7s linear infinite;
}

.home-pengumuman-link.is-loading {
    pointer-events: none;
    opacity: .92;
}

.home-pengumuman-link.is-loading .home-pengumuman-icon {
    display: none;
}

.home-pengumuman-link.is-loading .home-pengumuman-label::before {
    content: "";
    display: inline-block;
    width: 13px;
    height: 13px;
    border-radius: 9999px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    margin-right: .45rem;
    vertical-align: -2px;
    animation: ljuSpin .7s linear infinite;
}

.home-dokumen-link.is-loading {
    pointer-events: none;
}

.home-dokumen-link.is-loading article {
    opacity: .88;
}

.home-dokumen-link.is-loading article::after {
    content: "";
    position: absolute;
    top: .65rem;
    right: .65rem;
    width: 13px;
    height: 13px;
    border-radius: 9999px;
    border: 2px solid rgba(255, 255, 255, .5);
    border-top-color: #fff;
    animation: ljuSpin .7s linear infinite;
}

@keyframes ljuSpin {
    to { transform: rotate(360deg); }
}

/* Unified loading states for list CTA/filter buttons */
.lju-loading-trigger.is-loading {
    pointer-events: none;
    opacity: .92;
}

.lju-loading-trigger.is-loading .lju-loading-icon {
    display: none;
}

.lju-loading-trigger.is-loading .lju-loading-target::before {
    content: "";
    display: inline-block;
    width: 13px;
    height: 13px;
    margin-right: .45rem;
    border-radius: 9999px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    vertical-align: middle;
    animation: ljuSpin .7s linear infinite;
}

/* List card overlays and image aspect heights */
.pengumuman-card-clean .pengumuman-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2) 0%, rgba(2, 6, 23, 0.26) 38%, rgba(2, 6, 23, 0.88) 100%);
}

.infografis-card-clean .infografis-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2) 0%, rgba(2, 6, 23, 0.26) 38%, rgba(2, 6, 23, 0.88) 100%);
}

.video-card-clean .video-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18) 0%, rgba(2, 6, 23, 0.24) 38%, rgba(2, 6, 23, 0.88) 100%);
}

.epaper-card .epaper-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(13, 88, 197, 0.72) 0%, rgba(13, 88, 197, 0.28) 34%, rgba(2, 6, 23, 0.78) 100%);
}

.pengumuman-cover,
.infografis-cover,
.video-cover {
    min-height: 320px;
}

.epaper-cover {
    min-height: 360px;
}

.share-inline-row {
    scrollbar-width: none;
}

.share-inline-row::-webkit-scrollbar {
    display: none;
}

details > summary::-webkit-details-marker {
    display: none;
}

/* Popup rich content (moved from inline style) */
#linggauPopupModal .popup-rich-content iframe,
#linggauPopupModal .popup-rich-content embed,
#linggauPopupModal .popup-rich-content object,
#linggauPopupModal .popup-rich-content video {
    width: 100%;
    max-width: 100%;
}

#linggauPopupModal .popup-rich-content iframe {
    min-height: 260px;
}

/* 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 {
    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: 1rem;
    }
    .prose img {
        max-height: 62vh;
        margin: 1rem auto;
    }
    .prose figure,
    .prose .wp-caption {
        width: 100% !important;
    }

    .pengumuman-cover,
    .infografis-cover,
    .video-cover {
        min-height: 300px;
    }

    .epaper-cover {
        min-height: 420px;
    }
}

@media (min-width: 480px) {
    .xs\:inline {
        display: inline !important;
    }
    .xs\:inline-flex {
        display: inline-flex !important;
    }
}

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