/* ===== NASE SKY THEME HERO - FIXED & ENHANCED ===== */

/* Discipline loading toast */
.discipline-loading {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(29, 52, 97, 0.92);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 12px 22px;
    border-radius: 50px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    backdrop-filter: blur(10px);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.discipline-loading.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.discipline-loading.fade-out {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #C8962A;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Music toggle — fixed so it stays visible while browsing */
/* ===== MUSIC TOGGLE BUTTON ===== */
@keyframes mt-glow {
    0%, 100% { box-shadow: 0 4px 24px rgba(200,150,42,0.25), 0 0 0 0   rgba(200,150,42,0.4); }
    50%       { box-shadow: 0 4px 32px rgba(200,150,42,0.45), 0 0 0 8px rgba(200,150,42,0); }
}

@keyframes bar-dance {
    0%, 100% { transform: scaleY(1); }
    50%       { transform: scaleY(0.25); }
}

.music-toggle {
    position: fixed;
    bottom: 100px;
    left: 24px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(4, 12, 30, 0.70);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 50px;
    padding: 10px 18px 10px 12px;
    cursor: pointer;
    color: rgba(255,255,255,0.70);
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: background 0.3s, border-color 0.3s, color 0.3s, transform 0.3s, opacity 0.3s;
    user-select: none;
    outline: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.35);
}

.music-toggle:hover {
    background: rgba(4, 12, 30, 0.90);
    color: #fff;
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 6px 28px rgba(0,0,0,0.45);
}

.music-toggle:active { transform: scale(0.97); }

.music-toggle.playing {
    border-color: rgba(200,150,42,0.65);
    color: #FFD060;
    background: rgba(8, 22, 50, 0.80);
    animation: mt-glow 2.2s ease-in-out infinite;
}

/* Icon wrapper */
.mt-icon {
    position: relative;
    width: 52px;
    height: 20px;
    flex-shrink: 0;
}

.mt-icon-off,
.mt-icon-on {
    position: absolute;
    top: 0; left: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: opacity 0.25s, transform 0.25s;
}

/* Default: show muted, hide playing */
.mt-icon-off { opacity: 1; transform: scale(1); }
.mt-icon-on  { opacity: 0; transform: scale(0.8) translateX(-4px); }

.music-toggle.playing .mt-icon-off { opacity: 0; transform: scale(0.8) translateX(-4px); }
.music-toggle.playing .mt-icon-on  { opacity: 1; transform: scale(1) translateX(0); }

/* Dancing bars */
.mt-bars {
    display: flex;
    align-items: flex-end;
    gap: 2.5px;
    height: 20px;
    padding-bottom: 1px;
}

.mt-bars span {
    display: block;
    width: 3px;
    border-radius: 3px;
    background: currentColor;
    transform-origin: bottom;
    animation: bar-dance 0.8s ease-in-out infinite;
}

.mt-bars span:nth-child(1) { height: 8px;  animation-duration: 0.70s; animation-delay: 0.00s; }
.mt-bars span:nth-child(2) { height: 15px; animation-duration: 0.90s; animation-delay: 0.15s; }
.mt-bars span:nth-child(3) { height: 10px; animation-duration: 0.65s; animation-delay: 0.30s; }
.mt-bars span:nth-child(4) { height: 6px;  animation-duration: 1.00s; animation-delay: 0.45s; }

.music-toggle:not(.playing) .mt-bars span { animation-play-state: paused; }

.mt-label { font-size: 11px; }

/* Hidden when scrolled past hero */
.music-toggle.mt-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.nsa-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 92px;
    position: relative;
    overflow: hidden;
}

/* Made in Nepal Innovation badge */
.nepal-innovation-badge {
    position: fixed;
    top: 96px;        /* clears the 76px fixed nav + 20px breathing room */
    right: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(0, 10, 42, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom-left-radius: 18px;
    border-left: 4px solid #C8962A;
    border-bottom: 3px solid rgba(200, 150, 42, 0.5);
    padding: 18px 30px 18px 22px;
    box-shadow: -4px 6px 32px rgba(0,0,0,0.55);
    animation: badge-float 3.5s ease-in-out infinite;
}

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

.nepal-flag-img {
    width: 62px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,0.6));
    flex-shrink: 0;
}

.badge-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.badge-title {
    font-size: 16px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 0 16px rgba(255,255,255,0.35), 0 2px 8px rgba(0,0,0,0.9);
    white-space: nowrap;
}

.badge-sub {
    font-size: 12.5px;
    font-weight: 600;
    color: #d4e4ff;
    line-height: 1.6;
    text-shadow: 0 1px 5px rgba(0,0,0,0.9);
}

