/* ==================== Base Styles ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans Thai', sans-serif;
    overflow-x: hidden;
}

/* ==================== Navbar ==================== */
#navbar {
    background: transparent;
    transition: all 0.3s ease;
}

#navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

#navbar.scrolled .nav-logo-text {
    color: white;
}

/* ==================== Scroll Animations ==================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }
.animate-on-scroll:nth-child(5) { transition-delay: 0.4s; }
.animate-on-scroll:nth-child(6) { transition-delay: 0.5s; }

/* ==================== Float Animation ==================== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* ==================== Counter Animation ==================== */
.counter {
    display: inline-block;
}

/* ==================== FAQ Styles ==================== */
.faq-item {
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: #2563eb;
}

.faq-item.active {
    border-color: #2563eb;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.1);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-content.show {
    max-height: 200px;
}

/* ==================== Back to Top Button ==================== */
#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* ==================== Form Focus Glow ==================== */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ==================== Selection Color ==================== */
::selection {
    background: rgba(37, 99, 235, 0.2);
    color: #1e3a8a;
}

/* ==================== Smooth Section Transitions ==================== */
section {
    position: relative;
}

/* ==================== Custom Scrollbar ==================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ==================== Responsive Adjustments ==================== */
@media (max-width: 640px) {
    .animate-on-scroll {
        transform: translateY(20px);
    }

    #hero h1 {
        font-size: 2rem;
    }
}

/* ==================== Loading Animation ==================== */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
}

.pulse-glow {
    animation: pulse-glow 2s infinite;
}

/* ==================== Gradient Text ==================== */
.gradient-text {
    background: linear-gradient(135deg, #10b981, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== Card Hover Effects ==================== */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}
