/* ===== BASE & RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }



/* ===== SCROLL PROGRESS BAR ===== */
#scroll-progress {
    position: fixed; top: 0; left: 0; height: 3px; z-index: 9999;
    background: linear-gradient(90deg, #3B82F6, #60A5FA, #F39200);
    width: 0%; transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(59,130,246,0.3);
}

/* ===== PRELOADER ===== */
#preloader {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.preloader-pulse {
    animation: preloaderPulse 1.5s ease-in-out infinite;
}
@keyframes preloaderPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0,74,153,0.4); }
    50% { transform: scale(1.1); box-shadow: 0 0 0 20px rgba(0,74,153,0); }
}
.preloader-bar-track {
    width: 180px; height: 4px; background: rgba(0,74,153,0.1);
    border-radius: 2px; overflow: hidden;
}
.preloader-bar-fill {
    width: 0%; height: 100%; background: linear-gradient(90deg, #004A99, #1a75ff);
    border-radius: 2px; animation: preloaderFill 1.5s ease-in-out forwards;
}
@keyframes preloaderFill {
    0% { width: 0%; }
    100% { width: 100%; }
}
.preloader-ripple {
    display: flex; gap: 6px;
}
.preloader-ripple div {
    width: 10px; height: 10px; border-radius: 50%;
    background: #004A99; animation: preloaderRipple 1.2s ease-in-out infinite;
}
.preloader-ripple div:nth-child(2) { animation-delay: 0.15s; }
.preloader-ripple div:nth-child(3) { animation-delay: 0.3s; }
@keyframes preloaderRipple {
    0%, 100% { transform: scale(0.6); opacity: 0.3; }
    50% { transform: scale(1); opacity: 1; }
}
#preloader.fade-out {
    opacity: 0; pointer-events: none;
}

/* ===== HERO BACKGROUND ===== */
.hero-bg-gradient {
    background: radial-gradient(ellipse 80% 60% at 70% 40%, rgba(15,23,42,0.04) 0%, transparent 70%),
                radial-gradient(ellipse 60% 50% at 20% 80%, rgba(243,146,0,0.03) 0%, transparent 60%),
                radial-gradient(ellipse 50% 40% at 80% 20%, rgba(0,74,153,0.03) 0%, transparent 50%);
}

.hero-water-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23004A99' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ===== NAVBAR ===== */
#navbar { background: transparent; }
#navbar.scrolled {
    background: rgba(255,255,255,0.80);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 30px rgba(59,130,246,0.06);
    border-bottom: 1px solid rgba(241,245,249,0.8);
}
.nav-brand-text, .nav-sub-text { color: #1a202c; }
.nav-link { color: #4a5568; position: relative; }
.nav-link::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    width: 0; height: 2px; background: #0F172A;
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.hamburger-icon { color: #1a202c; }



/* ===== HERO TEXT REVEAL ===== */
.hero-word {
    display: inline-block; opacity: 0;
    transform: translateY(40px) rotateX(15deg);
    animation: wordReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes wordReveal {
    to { opacity: 1; transform: translateY(0) rotateX(0); }
}

/* ===== HERO BADGE SHIMMER ===== */
.hero-badge {
    position: relative; overflow: hidden;
}
.hero-badge::after {
    content: ''; position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 3s ease-in-out infinite;
}
@keyframes shimmer {
    0% { left: -100%; }
    50%,100% { left: 100%; }
}

/* ===== FLOATING HERO IMAGE ===== */
.hero-float { animation: heroFloat 6s ease-in-out infinite; }
@keyframes heroFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-12px) rotate(0.5deg); }
    75% { transform: translateY(-8px) rotate(-0.5deg); }
}

/* ===== FLOATING TRUST BADGES ===== */
.trust-badge {
    will-change: transform;
    z-index: 2;
}
@keyframes floatBadge {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-12px) rotate(1deg); }
    50% { transform: translateY(-6px) rotate(-0.5deg); }
    75% { transform: translateY(-14px) rotate(0.5deg); }
}

/* ===== GLASSMORPHISM FLOATING SHAPES ===== */
@keyframes floatShape {
    0%, 100% { transform: translateY(0) rotate(var(--tw-rotate, 0deg)); }
    33% { transform: translateY(-18px) rotate(calc(var(--tw-rotate, 0deg) + 5deg)); }
    66% { transform: translateY(-8px) rotate(calc(var(--tw-rotate, 0deg) - 3deg)); }
}