/* Background Image Container */
.hero-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Video: always visible — poster image shows while video buffers, then video plays over it */
video.hero-bg {
    opacity: 1;
}
video.hero-bg.ready {
    opacity: 1;
}

/* Static image fallback for reduced-motion users */
@media (prefers-reduced-motion: reduce) {
    video.hero-bg {
        display: none;
    }
    .hero-bg-container::after {
        content: '';
        position: absolute;
        inset: 0;
        background: url('../images/BG photo.png') center/cover no-repeat;
        z-index: 0;
    }
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.55); /* 55% white overlay */
    z-index: 1;
}

/* Sky Elements Layer */
.sky-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* Soft Clouds - FIXED: removed conflicting transforms */
.soft-cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 1000px;
    filter: blur(40px);
    opacity: 0.4;
    pointer-events: none;
}

.cloud-1 {
    width: 500px;
    height: 150px;
    top: 10%;
    left: -200px;
    animation: slideCloud 80s linear infinite;
}

.cloud-2 {
    width: 600px;
    height: 180px;
    bottom: 20%;
    right: -250px;
    animation: slideCloud 100s linear infinite reverse;
}

.cloud-3 {
    width: 400px;
    height: 120px;
    top: 40%;
    left: 70%;
    animation: slideCloud 60s linear infinite;
}

@keyframes slideCloud {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(100vw + 400px)); }
}

/* Container Layout */
.nsa-hero .container {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Welcome Tag */
.welcome-tag {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.tag-line {
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), transparent);
}

.tag-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Hero Title */
.hero-title {
    margin-bottom: 24px;
}

