/* ============================================================
   SSS Academies — Phase 4 Design Enhancement
   Richer gradients, animations, video sections, visual depth
   ============================================================ */

/* Enhanced Color Variables */
:root {
    --gradient-hero-rich: linear-gradient(135deg, #0f2439 0%, #1e3a5f 30%, #2c5282 60%, #1a4971 100%);
    --gradient-section-dark: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    --gradient-section-blue: linear-gradient(135deg, #1e3a5f 0%, #2c5282 50%, #1e3a5f 100%);
    --gradient-card-hover: linear-gradient(135deg, rgba(247,148,29,0.08), rgba(247,148,29,0.02));
    --glow-orange: 0 0 30px rgba(247,148,29,0.3);
    --glow-blue: 0 0 30px rgba(44,82,130,0.3);
    --glow-green: 0 0 30px rgba(140,198,63,0.3);
    --shadow-deep: 0 20px 60px rgba(0,0,0,0.15);
    --shadow-card: 0 8px 32px rgba(0,0,0,0.08);
    --shadow-card-hover: 0 16px 48px rgba(0,0,0,0.15);
}

/* ============================================================
   SCROLL-TRIGGERED FADE-IN ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(247,148,29,0.2); }
    50% { box-shadow: 0 0 40px rgba(247,148,29,0.4); }
}

/* Scroll-triggered animation classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.from-left {
    transform: translateX(-30px);
}

.animate-on-scroll.from-left.visible {
    transform: translateX(0);
}

.animate-on-scroll.from-right {
    transform: translateX(30px);
}

.animate-on-scroll.from-right.visible {
    transform: translateX(0);
}

.animate-on-scroll.scale-up {
    transform: scale(0.9);
}

.animate-on-scroll.scale-up.visible {
    transform: scale(1);
}

/* Staggered animation delays for grid items */
.animate-on-scroll:nth-child(1) { transition-delay: 0.05s; }
.animate-on-scroll:nth-child(2) { transition-delay: 0.15s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.25s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.35s; }
.animate-on-scroll:nth-child(5) { transition-delay: 0.45s; }
.animate-on-scroll:nth-child(6) { transition-delay: 0.55s; }

/* ============================================================
   ENHANCED HERO SECTIONS
   ============================================================ */
.hero {
    background: var(--gradient-hero-rich) !important;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, rgba(255,255,255,1), rgba(255,255,255,0));
    pointer-events: none;
    z-index: 2;
}

.page-hero {
    background: var(--gradient-hero-rich) !important;
}

.page-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, rgba(255,255,255,1), rgba(255,255,255,0));
    pointer-events: none;
    z-index: 2;
}

/* Animated gradient shimmer on hero text */
.hero h1,
.page-hero h1 {
    background: linear-gradient(90deg, #ffffff 0%, #f7941d 50%, #ffffff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 6s linear infinite;
}

/* ============================================================
   ENHANCED CARDS & SECTIONS
   ============================================================ */

/* Richer card styling */
.feature-card,
.program-card,
.info-card,
.stat-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease;
    border-radius: 16px;
}

.feature-card:hover,
.program-card:hover,
.info-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-card-hover);
}

/* Section dividers with gradient lines */
.section + .section::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-orange), var(--primary-blue), transparent);
    margin: 0 auto;
    max-width: 200px;
}

/* Dark sections get richer backgrounds */
.section-dark,
.section-dark-alt {
    background: var(--gradient-section-dark) !important;
}

/* ============================================================
   VIDEO SECTION STYLING
   ============================================================ */
.sss-video-section {
    position: relative;
    max-width: 900px;
    margin: 40px auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    border: 2px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.sss-video-section:hover {
    border-color: var(--primary-orange);
    box-shadow: 0 12px 48px rgba(247,148,29,0.2);
}

.sss-video-section video {
    width: 100%;
    display: block;
    border-radius: 14px;
}

.sss-video-label {
    text-align: center;
    margin-top: 15px;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.6);
    font-style: italic;
}

/* ============================================================
   ENHANCED BUTTONS
   ============================================================ */
.btn-primary,
.btn.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before,
.btn.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before,
.btn.btn-primary:hover::before {
    left: 100%;
}

/* ============================================================
   ENHANCED FOOTER
   ============================================================ */
.footer {
    background: linear-gradient(135deg, #0a1628 0%, #1e3a5f 50%, #0a1628 100%) !important;
}

.footer h4 {
    position: relative;
    padding-bottom: 10px;
}

.footer h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-orange), transparent);
}

/* ============================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================ */
@media (max-width: 768px) {
    .sss-video-section {
        margin: 20px 15px;
        border-radius: 12px;
    }
    
    .hero h1,
    .page-hero h1 {
        font-size: 2rem;
    }
    
    .hero::after,
    .page-hero::after {
        height: 60px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .hero h1,
    .page-hero h1 {
        animation: none;
        -webkit-text-fill-color: white;
    }
}
