/* ========================================
   Udara Jakarta - Main Stylesheet (Global)
   ======================================== */

:root {
    --navbar-bg-color: rgba(255, 255, 255, 0.95);
    --navbar-text-color: #2a2a2a;
}

html.dark {
    --navbar-bg-color: rgba(17, 24, 39, 0.92);
    --navbar-text-color: #ffffff;
}

.root {
    --navbar-bg-color: rgba(255, 255, 255, 0.95);
    --navbar-text-color: #2a2a2a;
}

/* ----------------------------------------
   Base Styles & Fonts
   ---------------------------------------- */
* {
    font-family: "Plus Jakarta Sans", sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #ffffff;
    overflow-x: hidden;
}

/* ----------------------------------------
   Navbar Scroll States
   ---------------------------------------- */
#navbar.scrolled {
    background: var(--navbar-bg-color, rgba(255, 255, 255, 0.95));
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Default state (at top - white text) */
#navbar .nav-text {
    color: white;
    transition:
        color 0.3s ease,
        background 0.3s ease,
        padding 0.3s ease,
        border-radius 0.3s ease;
}

/* Active state on landing (blue) - overrides white */
#navbar .nav-text.text-primary {
    color: #4f9cf9;
}

/*html.dark #navbar .nav-text.nav-tab {
    background: rgba(255, 255, 255, 0.08);
}*/

/* When scrolled, nav-tab loses its pill style */
#navbar.scrolled .nav-text.nav-tab {
    background: transparent;
    padding: 0;
    border-radius: 0;
    backdrop-filter: none;
}

#navbar .nav-logo-path {
    fill: white;
    transition: fill 0.3s ease;
}

/* Scrolled state (dark text) */
#navbar.scrolled .nav-text {
    color: var(--navbar-text-color);
}

/* Active state even when scrolled - overrides scrolled dark text */
#navbar.scrolled .nav-text.text-primary {
    color: #4f9cf9;
}

#navbar.scrolled .nav-logo-path {
    fill: #4f9cf9;
}

/* ----------------------------------------
   Mobile Menu
   ---------------------------------------- */
.mobile-menu {
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.active {
    transform: translateX(0);
}

/* ----------------------------------------
   Scrollbar Utilities
   ---------------------------------------- */
.scroll-hide::-webkit-scrollbar {
    display: none;
}

.scroll-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

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

/* ----------------------------------------
   Transitions & Animations
   ---------------------------------------- */
.transition-colors {
    transition-property: color, background-color, border-color;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-transform {
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 500ms;
}

/* ----------------------------------------
   Link & Button Hover Effects
   ---------------------------------------- */
a:hover {
    transition: all 0.2s ease;
}

button:focus {
    outline: none;
}

button:focus-visible {
    outline: 2px solid #4f9cf9;
    outline-offset: 2px;
}

/* ----------------------------------------
   Card Hover Effects
   ---------------------------------------- */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

.group:hover .group-hover\:text-black {
    color: #000000;
}

/* ----------------------------------------
   Primary Color
   ---------------------------------------- */
.bg-primary {
    background-color: #4f9cf9;
}

.text-primary {
    color: #4f9cf9;
}

.border-primary {
    border-color: #4f9cf9;
}

.hover\:bg-primary:hover {
    background-color: #4f9cf9;
}

.hover\:text-primary:hover {
    color: #4f9cf9;
}

/* ----------------------------------------
   FAQ Accordion Styles
   ---------------------------------------- */
.faq-item {
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 0;
    overflow: hidden;
}

.faq-item button {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    text-align: left;
}

.faq-item button:hover .faq-icon {
    color: #000000;
}

.faq-icon {
    color: #9ca3af;
    transition:
        transform 0.3s ease,
        color 0.2s ease;
}

.faq-toggle:hover .faq-icon {
    color: #000;
}

.faq-content {
    animation: fadeIn 0.3s ease;
}

.faq-content.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----------------------------------------
   News Card Styles
   ---------------------------------------- */
.news-card-featured {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
}

.news-card-featured img {
    transition: transform 0.5s ease;
}

.news-card-featured:hover img {
    transform: scale(1.05);
}

.news-card-featured::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.8),
        rgba(0, 0, 0, 0.2),
        transparent
    );
}

