/* ============================================================
   Aim Diet — Website Enhancement Stylesheet
   Performance · Modern Aesthetics · Scroll Animations
   ============================================================ */

/* --- CSS Custom Properties --------------------------------- */
:root {
    --clr-primary:       #5c6bc0;
    --clr-primary-dark:  #3949ab;
    --clr-accent:        #26a69a;
    --clr-hero-from:     #1a1a2e;
    --clr-hero-to:       #16213e;
    --clr-gradient-1:    linear-gradient(135deg, #5c6bc0 0%, #26a69a 100%);
    --clr-gradient-2:    linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
    --clr-gradient-3:    linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --shadow-sm:         0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-md:         0 10px 40px rgba(0, 0, 0, 0.10);
    --shadow-lg:         0 20px 60px rgba(0, 0, 0, 0.14);
    --shadow-hover:      0 28px 70px rgba(92, 107, 192, 0.22);
    --radius:            1rem;
    --radius-lg:         1.5rem;
    --ease-smooth:       cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition:        all 0.4s var(--ease-smooth);
}

/* --- Global ------------------------------------------------- */
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    [data-animate] { opacity: 1 !important; transform: none !important; }
}

/* --- Navbar: sticky glass effect on scroll ----------------- */
#main-navbar {
    transition: background-color 0.35s var(--ease-smooth),
                box-shadow       0.35s var(--ease-smooth),
                padding          0.35s var(--ease-smooth);
}

/* ── Compact sticky navbar on scroll ──────────────────────── */
#main-navbar.navbar-scrolled {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background-color: rgba(255, 255, 255, 0.96) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
}

/* Shrink logo when compact */
#main-navbar.navbar-scrolled .navbar-brand img {
    width: 180px !important;
    transition: width 0.35s var(--ease-smooth);
}

/* Tighten nav links when compact */
#main-navbar.navbar-scrolled .navbar-nav .nav-link {
    font-size: 0.88rem;
    padding-top: 0.4rem !important;
    padding-bottom: 0.4rem !important;
}

/* Shrink login button when compact */
#main-navbar.navbar-scrolled .btn {
    padding: 0.3rem 1rem !important;
    font-size: 0.82rem !important;
}

/* Smooth logo transition before scroll too */
#main-navbar .navbar-brand img {
    transition: width 0.35s var(--ease-smooth);
}

/* --- Navbar offset so content doesn't jump under fixed bar - */
body.has-scrolled-nav { padding-top: 72px; }

/* --- Hero Section ------------------------------------------ */
.hero-section > .wrapper.bg-gray {
    background: linear-gradient(160deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%) !important;
    position: relative;
    overflow: hidden;
}

/* Animated gradient mesh orbs */
.hero-section > .wrapper.bg-gray::before,
.hero-section > .wrapper.bg-gray::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    will-change: transform, opacity;
}

.hero-section > .wrapper.bg-gray::before {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(92, 107, 192, 0.35) 0%, transparent 70%);
    top: -200px;
    right: -100px;
    animation: orb-float 12s ease-in-out infinite alternate;
}

.hero-section > .wrapper.bg-gray::after {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(38, 166, 154, 0.25) 0%, transparent 70%);
    bottom: -150px;
    left: -80px;
    animation: orb-float 16s ease-in-out infinite alternate-reverse;
}

@keyframes orb-float {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(40px, 30px) scale(1.12); }
}

/* Hero text colours */
.hero-section .display-1 {
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-section .lead {
    color: rgba(255, 255, 255, 0.80);
}

/* CTA button — shine sweep */
.hero-section .btn-outline-grape,
.btn-cta {
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.70) !important;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(8px);
    transition: var(--transition) !important;
}

.hero-section .btn-outline-grape::before,
.btn-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.55s ease;
}

.hero-section .btn-outline-grape:hover::before,
.btn-cta:hover::before { left: 150%; }

.hero-section .btn-outline-grape:hover,
.btn-cta:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(92, 107, 192, 0.45) !important;
}

/* Hero floating badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    backdrop-filter: blur(8px);
    color: rgba(255,255,255,0.90);
    padding: 0.4rem 1.1rem;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 1.5rem;
}

.hero-badge .dot {
    width: 7px;
    height: 7px;
    background: #38ef7d;
    border-radius: 50%;
}

/* --- Stats Strip ------------------------------------------- */
.stats-section > .wrapper {
    background: var(--clr-gradient-1);
    position: relative;
    overflow: hidden;
}

.stats-section > .wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 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='%23ffffff' fill-opacity='0.04'%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");
}

