/* ============================================
   PREMIUM UI ENHANCEMENTS
   Modern animations, effects, and interactions
   ============================================ */

/* Smooth scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced glassmorphism effects */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Floating animation for badges and icons */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.floating {
    animation: float 3s ease-in-out infinite;
}

/* Gradient text animation */
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animated-gradient {
    background: linear-gradient(270deg, #10B981, #059669, #34D399);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
}

/* Enhanced button hover effects */
.btn-enhanced {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-enhanced::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-enhanced:hover::before {
    width: 300px;
    height: 300px;
}

/* Card hover effects with 3D transform */
.card-3d {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.card-3d:hover {
    transform: translateY(-10px) rotateX(2deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Shimmer loading effect */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Pulse animation for attention-grabbing elements */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(16, 185, 129, 0);
    }
}

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

/* Smooth parallax scrolling effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Enhanced text shadows for better readability */
.text-shadow-soft {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.text-shadow-strong {
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Gradient borders */
.gradient-border {
    position: relative;
    background: white;
    border-radius: 12px;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(135deg, #10B981, #059669);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
}

/* Smooth image loading */
img {
    transition: opacity 0.3s ease-in-out;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Enhanced section spacing */
section {
    padding: 80px 0;
}

@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }
}

/* Improved container max-width */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Enhanced grid layouts */
.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.grid-auto-fill {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* Smooth scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #10B981, #059669);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

/* Focus states for accessibility */
*:focus-visible {
    outline: 2px solid #10B981;
    outline-offset: 2px;
}

/* Improved link hover effects */
a {
    position: relative;
    transition: color 0.3s ease;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #10B981, #059669);
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}

/* Enhanced form inputs */
input, textarea, select {
    transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

/* Loading spinner */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner {
    border: 3px solid rgba(16, 185, 129, 0.1);
    border-top-color: #10B981;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
}

/* Tooltip styles */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 8px 12px;
    background: rgba(17, 24, 39, 0.95);
    color: white;
    font-size: 0.875rem;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

[data-tooltip]:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

/* Badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* Improved image aspect ratios */
.aspect-ratio-16-9 {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.aspect-ratio-4-3 {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.aspect-ratio-1-1 {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* Enhanced transitions for all interactive elements */
button, a, input, textarea, select, .card, .feature-card-new, .program-card-new {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth color transitions */
* {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

/* ============================================
   MOBILE OPTIMIZATIONS - REDUCE SCROLLING
   ============================================ */
@media (max-width: 768px) {
    /* Reduce heading sizes significantly */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.1rem; }
    
    /* Compact hero section - less scrolling */
    .hero-section-new {
        min-height: 75vh !important;
        padding: 80px 16px 30px !important;
    }
    
    .hero-title-small {
        font-size: 0.85rem !important;
        margin-bottom: 8px !important;
    }
    
    .hero-title-main {
        font-size: 2rem !important;
        letter-spacing: -1px !important;
    }
    
    .hero-description {
        font-size: 1rem !important;
        margin-bottom: 20px !important;
        line-height: 1.5 !important;
    }
    
    /* Compact hero stats */
    .hero-stats {
        gap: 16px !important;
        margin-bottom: 24px !important;
    }
    
    .stat-number {
        font-size: 1.75rem !important;
    }
    
    .stat-label {
        font-size: 0.75rem !important;
    }
    
    /* Compact badges */
    .hero-badge {
        padding: 6px 14px !important;
        font-size: 0.75rem !important;
        margin-bottom: 16px !important;
    }
    
    /* Smaller icons throughout */
    .fas, .fab, .far {
        font-size: 0.9em !important;
    }
    
    .feature-icon, .program-icon, .proof-icon {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.5rem !important;
    }
    
    /* Compact CTA buttons */
    .hero-cta-group {
        flex-direction: column;
        width: 100%;
        gap: 12px !important;
        margin-bottom: 20px !important;
    }
    
    .btn-primary-new, .btn-secondary-new {
        width: 100%;
        justify-content: center;
        padding: 14px 24px !important;
        font-size: 1rem !important;
    }
    
    /* Hide or minimize less important elements */
    .hero-trust {
        display: none !important;
    }
    
    .scroll-indicator {
        display: none !important;
    }
    
    /* Compact sections */
    section {
        padding: 50px 0 !important;
    }
    
    .section-header {
        margin-bottom: 30px !important;
    }
    
    .section-tag {
        font-size: 0.75rem !important;
        padding: 6px 12px !important;
        margin-bottom: 12px !important;
    }
    
    .section-title-new {
        font-size: 1.5rem !important;
        margin-bottom: 12px !important;
    }
    
    .section-desc {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
    }
    
    /* Compact social proof */
    .proof-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }
    
    .proof-number {
        font-size: 1.5rem !important;
    }
    
    .proof-label {
        font-size: 0.75rem !important;
    }
    
    /* Compact cards */
    .feature-card-new, .program-card-new {
        padding: 20px !important;
    }
    
    .feature-card-new h3, .program-card-new h3 {
        font-size: 1.1rem !important;
        margin-bottom: 8px !important;
    }
    
    .feature-card-new p, .program-card-new p {
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
    }
    
    /* Compact program features list */
    .program-features {
        font-size: 0.85rem !important;
    }
    
    .program-features li {
        padding: 6px 0 !important;
    }
}

/* Sticky CTA button on mobile for better conversions */
@media (max-width: 768px) {
    .mobile-sticky-cta {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 12px 16px;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
        z-index: 999;
        display: flex;
        gap: 8px;
        animation: slideUp 0.3s ease-out;
    }
    
    .mobile-sticky-cta .btn-primary-new {
        flex: 1;
        padding: 12px 20px !important;
        font-size: 0.95rem !important;
    }
    
    @keyframes slideUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    
    /* Add padding to body to prevent content being hidden by sticky CTA */
    body {
        padding-bottom: 70px;
    }
}

/* Print styles */
@media print {
    .hero-section-new,
    .urgency-banner-section,
    .final-cta-section {
        display: none;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