/* ===== ANIMATED WAVE DIVIDER ===== */
.wave-divider svg {
    height: 80px;
}
@keyframes waveMove {
    0%, 100% { d: path("M0,60 C240,120 480,0 720,60 C960,120 1200,0 1440,60 L1440,120 L0,120 Z"); }
    50% { d: path("M0,80 C240,0 480,120 720,40 C960,0 1200,120 1440,80 L1440,120 L0,120 Z"); }
}

/* ===== WATER DROPS (Realistic Hero Animation) ===== */
.water-drop {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}
.water-drop-shape {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    background: linear-gradient(
        180deg,
        rgba(0, 74, 153, 0.08) 0%,
        rgba(0, 74, 153, 0.15) 40%,
        rgba(26, 117, 255, 0.2) 100%
    );
    box-shadow:
        inset -2px -2px 6px rgba(255,255,255,0.4),
        inset 2px 2px 6px rgba(0,74,153,0.1),
        0 4px 12px rgba(0,74,153,0.08);
    animation: dropFall var(--drop-duration, 4s) var(--drop-delay, 0s) ease-in infinite;
    transform-origin: center top;
}
/* Shine highlight */
.water-drop-shape::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 25%;
    width: 30%;
    height: 25%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.7), transparent);
}
/* Tail stretch */
.water-drop-shape::after {
    content: '';
    position: absolute;
    top: -30%;
    left: 30%;
    width: 40%;
    height: 35%;
    border-radius: 50% 50% 50% 50% / 80% 80% 20% 20%;
    background: linear-gradient(
        180deg,
        rgba(0, 74, 153, 0.03) 0%,
        rgba(0, 74, 153, 0.1) 100%
    );
}

/* Splash ring on landing */
.water-drop-splash {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-radius: 50%;
    border: 2px solid rgba(0, 74, 153, 0.15);
    opacity: 0;
    pointer-events: none;
    animation: splashRing var(--drop-duration, 4s) var(--drop-delay, 0s) ease-out infinite;
}

