/* ═══════════════════════════════════════════════════════════════════════════════
   FITTRACK MODERN SAAS DESIGN SYSTEM
   Premium animations, micro-interactions, and polished UI effects
   ═══════════════════════════════════════════════════════════════════════════════ */

:root {
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --spacing-3xl: 64px;
    --spacing-4xl: 80px;
    --spacing-5xl: 120px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --shadow-xl: 0 10px 30px rgba(0,0,0,0.08);
    --shadow-2xl: 0 20px 40px rgba(0,0,0,0.12);
    --shadow-premium: 0 20px 60px rgba(0,0,0,0.1);
    
    /* Transitions */
    --transition-fast: 200ms cubic-bezier(0.4,0,0.2,1);
    --transition-base: 300ms cubic-bezier(0.4,0,0.2,1);
    --transition-slow: 500ms cubic-bezier(0.4,0,0.2,1);
    
    /* Colors */
    --primary: #16a34a;
    --secondary: #22c55e;
    --accent: #f97316;
    --surface: #f8fafc;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #ffffff;
    color: #1f2937;
}

/* ═══════════════════ SCROLL ANIMATIONS ═══════════════════ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse-subtle {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* ═══════════════════ HERO SECTION ANIMATIONS ═══════════════════ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hero Slide Opacity Transition */
.hero-slide {
    opacity: 0 !important;
    transition: opacity 1000ms ease-in-out;
}

.hero-slide.opacity-100 {
    opacity: 100 !important;
}

.hero-slide.opacity-0 {
    opacity: 0 !important;
}

/* Slider Dots Navigation */
.slider-dot {
    cursor: pointer;
    transition: all 300ms ease-in-out;
    opacity: 0.7;
}

.slider-dot:hover {
    transform: scale(1.3);
    opacity: 1;
}

.slider-dot.active {
    transform: scale(1.5);
    opacity: 1;
}

/* ═══════════════════ SCROLL TRIGGER ANIMATIONS ═══════════════════ */
.scroll-fade-in {
    animation: fadeInUp var(--transition-slow) ease-out forwards;
    opacity: 0;
}

.scroll-fade-in.visible {
    animation: fadeInUp var(--transition-slow) ease-out;
    opacity: 1;
}

/* ═══════════════════ SECTION SPACING & STRUCTURE ═══════════════════ */
section {
    scroll-margin-top: 80px;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* ═══════════════════ FEATURE CARDS ENHANCEMENT ═══════════════════ */
.feature-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 32px;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(22,163,74,0.05), transparent);
    border-radius: 50%;
    transition: all var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: #d1d5db;
}

.feature-card:hover::before {
    right: -30%;
    top: -30%;
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: all var(--transition-base);
    position: relative;
    z-index: 1;
}

.feature-card:hover .feature-icon {
    transform: scale(1.15) rotate(5deg);
}

.feature-icon.blue { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.feature-icon.orange { background: rgba(249, 115, 22, 0.1); color: #f97316; }
.feature-icon.green { background: rgba(22, 163, 74, 0.1); color: #16a34a; }
.feature-icon.purple { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1f2937;
}

.feature-card p {
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.6;
    flex: 1;
}

/* ═══════════════════ PROGRAM CARDS ENHANCEMENT ═══════════════════ */
.program-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.program-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    border-color: #d1d5db;
}

.program-card-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
    position: relative;
}

.program-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.program-card:hover .program-card-image img {
    transform: scale(1.08);
}

.program-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.program-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1f2937;
}

.program-card-desc {
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.5;
    flex: 1;
    margin-bottom: 16px;
}

.program-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: gap var(--transition-base);
    text-decoration: none;
    color: var(--primary);
}

.program-card:hover .program-card-link {
    gap: 12px;
}

/* ═══════════════════ BMI CALCULATOR ENHANCEMENT ═══════════════════ */
.bmi-input {
    transition: all var(--transition-fast);
}

.bmi-input:focus {
    box-shadow: 0 0 0 4px rgba(22,163,74,0.1);
    border-color: var(--primary);
}

.bmi-button {
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.bmi-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(22,163,74,0.25);
}

.bmi-button:active {
    transform: translateY(-1px);
}

/* BMI Circle Progress Animation */
@keyframes circleProgress {
    from {
        stroke-dashoffset: 314;
    }
    to {
        stroke-dashoffset: 0;
    }
}

#bmiCircle {
    stroke-dasharray: 314;
    stroke-dashoffset: 314;
    transition: stroke var(--transition-base), stroke-dashoffset 1s ease-out;
}

/* ═══════════════════ TESTIMONIAL CARDS ENHANCEMENT ═══════════════════ */
.testimonial-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 32px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: #d1d5db;
}

.testimonial-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(22,163,74,0.2);
    transition: transform var(--transition-base);
}

.testimonial-card:hover .testimonial-avatar {
    transform: scale(1.1);
}

.testimonial-badge {
    display: inline-block;
    background: rgba(22,163,74,0.1);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: auto;
}

.testimonial-stars {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.testimonial-star {
    width: 18px;
    height: 18px;
    color: #fbbf24;
    transition: transform var(--transition-fast);
}

.testimonial-card:hover .testimonial-star {
    transform: scale(1.15);
}

/* ═══════════════════ CTA SECTION ENHANCEMENT ═══════════════════ */
.cta-premium {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    padding: 60px 40px;
    box-shadow: var(--shadow-premium);
}

.cta-premium::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.1), transparent);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.cta-premium::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -30%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255,255,255,0.08), transparent);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-button {
    transition: all var(--transition-base);
    position: relative;
}

.cta-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

/* ═══════════════════ BUTTON ENHANCEMENTS ═══════════════════ */
.btn-modern {
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #15803d;
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: rgba(22,163,74,0.05);
}

/* ═══════════════════ INPUT ENHANCEMENTS ═══════════════════ */
.input-modern {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: all var(--transition-fast);
    background: #ffffff;
}

.input-modern:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22,163,74,0.1);
}

.input-modern::placeholder {
    color: #9ca3af;
}

/* ═══════════════════ FOOTER ENHANCEMENTS ═══════════════════ */
.footer-link {
    color: rgba(255,255,255,0.5);
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.footer-link:hover {
    color: var(--secondary);
    transform: translateX(4px);
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.08);
    transition: all var(--transition-base);
    cursor: pointer;
}

.social-icon:hover {
    background: var(--primary);
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 20px rgba(22,163,74,0.3);
}

/* ═══════════════════ NAVBAR ENHANCEMENT ═══════════════════ */
.navbar-blur {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
}

/* ═══════════════════ LOADER & SHIMMER ═══════════════════ */
.shimmer-loading {
    background: linear-gradient(
        90deg,
        #f3f4f6 25%,
        #e5e7eb 50%,
        #f3f4f6 75%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* ═══════════════════ RESPONSIVE DESIGN ═══════════════════ */
@media (max-width: 768px) {
    :root {
        --spacing-xl: 24px;
        --spacing-2xl: 32px;
    }

    .feature-card,
    .program-card,
    .testimonial-card {
        padding: 20px;
    }

    .cta-premium {
        padding: 40px 24px;
    }
}

/* ═══════════════════ ACCESSIBILITY ═══════════════════ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media (prefers-contrast: more) {
    .feature-card,
    .program-card,
    .testimonial-card {
        border-width: 2px;
    }
}

/* ═══════════════════ PRINT STYLES ═══════════════════ */
@media print {
    .cta-premium::before,
    .cta-premium::after {
        display: none;
    }
}