.title-line {
    display: block;
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.01em;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

.title-line:nth-child(1) {
    font-size: clamp(28px, 3.8vw, 48px);
    background: linear-gradient(
        105deg,
        #0d1f4a 0%,
        #1D3461 25%,
        #4a70b8 42%,
        #c8d8f5 50%,
        #4a70b8 58%,
        #1D3461 75%,
        #0d1f4a 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
    animation-delay: 0.2s;
    animation: fadeInUp 0.8s ease forwards, metalShineNavy 4s ease-in-out 1.5s infinite;
}

.title-line:nth-child(2) {
    font-size: clamp(32px, 4.5vw, 56px);
    background: linear-gradient(
        105deg,
        #6b4200 0%,
        #a87020 20%,
        #C8962A 38%,
        #fff0a0 50%,
        #C8962A 62%,
        #a87020 80%,
        #6b4200 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.4));
    animation-delay: 0.4s;
    animation: fadeInUp 0.8s ease forwards, metalShineGold 4s ease-in-out 2s infinite;
}

.title-line:nth-child(3) {
    font-size: clamp(28px, 3.8vw, 48px);
    background: linear-gradient(
        105deg,
        #0d1f4a 0%,
        #1D3461 25%,
        #4a70b8 42%,
        #c8d8f5 50%,
        #4a70b8 58%,
        #1D3461 75%,
        #0d1f4a 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
    animation-delay: 0.6s;
    animation: fadeInUp 0.8s ease forwards, metalShineNavy 4s ease-in-out 2.5s infinite;
}

@keyframes metalShineNavy {
    0%   { background-position: 150% 0; }
    50%  { background-position: -50% 0; }
    100% { background-position: 150% 0; }
}

@keyframes metalShineGold {
    0%   { background-position: 150% 0; }
    50%  { background-position: -50% 0; }
    100% { background-position: 150% 0; }
}

/* Per-character typewriter fade-in */
@keyframes char-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.type-char {
    display: inline;
    opacity: 0;
    animation: char-fade-in 0.12s ease-out forwards;
}

/* Description */
.hero-description {
    font-size: 16px;
    line-height: 1.8;
    color: #1e293b;
    margin-top: 30px;
    margin-bottom: 40px;
    max-width: 550px;
    background: rgba(255, 255, 255, 0.7);
    padding: 20px 25px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.8s forwards;
    font-weight: 500;
}

/* STEAM Pillars - FIXED: removed conflicting animations */
.steam-pillars {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.8s ease 1s forwards;
}

.pillar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border: 2px solid;
    border-radius: 40px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.pillar.science { 
    border-color: #00BCD4; 
    color: #00BCD4;
}
.pillar.tech { 
    border-color: #FF9800; 
    color: #FF9800;
}
.pillar.engineering { 
    border-color: #9C27B0; 
    color: #9C27B0;
}
.pillar.arts { 
    border-color: #22DD77; 
    color: #22DD77;
}
.pillar.math { 
    border-color: #FF5252; 
    color: #FF5252;
}

.pillar-icon {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.pillar-text {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* FIXED: Simplified hover effect - no animation conflicts */
.pillar:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

.pillar:hover .pillar-icon {
    transform: scale(1.1);
}

/* Buttons */
.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.8s ease 1.2s forwards;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 40px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    font-size: 15px;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 20px rgba(29, 52, 97, 0.30);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(29, 52, 97, 0.40);
}

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

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.btn-arrow {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.btn:hover .btn-arrow {
    transform: translateX(5px);
}

/* Right Side - Stats Panel - FIXED: removed conflicting animations */
.hero-stats-panel {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    opacity: 0;
    animation: fadeInUp 0.8s ease 1.4s forwards;
}

.stat-card {
    background: transparent;
    border: none;
    cursor: default;
}

.stat-inner {
    background: white;
    padding: 25px 20px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* FIXED: Simplified hover effect */
.stat-card:hover .stat-inner {
    transform: translateY(-5px);
    box-shadow: 0 25px 45px rgba(29, 52, 97, 0.15);
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;   /* For Chrome/Safari/Edge */
    background-clip: text;           /* STANDARD PROPERTY - fixes yellow line */
    -webkit-text-fill-color: transparent;
    color: transparent;               /* Fallback for other browsers */
    line-height: 1;
    margin-bottom: 5px;
}
.stat-label {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 5px;
}

.stat-trend {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* FIXED: Separate floating animation - no hover conflicts */
.stat-1 .stat-inner { animation: float 4s ease-in-out infinite; }
.stat-2 .stat-inner { animation: float 4.5s ease-in-out infinite; animation-delay: 0.5s; }
.stat-3 .stat-inner { animation: float 5s ease-in-out infinite; animation-delay: 1s; }
.stat-4 .stat-inner { animation: float 5.5s ease-in-out infinite; animation-delay: 1.5s; }

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

/* Mouse Style Scroll Indicator */
.scroll-indicator.mouse-style {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 20;
}

.scroll-indicator.mouse-style .mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--primary);
    border-radius: 20px;
    position: relative;
    opacity: 0.8;
}

.scroll-indicator.mouse-style .wheel {
    width: 4px;
    height: 10px;
    background: var(--primary);
    border-radius: 2px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s infinite;
}

.scroll-indicator.mouse-style .scroll-text {
    font-size: 12px;
    color: #475569;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
}

@keyframes scrollWheel {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(20px); }
}
/* Base Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive */
@media (max-width: 1024px) {
    .nsa-hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    .hero-stats-panel {
        max-width: 600px;
        margin: 0 auto;
    }
    
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .steam-pillars {
        justify-content: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .welcome-tag {
        justify-content: center;
    }
    
    .cloud-1, .cloud-2, .cloud-3 {
        opacity: 0.2;
    }
}

@media (max-width: 768px) {
    .nsa-hero {
        padding-top: 80px;
    }
    
    .hero-stats-panel {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-inner {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 36px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .steam-pillars {
        gap: 8px;
    }
    
    .pillar {
        padding: 8px 15px;
    }
    
    .pillar-text {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .hero-description {
        padding: 14px 16px;
        font-size: 14px;
        margin-top: 18px;
        margin-bottom: 22px;
    }

    /* Let clamp() values take over — do NOT override with a fixed size */
    .title-line:nth-child(1) { font-size: clamp(22px, 6.5vw, 34px); }
    .title-line:nth-child(2) { font-size: clamp(26px, 7.5vw, 38px); }
    .title-line:nth-child(3) { font-size: clamp(22px, 6.5vw, 34px); }

    .stat-number { font-size: 28px; }

    .hero-stats-panel {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-inner { padding: 14px 10px; }
    .stat-label { font-size: 11px; }
    .stat-trend { display: none; }
    .stat-icon  { font-size: 22px; margin-bottom: 6px; }

    .pillar { padding: 6px 12px; }
    .pillar-text { font-size: 10px; }
}

/* ── Nepal badge: shrink on mobile ───────────────────────────────────────── */
@media (max-width: 768px) {
    .nepal-innovation-badge {
        padding: 10px 14px 10px 12px;
        gap: 10px;
        top: 70px;
    }
    .nepal-flag-img { width: 36px; }
    .badge-title    { font-size: 12px; letter-spacing: 0.05em; }
    .badge-sub      { font-size: 10px; line-height: 1.4; }
}

@media (max-width: 480px) {
    /* Hide the badge entirely — too cluttered on small phones */
    .nepal-innovation-badge { display: none; }

    /* Hide music toggle on small phones */
    .music-toggle { display: none; }

    .nsa-hero { padding-top: 70px; }
}

/* ── Scroll indicator: hide on small screens ─────────────────────────────── */
@media (max-width: 600px) {
    .scroll-indicator { display: none; }
}