@keyframes dropFall {
    0% {
        transform: translateY(-20px) scaleX(0.9) scaleY(1);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    40% {
        transform: translateY(calc(var(--drop-travel, 80vh))) scaleX(0.85) scaleY(1.15);
        opacity: 1;
    }
    50% {
        transform: translateY(calc(var(--drop-travel, 80vh) + 10px)) scaleX(1.5) scaleY(0.3);
        opacity: 0.5;
    }
    55% {
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}

@keyframes splashRing {
    0%, 40% {
        width: 0; height: 0;
        opacity: 0;
    }
    45% {
        opacity: 0.6;
    }
    65% {
        width: 60px; height: 20px;
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}

/* Water ripple at bottom of hero */
.water-ripple {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 74, 153, 0.08);
    pointer-events: none;
    animation: waterRippleExpand var(--ripple-duration, 4s) var(--ripple-delay, 0s) ease-out infinite;
    z-index: 1;
}
@keyframes waterRippleExpand {
    0% {
        width: 0; height: 0;
        opacity: 0.5;
        transform: translate(-50%, -50%);
    }
    100% {
        width: 200px; height: 60px;
        opacity: 0;
        transform: translate(-50%, -50%);
    }
}

/* Old droplet fallback hidden */
.water-droplet { display: none; }

/* ===== RIPPLE BUTTON EFFECT ===== */
.ripple-btn { position: relative; overflow: hidden; }
.ripple-btn .ripple-effect {
    position: absolute; border-radius: 50%;
    background: rgba(255,255,255,0.35);
    transform: scale(0); animation: ripple 0.6s ease-out;
    pointer-events: none;
}
@keyframes ripple {
    to { transform: scale(4); opacity: 0; }
}

/* ===== SCROLL REVEAL DIRECTIONS ===== */
.scroll-reveal {
    opacity: 0; transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.scroll-reveal.reveal-up { transform: translateY(50px); }
.scroll-reveal.reveal-left { transform: translateX(-60px); }
.scroll-reveal.reveal-right { transform: translateX(60px); }
.scroll-reveal.reveal-scale { transform: scale(0.85); }
.scroll-reveal.revealed {
    opacity: 1; transform: translateY(0) translateX(0) scale(1);
}
.scroll-reveal.animation-delay-100 { transition-delay: 0.1s; }
.scroll-reveal.animation-delay-200 { transition-delay: 0.2s; }
.scroll-reveal.animation-delay-300 { transition-delay: 0.3s; }
.scroll-reveal.animation-delay-400 { transition-delay: 0.4s; }

/* ===== PRODUCT CARD 3D TILT ===== */
.product-card {
    transform: translateY(0) perspective(1000px);
    transition: transform 0.5s ease, box-shadow 0.5s ease, border-color 0.5s ease;
    will-change: transform;
}
.product-card:hover { transform: translateY(-10px) perspective(1000px); }
.product-card .card-shine {
    position: absolute; inset: 0; border-radius: 1.5rem;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(0,74,153,0.06), transparent 40%);
    opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.product-card:hover .card-shine { opacity: 1; }

/* ===== COUNTER ANIMATION ===== */
.counter-value {
    display: inline-block;
    transition: all 0.3s ease;
}

/* ===== QUALITY ICON HOVER ===== */
.quality-icon-box {
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.quality-icon-box svg {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), color 0.3s;
}
.group:hover .quality-icon-box svg { transform: rotateY(180deg); }

/* ===== SECTION DIVIDER WAVE ===== */
.wave-divider {
    position: absolute; bottom: -1px; left: 0; width: 100%;
    overflow: hidden; line-height: 0;
}
.wave-divider svg {
    display: block; width: calc(100% + 1.3px); height: 60px;
}

/* ===== FAQ ACCORDION ===== */
.faq-item {
    transition: all 0.3s ease;
}
.faq-item:hover {
    border-color: #80b3ff;
}
.faq-item.active {
    border-color: #3B82F6;
    box-shadow: 0 4px 20px rgba(59,130,246,0.1);
}
.faq-item.active .faq-icon {
    transform: rotate(45deg);
    background: #3B82F6;
}
.faq-item.active .faq-icon svg {
    color: white;
}
.faq-content {
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== TESTIMONIALS CAROUSEL ===== */
.testimonials-container {
    position: relative;
}
.testimonials-track {
    will-change: transform;
}
.testimonial-dot {
    cursor: pointer; border: none; outline: none;
    transition: all 0.3s ease;
}
.testimonial-dot.active {
    background: #3B82F6;
    transform: scale(1.3);
}

/* ===== BACK TO TOP BUTTON ===== */
#back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}
#back-to-top.visible {
    opacity: 1; transform: translateY(0);
    pointer-events: all;
}

/* ===== WHATSAPP FLOATING BUTTON ===== */
#whatsapp-float { animation: pulseGlow 2s infinite; }
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0.4); }
    50% { box-shadow: 0 0 0 14px rgba(37,211,102,0); }
}
#whatsapp-float span {
    transform: translateX(10px);
    transition: opacity 0.3s, transform 0.3s;
}
#whatsapp-float:hover span { transform: translateX(0); }

/* ===== ANIMATE FADE UP (Hero elements) ===== */
.animate-fade-up { opacity: 0; transform: translateY(30px); }
.animate-fade-up.animated { animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

/* ===== SCROLL DOT ===== */
.animate-scroll-dot { animation: scrollDot 1.5s ease-in-out infinite; }
@keyframes scrollDot {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(8px); }
}

/* ===== PARALLAX LAYER ===== */
.parallax-layer { transition: transform 0.1s linear; will-change: transform; }

/* ===== IMAGE REVEAL ===== */
.img-reveal { position: relative; overflow: hidden; }
.img-reveal::before {
    content: ''; position: absolute; inset: 0; z-index: 2;
    background: #004A99; transform: scaleX(1); transform-origin: right;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}
.img-reveal.revealed::before { transform: scaleX(0); }

/* ===== SMOOTH TRANSITIONS ===== */
body, nav, section, footer, article, div, a, p, h1, h2, h3, h4, span, button {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    #home { min-height: auto; padding-top: 6rem; padding-bottom: 3rem; }
    .hero-float { animation-duration: 7s; }
    .water-droplet { display: none; }
}
@media (max-width: 640px) {
    h1 { font-size: 2.5rem !important; }
    #whatsapp-float span { display: none; }
    #back-to-top { bottom: 24px; left: 16px; width: 40px; height: 40px; }
}

/* ===== SELECTION ===== */
::selection { background: rgba(59,130,246,0.15); color: #1E293B; }

/* ===== 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; }