.stat-item { color: #fff; position: relative; z-index: 1; }

.stat-number {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-suffix {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    vertical-align: super;
    line-height: 1;
}

.stat-label {
    font-size: 0.92rem;
    font-weight: 500;
    opacity: 0.88;
    margin-top: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stat-divider {
    width: 1px;
    background: rgba(255,255,255,0.25);
    align-self: stretch;
    margin: 0.5rem 0;
}

/* --- Feature Cards ----------------------------------------- */
.feature-card {
    background: #fff;
    border-radius: var(--radius) !important;
    border: 1px solid transparent !important;
    box-shadow: var(--shadow-sm) !important;
    transition: var(--transition) !important;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    background: var(--clr-gradient-1);
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 0;
}

.feature-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: var(--shadow-hover) !important;
    border-color: rgba(92, 107, 192, 0.2) !important;
}

.feature-card:hover::before { opacity: 0.04; }
.feature-card .card-body { position: relative; z-index: 1; }

.feature-card h4 {
    background: var(--clr-gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700 !important;
}

/* Feature icon wrapper */
.feature-icon-wrap {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(92, 107, 192, 0.10);
    margin-right: 1rem;
    transition: var(--transition);
}

.feature-icon-wrap:hover { transform: rotate(-8deg) scale(1.1); }

/* --- Section heading accent line --------------------------- */
.section-heading-accent {
    display: inline-block;
    position: relative;
    padding-bottom: 0.6rem;
}

.section-heading-accent::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    border-radius: 2px;
    background: var(--clr-gradient-1);
    transition: width 0.5s var(--ease-smooth);
}

.text-center .section-heading-accent::after {
    left: 50%;
    transform: translateX(-50%);
}

*:hover > .section-heading-accent::after,
.section-heading-accent.is-visible::after { width: 100px; }

/* --- Why Choose Us list ------------------------------------ */
.progress-list li {
    transition: transform 0.3s ease;
}
.progress-list li:hover { transform: translateX(6px); }

/* --- Testimonial card modernization ----------------------- */
.swiper .blockquote {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.swiper .blockquote:hover { box-shadow: var(--shadow-lg); }

/* --- CTA / Contact section --------------------------------- */
.contact-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(92, 107, 192, 0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}

.contact-icon-box:hover {
    background: var(--clr-gradient-1);
    transform: scale(1.08) rotate(-5deg);
}

.contact-icon-box:hover .icon { color: #fff !important; }

/* --- Image hover lift -------------------------------------- */
.img-hover-lift {
    transition: transform 0.5s var(--ease-smooth),
                box-shadow 0.5s var(--ease-smooth) !important;
    will-change: transform;
}

.img-hover-lift:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--shadow-lg) !important;
}

/* --- Footer enhancements ----------------------------------- */
footer .widget a {
    transition: color 0.25s ease, padding-left 0.25s ease;
}

footer .widget a:hover {
    padding-left: 6px;
    color: var(--clr-accent) !important;
}

footer .nav.social a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    margin-right: 0.4rem;
}

footer .nav.social a:hover {
    background: var(--clr-gradient-1);
    transform: translateY(-4px);
}

/* --- Scroll-Reveal Animation System ----------------------- */
[data-animate] {
    opacity: 0;
    will-change: opacity, transform;
    transition: opacity 0.75s var(--ease-smooth),
                transform 0.75s var(--ease-smooth);
}

[data-animate="fade-up"]    { transform: translateY(40px); }
[data-animate="fade-down"]  { transform: translateY(-30px); }
[data-animate="fade-right"] { transform: translateX(-40px); }
[data-animate="fade-left"]  { transform: translateX(40px); }
[data-animate="zoom-in"]    { transform: scale(0.88); }
[data-animate="zoom-out"]   { transform: scale(1.08); }

[data-animate].is-visible {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* Staggered children animation */
[data-animate-group] > * {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.6s var(--ease-smooth),
                transform 0.6s var(--ease-smooth);
}

[data-animate-group].is-visible > *:nth-child(1) { transition-delay: 0ms;   }
[data-animate-group].is-visible > *:nth-child(2) { transition-delay: 80ms;  }
[data-animate-group].is-visible > *:nth-child(3) { transition-delay: 160ms; }
[data-animate-group].is-visible > *:nth-child(4) { transition-delay: 240ms; }
[data-animate-group].is-visible > *:nth-child(5) { transition-delay: 320ms; }
[data-animate-group].is-visible > *:nth-child(6) { transition-delay: 400ms; }
[data-animate-group].is-visible > *:nth-child(7) { transition-delay: 480ms; }
[data-animate-group].is-visible > *:nth-child(8) { transition-delay: 560ms; }
[data-animate-group].is-visible > *:nth-child(9) { transition-delay: 640ms; }

[data-animate-group].is-visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* --- Utility: floating WhatsApp button pulse -------------- */
a[title="WhatsApp us"] svg {
    filter: drop-shadow(0 4px 12px rgba(37, 211, 102, 0.45));
    transition: filter 0.3s ease, transform 0.3s ease;
}

a[title="WhatsApp us"]:hover svg {
    transform: scale(1.12);
    filter: drop-shadow(0 8px 20px rgba(37, 211, 102, 0.65));
}

/* --- Responsive tweaks ------------------------------------- */
@media (max-width: 991px) {
    .hero-section > .wrapper.bg-gray::before,
    .hero-section > .wrapper.bg-gray::after { display: none; }

    .stat-divider { display: none; }
}

@media (max-width: 575px) {
    .stat-number { font-size: 2rem; }
}