/* ----------------------------------------
   CTA Section Background Pattern
   ---------------------------------------- */
.cta-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.1;
}

/* ----------------------------------------
   Footer Styles
   ---------------------------------------- */
.footer-link {
    font-size: 0.75rem;
    color: #6b7280;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #4f9cf9;
}

/* ----------------------------------------
   Day Card Styles (Hari Baik)
   ---------------------------------------- */
.day-card {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.day-card:hover {
    transform: scale(1.1);
}

.day-card.baik {
    background-color: #45c474;
    color: white;
}
.day-card.sedang {
    background-color: #4591c4;
    color: white;
}
.day-card.tidak-sehat {
    background-color: #facf39;
    color: white;
}
.day-card.sangat-tidak-sehat {
    background-color: #e05456;
    color: white;
}
.day-card.berbahaya {
    background-color: #6c6c6c;
    color: white;
}

/* ----------------------------------------
   Progress Bar (Hari Baik)
   ---------------------------------------- */
.progress-bar {
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

/* ----------------------------------------
   Responsive Utilities
   ---------------------------------------- */
@media (max-width: 640px) {
    .mobile-full-width {
        width: 100%;
    }

    .mobile-stack {
        flex-direction: column;
    }

    .mobile-hide {
        display: none;
    }
}

@media (min-width: 640px) and (max-width: 1024px) {
    .tablet-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .desktop-show {
        display: block;
    }

    .desktop-flex {
        display: flex;
    }
}

/* ----------------------------------------
   Hide Scrollbar
   ---------------------------------------- */
::-webkit-scrollbar {
    display: none;
}

html,
body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ----------------------------------------
   Print Styles
   ---------------------------------------- */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        font-size: 12pt;
    }

    a {
        text-decoration: underline;
    }
}

/* ----------------------------------------
   Scroll Animations
   ---------------------------------------- */

/* Base state - hidden */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity 0.8s ease-out,
        transform 0.8s ease-out;
}

/* Animated state - visible */
.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Fade in up animation */
.animate-fade-up {
    opacity: 0;
    transform: translateY(60px);
    transition:
        opacity 0.8s ease-out,
        transform 0.8s ease-out;
}

.animate-fade-up.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Fade in left animation */
.animate-fade-left {
    opacity: 0;
    transform: translateX(-60px);
    transition:
        opacity 0.8s ease-out,
        transform 0.8s ease-out;
}

.animate-fade-left.animated {
    opacity: 1;
    transform: translateX(0);
}

/* Fade in right animation */
.animate-fade-right {
    opacity: 0;
    transform: translateX(60px);
    transition:
        opacity 0.8s ease-out,
        transform 0.8s ease-out;
}

.animate-fade-right.animated {
    opacity: 1;
    transform: translateX(0);
}

/* Scale up animation */
.animate-scale {
    opacity: 0;
    transform: scale(0.9);
    transition:
        opacity 0.8s ease-out,
        transform 0.8s ease-out;
}

.animate-scale.animated {
    opacity: 1;
    transform: scale(1);
}

/* Stagger children animations */
.animate-stagger > * {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.6s ease-out,
        transform 0.6s ease-out;
}

.animate-stagger.animated > *:nth-child(1) {
    transition-delay: 0.1s;
}
.animate-stagger.animated > *:nth-child(2) {
    transition-delay: 0.2s;
}
.animate-stagger.animated > *:nth-child(3) {
    transition-delay: 0.3s;
}
.animate-stagger.animated > *:nth-child(4) {
    transition-delay: 0.4s;
}
.animate-stagger.animated > *:nth-child(5) {
    transition-delay: 0.5s;
}
.animate-stagger.animated > *:nth-child(6) {
    transition-delay: 0.6s;
}

.animate-stagger.animated > * {
    opacity: 1;
    transform: translateY(0);
}

/* Delay modifiers */
.animate-delay-100 {
    transition-delay: 0.1s !important;
}
.animate-delay-200 {
    transition-delay: 0.2s !important;
}
.animate-delay-300 {
    transition-delay: 0.3s !important;
}
.animate-delay-400 {
    transition-delay: 0.4s !important;
}
.animate-delay-500 {
    transition-delay: 0.5s !important;
}
