@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');
/* Description Font (Fallback) */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Khmer:wght@300;400;500;600;700&display=swap');

/* --- Fonts Setup --- */

/* CLEAN FONT STACK:
   We prioritize 'Plus Jakarta Sans' for English/Numbers
   and 'Kantumruy Pro' (from HTML import) for Khmer.
   We keep the local font definitions as optional fallbacks but move them down the stack.
*/

/* MiSans Khmer - Regular */
@font-face {
    font-family: 'MiSans Khmer';
    src: url('img/MiSansKhmer-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* MiSans Khmer - Bold */
@font-face {
    font-family: 'MiSans Khmer';
    src: url('img/MiSansKhmer-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* --- GLOBAL FLUID TYPOGRAPHY (MEDIA QUERIES) --- */

html {
    font-size: 14px; /* Mobile: Base size is smaller */
    scroll-behavior: smooth;
}

@media (min-width: 640px) { /* Tablet (Small) */
    html {
        font-size: 15px; 
    }
}

@media (min-width: 1024px) { /* Desktop (Large) */
    html {
        font-size: 16px; /* Standard Desktop size */
    }
}

body {
    /* CLEANER STACK: English -> Google Khmer -> Local Khmer -> System */
    font-family: 'Plus Jakarta Sans', 'Kantumruy Pro', 'Noto Sans Khmer', sans-serif;
    -webkit-tap-highlight-color: transparent; /* Remove blue tap highlight on mobile */
    font-size: 1rem; /* Inherits from html */
    line-height: 1.5;
}

/* --- Khmer Typography Adjustments --- */

.font-khmer {
    font-family: 'Kantumruy Pro', 'Noto Sans Khmer', sans-serif !important;
    line-height: 1.6 !important;
}

/* Updated to use cleaner Kantumruy Pro instead of potentially missing MiSans */
.font-akbalthom {
    font-family: 'Kantumruy Pro', 'MiSans Khmer', 'Noto Sans Khmer', sans-serif;
    font-weight: 700; 
}

.khmer-text {
    font-family: 'Kantumruy Pro', 'MiSans Khmer', 'Noto Sans Khmer', sans-serif;
}

/* Adjust sizes for better Khmer readability */
.font-khmer .text-xs     { font-size: 0.85rem; }
.font-khmer .text-sm     { font-size: 0.95rem; }
.font-khmer .text-base   { font-size: 1.08rem; }
.font-khmer .text-lg     { font-size: 1.25rem; }
.font-khmer .text-xl     { font-size: 1.4rem; }
.font-khmer .text-2xl    { font-size: 1.65rem; }
.font-khmer .text-3xl    { font-size: 2.1rem; }

.font-khmer button, 
.font-khmer input, 
.font-khmer textarea, 
.font-khmer select {
    font-size: 105%; 
}

@media (max-width: 639px) {
    .khmer-text {
        line-height: 1.7; 
    }
    .mobile-text-boost {
        font-size: 1.7rem !important;
    }
}

/* --- MODERN UI COMPONENTS (GLASSMORPHISM & GRADIENTS) --- */

.glass-nav {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-nav-scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: 0 10px 40px rgba(153, 27, 27, 0.08);
    border-bottom: 1px solid rgba(255, 0, 0, 0.1);
}

/* Mobile Header Refinements */
@media (max-width: 640px) {
    .glass-nav {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
    
    .glass-nav img {
        height: 2.5rem !important; /* Scale logo for mobile */
    }

    .glass-nav-scrolled {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
}

.glass-pill-nav {
    background: rgba(255, 255, 255, 0.8); 
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.15), 
        inset 0 1px 0 0 rgba(255, 255, 255, 0.5);
}

/* Hero Gradient Overlay: Dynamic depth for text readability */
.hero-overlay {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.1) 40%,
        rgba(0, 0, 0, 0.5) 100%
    );
}

/* Active Nav State with Glow Indicator */
.nav-item-active {
    position: relative;
    color: #FF0000 !important;
    text-shadow: 0 0 15px rgba(255, 0, 0, 0.2);
}

.nav-item-active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #FF0000;
    border-radius: 50%;
    box-shadow: 0 0 10px #FF0000;
}

/* Destination Card Overlay */
.card-gradient-overlay {
    background: linear-gradient(
        to top,
        rgba(15, 23, 42, 0.9) 0%,
        rgba(15, 23, 42, 0.3) 50%,
        transparent 100%
    );
}

/* --- Utilities --- */

.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.pb-safe { padding-bottom: env(safe-area-inset-bottom, 20px); }
.mb-safe { margin-bottom: env(safe-area-inset-bottom, 20px); }
.pt-safe { padding-top: env(safe-area-inset-top, 20px); }

/* --- Animations --- */

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.animate-slide-up {
    animation: slideUp 0.4s ease-out forwards;
}

.fade-transition {
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-backdrop {
    transition: opacity 0.3s ease;
}

.touch-scale {
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}
.touch-scale:active {
    transform: scale(0.95);
}

/* --- SEASONAL EFFECTS: SNOW --- */

#snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
    display: none;
}

#snow-container.active {
    display: block;
}

.snowflake {
    position: absolute;
    top: -10px;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    box-shadow: 0 0 5px rgba(255,255,255,0.8);
    animation: fall linear infinite;
}

@keyframes fall {
    0% { transform: translateY(-10vh) translateX(0px); opacity: 1; }
    100% { transform: translateY(110vh) translateX(20px); opacity: 0.3; }
}

/* --- New Responsive Banner Helper --- */
/* Ensures the banner image is always centered or covers the area appropriately */
.banner-image-responsive {
    object-position: center center;
    width: 100%;
    height: 100%;
}