
/* =========================================
   9. CUSTOM ANIMATIONS & INTERACTIVE ELEMENTS
   ========================================= */

/* 9.1 Floating Animation - Makes elements gently float up and down */
/* @keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
} */

.floating-element {
    animation: float 4s ease-in-out infinite;
    display: inline-block; /* Ensure transform works */
}

.delay-float-1 { animation-delay: 1s; }
.delay-float-2 { animation-delay: 2s; }


/* 9.2 Pulse Animation - Attention Grabber for Buttons */
@keyframes pulse-ring {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); /* Line Color Greenish */
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(76, 175, 80, 0); 
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

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

/* Also add a subtle pulse for the Phone button */
@keyframes pulse-ring-primary {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 83, 182, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(0, 83, 182, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 83, 182, 0);
    }
}
.pulse-animation-primary {
    animation: pulse-ring-primary 2.5s infinite;
}


/* 9.3 Shimmer Text Effect */
@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.text-shimmer {
    background: linear-gradient(to right, #ffc107 20%, #fff 40%, #ffc107 60%, #ffc107 80%);
    background-size: 200% auto;
    color: #000;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3s linear infinite;
    font-weight: 800;
    text-shadow: none !important; /* Remove shadow to see clip */
}


/* 9.4 Enhanced Card Hover */
.product-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

/* .product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important;
} */

.product-card .img-wrapper img {
    transition: transform 0.6s ease;
}
/* 
.product-card:hover .img-wrapper img {
    transform: scale(1.15) rotate(2deg);
} */

/* .product-card:hover h5 {
    color: var(--primary-color) !important;
} */


/* 9.5 Feature Icons Wiggle */
@keyframes wiggle {
    0%, 7% { transform: rotateZ(0); }
    15% { transform: rotateZ(-15deg); }
    20% { transform: rotateZ(10deg); }
    25% { transform: rotateZ(-10deg); }
    30% { transform: rotateZ(6deg); }
    35% { transform: rotateZ(-4deg); }
    40%, 100% { transform: rotateZ(0); }
}

.feature-badge:hover i {
    animation: wiggle 0.6s linear;
    color: var(--accent-color);
}
.feature-badge {
    transition: transform 0.3s ease, background-color 0.3s ease;
}
.feature-badge:hover {
    transform: translateY(-3px);
    background-color: rgba(255,255,255,0.2) !important;
}

/* 9.6 Package Card Pop */
.package-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.package-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,83,182,0.15) !important;
    border-color: var(--primary-color) !important;
}

/* =========================================
   10. SUPERCHARGED ANIMATIONS
   ========================================= */

/* 10.1 Animated Gradient Background */
.animated-bg-gradient {
    /* Brighter, more vibrant Deep Blue gradient */
    background: linear-gradient(-45deg, #004b9e, #0e2a52, #1a71c9, #0053b6);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 10.2 Floating Shapes / Particles */
/* Container to hold absolute shapes */
.shape-blob {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    animation: floatShape 20s infinite linear;
    z-index: 1;
    pointer-events: none; /* Let clicks pass through */
}

.shape-1 {
    width: 200px; height: 200px;
    top: -10%; left: -5%;
    animation-duration: 25s;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 70%);
}
.shape-2 {
    width: 150px; height: 150px;
    bottom: 10%; right: 5%;
    background: rgba(255, 193, 7, 0.1); /* Yellow tint */
    animation-duration: 18s;
    animation-delay: -5s;
    animation-direction: reverse;
}
.shape-3 {
    width: 60px; height: 60px;
    top: 20%; right: 20%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255,255,255,0.1);
    animation: floatShape 15s infinite ease-in-out;
}
.shape-4 {
    width: 40px; height: 40px;
    bottom: 25%; left: 10%;
    border-radius: 8px; /* Square with rounded corners */
    background: rgba(255, 255, 255, 0.08);
    animation: rotateFloat 12s infinite linear;
}

@keyframes floatShape {
    0% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(40px, -60px) rotate(10deg); }
    66% { transform: translate(-30px, 30px) rotate(-5deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes rotateFloat {
    0% { transform: translateY(0) rotate(0deg); opacity: 0.5; }
    50% { transform: translateY(-40px) rotate(180deg); opacity: 0.8; }
    100% { transform: translateY(0) rotate(360deg); opacity: 0.5; }
}

/* 10.3 Button Shine Sweeping Effect */
.btn-shine {
    position: relative;
    overflow: hidden;
}
.btn-shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transition: 0.5s;
    animation: shine-sweep 3s infinite;
}

@keyframes shine-sweep {
    0% { left: -100%; }
    20% { left: 100%; }
    100% { left: 100%; }
}

/* 10.4 Typing Effect Cursor */
.typing-cursor::after {
    content: '|';
    animation: blink 1s infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* 10.5 Scroll Down Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
    z-index: 5;
    animation: bounce 2s infinite;
    cursor: pointer;
    text-decoration: none;
}
.scroll-indicator i {
    font-size: 1.8rem;
    margin-top: 5px;
}
.scroll-indicator:hover {
    color: #fff;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); }
    40% { transform: translate(-50%, -10px); }
    60% { transform: translate(-50%, -5px); }
}

/* 10.6 Wave Dividers */
.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 3;
}
.wave-divider svg {
    position: relative;
    display: block;
    width: calc(180% + 1.3px); /* Wider to allow movement if needed */
    height: 60px;
}
.wave-divider .shape-fill {
    fill: #fcfcfc; /* Matched body bg */
}

@media (min-width: 768px) {
    .wave-divider svg {
        width: calc(100% + 1.3px);
        height: 80px;
    }
}
/* =========================================
   11. FADE & SLIDE UP ANIMATION (ON LOAD)
   ========================================= */

/* 1. ซ่อนข้อความไว้ก่อน และปรับให้เลื่อนต่ำลงมานิดหน่อย */
.animate-up {
    opacity: 0;
    transform: translateY(30px);
}

/* 2. เมื่อ Loading เสร็จสิ้น ให้เริ่มแอนิเมชัน โดยตั้งหน่วงเวลาพื้นฐานไว้ที่ 5 วินาที */
body.loaded .animate-up {
    animation: fadeSlideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}



/* 4. คำสั่ง Keyframes สำหรับควบคุมการเคลื่อนไหว */
@keyframes fadeSlideUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}