/* ==================== CSS RESET & BASE ==================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* ==================== CUSTOM SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #6366f1, #4f46e5);
    border-radius: 10px;
    border: 2px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #4f46e5, #4338ca);
}

/* Firefox scrollbar */
html {
    scrollbar-width: thin;
    scrollbar-color: #6366f1 #f1f5f9;
}

/* ==================== SECTION PADDING ==================== */
.section-padding {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

@media (min-width: 768px) {
    .section-padding {
        padding-top: 7rem;
        padding-bottom: 7rem;
    }
}

@media (min-width: 1024px) {
    .section-padding {
        padding-top: 8rem;
        padding-bottom: 8rem;
    }
}

/* ==================== BTN PRIMARY GRADIENT ==================== */
.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 50%, #4338ca 100%);
    background-size: 200% 200%;
    animation: btnShimmer 3s ease infinite;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 50%, #3730a3 100%);
    transform: translateY(-2px);
    box-shadow: 0 20px 40px -12px rgba(79, 70, 229, 0.45);
}

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

/* ==================== GRADIENT HERO OVERLAY ==================== */
.gradient-hero {
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.88) 0%,
        rgba(49, 46, 129, 0.82) 35%,
        rgba(67, 56, 202, 0.78) 65%,
        rgba(15, 23, 42, 0.90) 100%
    );
}

/* ==================== CARD HOVER EFFECT ==================== */
.card-hover {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(79, 70, 229, 0.25), 0 0 0 1px rgba(99, 102, 241, 0.1);
}

/* ==================== TESTIMONIAL CARD ACCENT BORDER ==================== */
.testimonial-card {
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
}

.testimonial-card > div {
    transition: border-color 0.3s ease;
}

.testimonial-card:hover > div {
    border-left-color: #4338ca;
}

/* ==================== FAQ ACCORDION SMOOTH MAX-HEIGHT ==================== */
.faq-item .faq-accordion {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-accordion {
    max-height: 500px;
}

.faq-item .faq-toggle {
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.faq-item .faq-toggle:hover {
    background-color: #f8fafc;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    background-color: #4f46e5;
    color: #ffffff;
}

/* ==================== STAT COUNTER ANIMATION ==================== */
.stat-counter {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* ==================== MOBILE MENU SLIDE-IN ==================== */
#mobile-menu {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.open {
    transform: translateX(0);
}

#mobile-menu .mobile-nav-link {
    display: block;
    transition: all 0.2s ease;
}

#mobile-menu .mobile-nav-link:hover {
    transform: translateX(4px);
    opacity: 0.9;
}

/* Hamburger icon transition */
#hamburger-btn {
    transition: transform 0.3s ease;
}

#hamburger-btn.active {
    transform: rotate(90deg);
}

/* ==================== FADE-IN-UP SCROLL REVEAL ANIMATION ==================== */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .fade-in-up {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ==================== NAVBAR SCROLL STATES ==================== */
#navbar.nav-scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.06);
}

#navbar.nav-scrolled .nav-link {
    color: rgba(75, 85, 99, 0.9);
}

#navbar.nav-scrolled .nav-link:hover {
    color: #4f46e5;
}

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

#navbar.nav-scrolled #hamburger-btn {
    color: #1f2937;
}

#navbar.nav-scrolled .bg-white {
    background-color: #4f46e5;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* ==================== TESTIMONIAL DOTS ACTIVE ==================== */
#testimonial-dots span.active {
    background-color: #4f46e5;
    width: 2rem;
    border-radius: 9999px;
}

#testimonial-dots span {
    transition: all 0.3s ease;
}

/* ==================== SELECTION STYLING ==================== */
::selection {
    background-color: rgba(79, 70, 229, 0.2);
    color: #1f2937;
}

/* ==================== FOCUS VISIBLE ==================== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ==================== RESPONSIVE ADJUSTMENTS ==================== */
@media (max-width: 640px) {
    .section-padding {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    .card-hover:hover {
        transform: translateY(-4px);
    }
}

/* ==================== FIX NAVBAR CTA TEXT COLOR ON SCROLL ==================== */
#navbar.nav-scrolled a[href="#cta"] {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

#navbar.nav-scrolled a[href="#cta"]:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
}

/* ==================== SMOOTH IMAGE LOADING ==================== */
img {
    max-width: 100%;
    height: auto;
}

/* ==================== PRINT STYLES ==================== */
@media print {
    #navbar,
    #mobile-menu,
    .gradient-hero,
    footer {
        display: none;
    }

    body {
        color: #000;
    }

    .section-padding {
        padding: 1rem 0;
    }
}