/* ============================================
   ENHANCEMENTS CSS
   Hero Redesign + Animations + Mobile
   ============================================ */

/* ============================================
   1. PAGE-HERO REDESIGN (sub-pages)
   Dark gradient with animated decorations
   ============================================ */

.page-hero {
    background: linear-gradient(135deg, #0a0e27 0%, #131842 40%, #0f172a 100%) !important;
    color: #ffffff !important;
    padding: 40px 0 30px !important;
    position: relative;
    overflow: hidden;
    min-height: auto !important;
    isolation: isolate;
}

/* Animated gradient overlay */
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(220, 38, 38, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 50%, rgba(37, 99, 235, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 100%, rgba(20, 184, 166, 0.08) 0%, transparent 50%);
    animation: heroGradientPulse 8s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

/* Subtle grid pattern */
.page-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 1;
    pointer-events: none;
    opacity: 0.5;
}

@keyframes heroGradientPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

/* Decoration orbs — redesigned */
.page-hero-decoration {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    z-index: 1;
    pointer-events: none;
}

.page-hero-decoration-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.35) 0%, transparent 70%);
    top: -150px;
    left: -100px;
    animation: orbDrift1 20s ease-in-out infinite;
}

.page-hero-decoration-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.3) 0%, transparent 70%);
    bottom: -200px;
    right: -150px;
    animation: orbDrift2 25s ease-in-out infinite;
}

.page-hero-decoration-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.2) 0%, transparent 70%);
    top: 50%;
    left: 60%;
    transform: translate(-50%, -50%);
    animation: orbDrift3 18s ease-in-out infinite;
}

@keyframes orbDrift1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(40px, 30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, -15px) scale(0.95);
    }
}

@keyframes orbDrift2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-50px, 40px) scale(1.15);
    }
}

@keyframes orbDrift3 {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-45%, -55%) scale(1.08);
    }
}

/* Hero content — text styles for dark bg */
.page-hero .page-hero-content {
    position: relative;
    z-index: 5;
    text-align: center;
}

.page-hero .page-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 0.625rem 1.5rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    animation: fadeInDown 0.6s ease-out;
}

.page-hero .page-hero-badge svg {
    color: #ef4444 !important;
    stroke: #ef4444 !important;
}

.page-hero .page-hero-title {
    color: #ffffff !important;
    text-shadow:
        0 2px 30px rgba(0, 0, 0, 0.3),
        0 0 60px rgba(220, 38, 38, 0.15);
    margin-bottom: 1.25rem;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.page-hero .page-hero-title .title-line {
    display: block;
    color: #ffffff !important;
}

.page-hero .page-hero-subtitle {
    color: rgba(255, 255, 255, 0.75) !important;
    max-width: 650px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.7;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* Breadcrumbs on dark hero pages — adjust color */
.breadcrumbs {
    background: transparent;
    position: relative;
    z-index: 10;
}

.breadcrumbs-nav a,
.breadcrumbs-current,
.breadcrumbs-separator {
    position: relative;
    z-index: 10;
}

/* ============================================
   2. MAIN HERO (index.html) IMPROVEMENTS
   ============================================ */

.hero {
    min-height: 80vh !important;
}

/* ============================================
   3. SCROLL REVEAL ANIMATIONS
   ============================================ */

.reveal {
    opacity: 1;
    transform: none;
    transition: none;
}

.reveal.revealed {
    opacity: 1;
    transform: none;
}

.section-title.reveal {
    opacity: 1;
    transform: none;
    transition: none;
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered delays for grid children */
.stagger-1 {
    transition-delay: 0.05s;
}

.stagger-2 {
    transition-delay: 0.1s;
}

.stagger-3 {
    transition-delay: 0.15s;
}

.stagger-4 {
    transition-delay: 0.2s;
}

.stagger-5 {
    transition-delay: 0.25s;
}

.stagger-6 {
    transition-delay: 0.3s;
}

.stagger-7 {
    transition-delay: 0.35s;
}

.stagger-8 {
    transition-delay: 0.4s;
}

.stagger-9 {
    transition-delay: 0.45s;
}

.stagger-10 {
    transition-delay: 0.5s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ============================================
   4. ENHANCED CARD HOVER EFFECTS
   ============================================ */

/* Why-choose cards */
.why-choose-card {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.4s ease !important;
}

.why-choose-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(220, 38, 38, 0.08) !important;
}

/* Testimonial cards */
.testimonial-card {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.4s ease !important;
}

.testimonial-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.12) !important;
}

/* News cards */
.news-card {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.4s ease !important;
}

.news-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.12) !important;
}

/* About page cards */
.advantage-card,
.service-card,
.value-card,
.intro-card {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.4s ease !important;
}

.advantage-card:hover,
.service-card:hover,
.value-card:hover,
.intro-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.12) !important;
}

/* Contact cards */
.contact-card {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.4s ease !important;
}

.contact-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.12) !important;
}

/* Award cards */
.award-card {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.4s ease !important;
}

.award-card:hover {
    transform: translateY(-6px) scale(1.02) !important;
    box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.15) !important;
}

