:root { 
    --cpac-blue: #004289; 
    --cpac-light-blue: #0076c0;
    --slate-gray: #f8fafc;
}

body { 
    font-family: 'Sarabun', sans-serif; 
    color: #1e293b; 
    line-height: 1.8; 
    background-color: #ffffff; 
    overflow-x: hidden; 
    max-width: 100%;
    position: relative;
}

h1, h2, h3, h4, .font-kanit { 
    font-family: 'Kanit', sans-serif; 
    letter-spacing: -0.01em; 
}

/* --- Preloader Styles --- */
#preloader {
    position: fixed;
    inset: 0;
    background-color: var(--cpac-blue);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.text-pulse-glow {
    animation: pulseGlow 1.2s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
    0% { transform: scale(0.98); opacity: 0.5; text-shadow: 0 0 0px rgba(255, 255, 255, 0); }
    100% { transform: scale(1.05); opacity: 1; text-shadow: 0 0 20px rgba(255, 255, 255, 0.5); }
}

.header-shadow { 
    box-shadow: 0 2px 15px rgba(0,0,0,0.05); 
    transition: all 0.3s ease; 
}

/* --- Navigation & Menus --- */
#mobile-menu {
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    transform: translateX(100%);
}

#mobile-menu.active { transform: translateX(0); }

.desktop-dropdown { position: relative; }

.desktop-dropdown-content {
    display: block;
    visibility: hidden;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.3s ease;
    pointer-events: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 240px;
    z-index: 50;
}

.desktop-dropdown:hover .desktop-dropdown-content {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.mobile-sub-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0, 1, 0, 1); 
}

.mobile-sub-content.open {
    max-height: 1000px; 
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-sub-inner {
    padding-left: 1rem;
    padding-bottom: 1rem;
    background: #f8fafc;
}

.rotate-icon { transition: transform 0.4s; }

.rotate-icon.active { transform: rotate(180deg); }

/* --- Floating Contact --- */
.float-contact-sync { 
    animation: fluidBounce 3s ease-in-out infinite; 
}

#floating-status {
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fluidBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* --- Utilities & Scrollbar --- */
[data-aos] { pointer-events: none; }
.aos-animate { pointer-events: auto; }

.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.hide-scrollbar::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }

/* --- Fonts --- */
@font-face { font-family: 'Kanit'; src: url('../fonts/kanit-v17-latin_thai-300.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Kanit'; src: url('../fonts/kanit-v17-latin_thai-regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Kanit'; src: url('../fonts/kanit-v17-latin_thai-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Kanit'; src: url('../fonts/kanit-v17-latin_thai-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Kanit'; src: url('../fonts/kanit-v17-latin_thai-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Sarabun'; src: url('../fonts/sarabun-v17-latin_thai-300.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Sarabun'; src: url('../fonts/sarabun-v17-latin_thai-regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Sarabun'; src: url('../fonts/sarabun-v17-latin_thai-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Sarabun'; src: url('../fonts/sarabun-v17-latin_thai-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }