@import url("https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Inter:wght@400;500;600;700&family=Great+Vibes&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@100..900&display=swap");

/* ==========================================================================
   1. Variables & Root
   ========================================================================== */
html {
    scroll-behavior: smooth;
}

:root {
    --primary: #96151b;
    --secondary: #285498;
    --accent-primary: #1e90ff;
    --accent-secondary: #f43f5e;
    --text-main: #0f172a;
    --text-sub: #64748b;
    --bg-body: #ffffff;
    --border-color: #e2e8f0;
    --font-size-multiplier: 1;

    /* Extra colors from the design */
    --light: #f8fafc;
    --grey-100: #f1f5f9;
    --bg-soft-red: #fff5f5;
}

/* ==========================================================================
   2. Base Styles
   ========================================================================== */
body {
    font-family: "Inter", "Plus Jakarta Sans", sans-serif;
    color: var(--text-main);
    background-color: var(--bg-body);
    overflow-x: hidden;
    font-size: calc(100% * var(--font-size-multiplier));
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Nepali Font Override */
body:lang(ne) {
    font-family: "Noto Sans Devanagari", "Inter", sans-serif;
}

.font-display {
    font-family: "DM Serif Display", serif;
}

.font-display:lang(ne) {
    font-family: "Noto Sans Devanagari", serif;
}

.alternative-font-6 {
    font-family: "Montserrat", Arial, sans-serif !important;
}

body .uwy.userway_p1 .userway_buttons_wrapper {
    right: -2rem !important;
    left: auto !important;
    top: auto !important;
    bottom: 1rem !important;
}

body .uwy .uai,
body .uwy .ulsti {
    width: 56px !important;
    height: 56px !important;
}

/* ==========================================================================
   3. Keyframes & Animations
   ========================================================================== */
@keyframes shapeDividerToLeft {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(-200%, 0, 0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float-blob {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 50px) scale(1.1);
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* ==========================================================================
   4. Layout Components (Containers, Sections)
   ========================================================================== */
.container-sm,
.container-md,
.container-lg,
.container-xl,
.container-2xl {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding-right: 1rem;
    padding-left: 1rem;
}

@media (min-width: 640px) {
    .container-sm {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container-md {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container-lg {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container-xl {
        max-width: 1280px;
    }
}

@media (min-width: 1536px) {
    .container-2xl {
        max-width: 1536px;
    }
}

.section.section-with-shape-divider {
    position: relative;
    overflow: hidden;
}

/* ==========================================================================
   5. Header & Navigation
   ========================================================================== */
header {
    transition:
        transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
        background 0.3s ease;
    background: white;
    will-change: transform;
}

header.fixed {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.header-shadow {
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.hamburger-icon {
    transition: transform 0.3s ease;
}

.hamburger-icon.open {
    transform: rotate(90deg);
}

/* Mobile Menu Animation */
#mobile-menu-btn.active span:nth-child(1) {
    width: 80%;
    transform: translate(-4px, 10px) rotate(45deg);
}

#mobile-menu-btn.active span:nth-child(2) {
    opacity: 0 !important;
    transform: translateX(10px);
}

#mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ==========================================================================
   6. Hero & Gallery Components
   ========================================================================== */
.gallery-container {
    position: relative;
    overflow: visible;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    background: transparent;
    margin-top: -132px;
    z-index: 10;
}

.gallery-strip {
    display: flex;
    align-items: center;
    gap: 20px;
}

.gal-img {
    width: 250px;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    opacity: 0.9;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.gal-img.active {
    width: 400px;
    opacity: 1;
}

.gal-img.medium {
    height: 350px;
    width: 250px;
}

.gal-img.large {
    width: 720px;
    max-width: 100%;
    height: auto;
    margin: 0.75rem 1.1rem;
    opacity: 1;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    z-index: 2;
    transform: scale(1.05);
}

.hero-stack-img {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: bottom center;
}

.hero-stack-img:hover {
    transform: translateY(-5px) scale(1.02);
}

.perspective-1000 {
    perspective: 1000px;
}

/* ==========================================================================
   7. LMS / UI Interface Mockup
   ========================================================================== */
.interface-wrapper {
    max-width: 1100px;
    margin: 0 auto 80px;
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.ui-header {
    height: 45px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 15px;
    border-bottom: 1px solid var(--border-color);
}

.ui-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cbd5e1;
}

.ui-address-bar {
    flex-grow: 1;
    background: white;
    height: 28px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    padding-left: 10px;
    font-size: 12px;
    color: #64748b;
}

.ui-body {
    display: flex;
    height: 650px;
    position: relative;
}

.ui-sidebar {
    width: 70px;
    background: #ffffff;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
    gap: 25px;
}

.ui-canvas {
    flex-grow: 1;
    background: #f8fafc;
    position: relative;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ui-panels {
    width: 280px;
    background: #ffffff;
    border-left: 1px solid var(--border-color);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ui-card {
    position: absolute;
    bottom: 30px;
    left: 30px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.tool-icon {
    width: 40px;
    height: 40px;
    background: #eff6ff;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent-primary);
    font-size: 18px;
    cursor: pointer;
    transition: 0.2s;
}

.tool-icon.active {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3);
}

.tool-icon:hover {
    transform: scale(1.05);
}

.lesson-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
}

.lesson-item:hover {
    background: #f1f5f9;
}

.lesson-item.active {
    background: #eff6ff;
    border-color: #dbeafe;
}

.lesson-thumb {
    width: 60px;
    height: 40px;
    background: #cbd5e1;
    border-radius: 4px;
    overflow: hidden;
}

.video-mockup {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.video-mockup img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

.play-circle {
    width: 40px;
    height: 40px;
    background: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

/* ==========================================================================
   8. UI Elements (Buttons, Toggles, Glassmorphism)
   ========================================================================== */
.grade-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
}

.toggle-pill {
    background: #e2e8f0;
    border-radius: 50px;
    padding: 4px;
    display: flex;
}

.toggle-btn {
    padding: 10px 30px;
    border-radius: 40px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    color: var(--text-sub);
}

.toggle-btn.active {
    background: white;
    color: var(--accent-primary);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-light {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle,
            rgba(255, 255, 255, 0.3) 0%,
            transparent 60%);
    transform: scale(0);
    opacity: 0;
    transition:
        transform 0.6s,
        opacity 0.6s;
}

.btn-glow:hover::after {
    transform: scale(1);
    opacity: 1;
}

/* ==========================================================================
   9. Shape Dividers & Design Elements
   ========================================================================== */
.blob {
    position: absolute;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.6;
    animation: float-blob 10s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle,
            rgba(220, 20, 60, 0.4) 0%,
            transparent 70%);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle,
            rgba(37, 99, 235, 0.4) 0%,
            transparent 70%);
}

.section.section-with-shape-divider .shape-divider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 1;
}

.section.section-with-shape-divider .shape-divider.shape-divider-bottom {
    top: auto;
    bottom: 0;
}

.section.section-with-shape-divider .shape-divider .shape-divider-horizontal-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100%;
    animation-duration: 45s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

.section.section-with-shape-divider .shape-divider.shape-divider-reverse-y {
    transform: rotateY(180deg);
}

.section.section-with-shape-divider .shape-divider.shape-divider-reverse-y .shape-divider-horizontal-animation.shape-divider-horizontal-animation-to-right.start,
.section.section-with-shape-divider .shape-divider.shape-divider-reverse-xy .shape-divider-horizontal-animation.shape-divider-horizontal-animation-to-right.start {
    animation-name: shapeDividerToLeft;
}

/* ==========================================================================
   10. Accessibility Controls
   ========================================================================== */
.accessibility-controls {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 100;
}

/* Scale-immune overrides for accessibility interface itself */
.accessibility-controls,
.acc-btn {
    --font-size-multiplier: 1 !important;
    font-size: 16px !important;
}

.acc-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    background: white;
    border: 2px solid var(--border-color);
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
}

.acc-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(1.05);
}

.acc-btn::after {
    content: attr(data-label);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translate(-10px, -50%);
    margin-left: 1rem;
    background: var(--secondary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.acc-btn:hover::after {
    opacity: 1;
    transform: translate(0, -50%);
}

/* ==========================================================================
   11. Helper Utilities
   ========================================================================== */
.width-100vw {
    width: 100vw;
}

.top-9 {
    top: 9px !important;
}

.z-index-6 {
    z-index: 6 !important;
}

.opacity-5 {
    opacity: 0.5 !important;
}

.opacity-7 {
    opacity: 0.7 !important;
}

.custom-el-pos-3 {
    bottom: -25px !important;
}

.custom-el-pos-2 {
    top: 25px;
    position: relative;
}

.typing-cursor {
    display: inline-block;
    /* Pull closer to the cursive text */
    color: var(--primary);
    animation: blink 1s infinite;
    font-family: "Great Vibes", cursive;
    font-weight: 400;
    font-size: 1.2em;
    vertical-align: middle;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

/* ==========================================================================
   12. Responsive Overrides
   ========================================================================== */
@media (min-width: 992px) {
    .custom-el-pos-2 {
        top: 0;
    }
}

@media (max-width: 1919px) {
    .custom-shape-divider-1 {
        min-width: 1920px;
        /* Add blending to see overlapping waves */
        mix-blend-mode: multiply;
        filter: drop-shadow(0 -2px 10px rgba(251, 229, 230, 0.5));
    }
}

@media (max-width: 900px) {

    .ui-panels,
    .ui-sidebar,
    .nav-links {
        display: none;
    }

    .ui-body {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .gallery-container {
        margin-top: -40px;
        min-height: auto;
        padding-bottom: 40px;
        flex-direction: column;
    }

    .gallery-strip {
        width: 100%;
        overflow: hidden;
        justify-content: center;
    }

    .gal-img:not(.large) {
        display: none;
    }

    .gal-img,
    .gal-img.large,
    .gal-img.medium {
        width: 100%;
        height: auto;
        transform: none;
        margin: 0;
    }

    .accessibility-controls {
        bottom: 1.5rem;
        left: 1.5rem;
    }

    .acc-btn {
        width: 3rem;
        height: 3rem;
        border-radius: 0.75rem;
    }

    .acc-btn::after {
        display: none;
    }
}