/* ============================================
   5. GRADIENT SECTION DIVIDERS
   ============================================ */

.section-divider {
    height: 3px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(220, 38, 38, 0.3) 20%,
            rgba(37, 99, 235, 0.4) 50%,
            rgba(20, 184, 166, 0.3) 80%,
            transparent 100%);
    border: none;
    margin: 0;
    opacity: 0.6;
}

/* ============================================
   6. SCROLL-TO-TOP BUTTON
   ============================================ */

.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
}

.scroll-to-top svg {
    width: 22px;
    height: 22px;
    stroke-width: 2.5;
}

/* ============================================
   7. NAVIGATION FIX (desktop overflow)
   ============================================ */

@media (min-width: 769px) {
    .nav {
        overflow: visible !important;
    }

    .nav-link {
        padding: 0.75rem 0.875rem !important;
        font-size: 0.875rem !important;
    }
}

@media (min-width: 1100px) {
    .nav-link {
        padding: 0.75rem 1.1rem !important;
        font-size: 0.9375rem !important;
    }
}

/* ============================================
   8. SMART HEADER (hide on scroll down)
   ============================================ */

.header {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s ease !important;
}

.header.header-hidden {
    transform: translateY(-100%);
}

.header.header-shadow {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

/* ============================================
   9. MOBILE MENU ANIMATION
   ============================================ */

@media (max-width: 768px) {
    .nav {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 80% !important;
        max-width: 320px !important;
        height: 100vh !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        padding: 5rem 1.5rem 2rem !important;
        margin-top: 0 !important;
        border-top: none !important;
        border-left: 1px solid rgba(0, 0, 0, 0.08) !important;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1) !important;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        z-index: 1000 !important;
        order: initial !important;
        overflow-y: auto !important;
    }

    .nav.active {
        right: 0 !important;
        display: flex !important;
    }

    .nav-list {
        flex-direction: column !important;
        gap: 0.25rem !important;
        width: 100% !important;
    }

    .nav-link {
        padding: 1rem 1.25rem !important;
        border-radius: 12px !important;
        border-bottom: none !important;
        font-size: 1rem !important;
        font-weight: 500 !important;
        transition: background 0.2s ease, color 0.2s ease !important;
    }

    .nav-link:hover,
    .nav-link.active {
        background: rgba(220, 38, 38, 0.06) !important;
        color: #dc2626 !important;
    }

    .nav-link.active {
        font-weight: 600 !important;
    }

    /* Mobile menu overlay */
    .mobile-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .mobile-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Hamburger animation */
    .mobile-menu-toggle {
        z-index: 1002 !important;
    }

    /* Page hero mobile */
    .page-hero {
        padding: 50px 0 45px !important;
    }

    .page-hero .page-hero-badge {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .page-hero .page-hero-title {
        font-size: clamp(1.5rem, 5vw, 2.2rem) !important;
    }

    .page-hero .page-hero-subtitle {
        font-size: 0.9rem;
        padding: 0 0.5rem;
    }

    .page-hero-decoration-1 {
        width: 250px;
        height: 250px;
        top: -100px;
        left: -80px;
    }

    .page-hero-decoration-2 {
        width: 300px;
        height: 300px;
        bottom: -150px;
        right: -100px;
    }

    .page-hero-decoration-3 {
        width: 200px;
        height: 200px;
    }

    /* Main hero mobile */
    .hero {
        min-height: 70vh !important;
        padding: 60px 0 50px !important;
    }

    /* Scroll to top mobile */
    .scroll-to-top {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 42px;
        height: 42px;
    }

    /* Section padding */
    section {
        padding: 40px 0 !important;
    }

    /* Card grids — 1 column */
    .why-choose-grid,
    .testimonials-grid,
    .news-grid,
    .advantages-grid,
    .services-grid,
    .values-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }

    /* CTA section mobile */
    .cta-buttons,
    .about-cta-buttons,
    .programs-cta-buttons {
        flex-direction: column !important;
    }

    .cta-buttons .btn,
    .about-cta-buttons .btn,
    .programs-cta-buttons .btn {
        width: 100% !important;
        min-width: auto !important;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem !important;
    }

    .page-hero {
        padding: 40px 0 35px !important;
    }

    .page-hero .page-hero-title {
        font-size: clamp(1.3rem, 6vw, 1.8rem) !important;
    }

    .hero-title {
        font-size: clamp(1.3rem, 5vw, 1.7rem) !important;
    }

    .section-title {
        font-size: 1.5rem !important;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .stat-card {
        padding: 1.5rem 1rem !important;
    }

    .why-choose-card,
    .testimonial-card,
    .advantage-card,
    .service-card,
    .value-card {
        padding: 1.5rem !important;
    }

    .hero {
        min-height: auto !important;
        padding: 50px 0 40px !important;
    }
}

/* ============================================
   10. FOOTER YEAR FIX + MINOR POLISHES
   ============================================ */

/* Smooth focus outlines */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #dc2626;
    outline-offset: 3px;
    border-radius: 4px;
}

/* Section title underline animation */
.section-title::after {
    transition: none !important;
}

.section-title.revealed::after {
    width: 80px;
}
