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

/* 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 a,
#themeMainNav button {
    color: var(--theme-menu-text) !important;
}

#themeMainNav a:hover,
#themeMainNav button:hover {
    color: var(--theme-menu-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;
}

.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;
    }
}

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