/* ==========================================================================
   MAHARA SMART SCHOOL - SPATIAL DESIGN SYSTEM
   Expert 3D CSS Transforms, Floating Physics, & Multi-Layered Glassmorphism
   ========================================================================== */

:root {
    --ag-primary: #0059A5;
    --ag-primary-hover: #004580;
    --ag-primary-glow: rgba(0, 89, 165, 0.28);
    --ag-secondary: #0ea5e9;
    --ag-emerald: #10b981;
    --ag-emerald-glow: rgba(16, 185, 129, 0.25);
    --ag-amber: #f59e0b;
    --ag-purple: #8b5cf6;
    --ag-bg-base: #f8fafc;
    --ag-surface-glass: rgba(255, 255, 255, 0.72);
    --ag-surface-glass-hover: rgba(255, 255, 255, 0.88);
    --ag-glass-border: rgba(255, 255, 255, 0.9);
    --ag-glass-border-subtle: rgba(0, 89, 165, 0.08);
    --ag-shadow-floating: 0 25px 50px -12px rgba(0, 61, 115, 0.12), 0 10px 20px -5px rgba(0, 0, 0, 0.04);
    --ag-shadow-glow: 0 0 35px rgba(0, 89, 165, 0.15);
    --ag-radius-xl: 1.75rem;
    --ag-radius-2xl: 2.25rem;
}

/* Prevent horizontal overflow cleanly without breaking sticky/fixed mobile header */
html, body {
    overflow-x: clip;
}

body {
    background-color: var(--ag-bg-base);
    color: #1e293b;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Ensure website navbar is solid white across standard and affixed states with NO mobile scroll glitch */
#wrapwrap header,
#wrapwrap header#top,
header.o_header_standard,
header.o_header_affixed,
#wrapwrap header .navbar,
#top .navbar {
    background-color: #ffffff !important;
}

header#top:not(.o_header_affixed) {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

/* For overlay header when at top (not scrolled), stay relative with white background */
#wrapwrap.o_header_overlay > header:not(.o_header_affixed) {
    position: relative !important;
    background-color: #ffffff !important;
}

#wrapwrap.o_header_overlay > header:not(.o_header_affixed) > .navbar {
    background-color: #ffffff !important;
}

/* Allow affixed header on scroll to smoothly stay fixed with no jumping */
header.o_header_affixed {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1030 !important;
    background-color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
}

/* --------------------------------------------------------------------------
   SPATIAL CANVAS & MODERN ACADEMIC HERO CARD
   -------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------
   SPATIAL CANVAS & MODERN ACADEMIC HERO SECTION
   Full-Height, Full-Width, No Shadows, Inverted Concave Downside Breakout
   -------------------------------------------------------------------------- */
.mahara-hero,
.antigravity-hero {
    position: relative;
    min-height: calc(100vh - 74px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #ffffff;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible;
}

@media (max-width: 991.98px) {
    .mahara-hero,
    .antigravity-hero {
        min-height: auto;
    }
    .ag-hero-block-full {
        justify-content: center !important;
        align-items: center !important;
        min-height: auto !important;
        padding: 1rem 0 !important;
    }
    .ag-hero-block-full > .container {
        margin: auto !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        width: 100% !important;
    }
    .ag-hero-block-full .row {
        align-items: center !important;
        justify-content: center !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }
    .ag-hero-text-col {
        padding-top: 5rem !important;
        padding-bottom: 4rem !important;
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
    }
    .ag-hero-text-col h1,
    .ag-hero-text-col .ag-hero-title,
    .ag-hero-title {
        text-align: center !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        display: block !important;
    }
    .ag-hero-text-col h1 span,
    .ag-hero-text-col .ag-hero-title span {
        text-align: center !important;
        display: inline-block !important;
    }
    .ag-hero-text-col p,
    .ag-hero-text-col .ag-hero-subtitle,
    .ag-hero-subtitle {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
        width: 100% !important;
        max-width: 580px !important;
        display: block !important;
    }
    .ag-hero-text-col .ag-hero-buttons,
    .ag-hero-text-col .d-flex {
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        display: flex !important;
        flex-wrap: wrap !important;
    }
}

/* Full Width Hero Block Above Stats (No padding, No shadows) */
.ag-hero-block-full {
    width: 100%;
    max-width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    background-color: #EEF5FC;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160' fill='none' stroke='%230059A5' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round' opacity='0.14'%3E%3Cpath d='M25 35 L45 25 L65 35 L45 45 Z'/%3E%3Cpath d='M35 40 L35 52 C35 56 55 56 55 52 L55 40'/%3E%3Cpath d='M65 35 L65 50'/%3E%3Cpath d='M120 20 L135 35 L95 75 L80 75 L80 60 Z'/%3E%3Cpath d='M115 25 L130 40'/%3E%3Cpath d='M20 110 C30 105 45 105 55 110 L55 135 C45 130 30 130 20 135 Z'/%3E%3Cpath d='M90 110 C80 105 65 105 55 110 L55 135 C65 130 80 130 90 135 Z'/%3E%3Cpath d='M110 115 L145 115 L145 135 L110 135 Z'/%3E%3Cline x1='120' y1='115' x2='120' y2='123'/%3E%3Cline x1='130' y1='115' x2='130' y2='123'/%3E%3Cline x1='140' y1='115' x2='140' y2='123'/%3E%3Cpath d='M85 25 L95 25 M90 20 L90 30'/%3E%3Ccircle cx='110' cy='85' r='3'/%3E%3Cpath d='M20 75 L30 75 M25 70 L25 80'/%3E%3Cpath d='M135 70 L145 80 M145 70 L135 80'/%3E%3C/svg%3E");
    background-repeat: repeat;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
}

.ag-hero-block-full > .container {
    margin-top: auto !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    width: 100%;
}

.ag-hero-block-full .row {
    margin-bottom: 0 !important;
    align-items: flex-end !important;
    width: 100%;
}

.ag-hero-text-col {
    padding-top: 5rem;
    padding-bottom: 5rem;
}


.ag-hero-student-col {
    align-self: flex-end !important;
    display: flex;
    justify-content: center;
    align-items: flex-end !important;
    position: relative;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

@media (max-width: 991.98px) {
    .ag-hero-student-col {
        display: none !important; /* Completely removed from mobile view */
    }
}

/* Student Stage Wrapper attached flush to the bottom */
.ag-hero-student-wrapper {
    position: relative;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 0 !important;
    margin-bottom: -2px !important; /* Put it down a bit to seamlessly merge into stats floor */
}

/* Inverted Concave Curve Fillets at Bottom Colliding with Stats Section */
.ag-concave-bottom {
    position: absolute;
    bottom: 0;
    width: 48px;
    height: 48px;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

/*rtl:begin:ignore*/
.ag-concave-bottom-right {
    right: -48px !important;
    left: auto !important;
}

.ag-concave-bottom-left {
    left: -48px !important;
    right: auto !important;
}
/*rtl:end:ignore*/

/* Explicit RTL overrides so Arabic mode keeps physical directions */
html[dir="rtl"] .ag-concave-bottom-right,
[dir="rtl"] .ag-concave-bottom-right {
    right: -48px !important;
    left: auto !important;
}

html[dir="rtl"] .ag-concave-bottom-left,
[dir="rtl"] .ag-concave-bottom-left {
    left: -48px !important;
    right: auto !important;
}

@media (max-width: 991.98px) {
    .ag-concave-bottom {
        display: none;
    }
}

/* Pure White Cutout Stage: Completed to the very bottom, flush with stats floor */
.ag-hero-student-stage {
    position: relative;
    width: 100%;
    background: #ffffff !important;
    border-top-left-radius: 44px !important;
    border-top-right-radius: 44px !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-top: 1.5rem;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important; /* Completed flush to the very end of the first block */
    overflow: hidden !important;
    z-index: 6;
}

/* Student Image: Tall, crisp, sitting at the bottom of the stage */
.ag-hero-student-stage img,
.ag-hero-student-img {
    height: auto;
    max-height: 480px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    box-shadow: none !important;
    filter: none !important;
    border: none !important;
    border-radius: 0 !important;
    transition: transform 0.4s ease;
}

.ag-hero-student-stage:hover img {
    transform: translateY(-4px) scale(1.01);
}

@media (max-width: 991.98px) {
    .ag-hero-student-wrapper {
        max-width: 320px;
    }
    .ag-hero-student-stage {
        border-top-left-radius: 36px !important;
        border-top-right-radius: 36px !important;
    }
    .ag-hero-student-stage img,
    .ag-hero-student-img {
        max-height: 330px;
    }
}

/* The Stats Section Below Hero (Clean white canvas, No heavy shadows) */
.ag-stats-section {
    background: #ffffff;
    width: 100%;
    position: relative;
    z-index: 4;
    padding: 3.5rem 0 2.5rem;
    overflow-x: clip;
}

.ag-stats-grid {
    margin: 0 !important;
}

.ag-metric-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 1.25rem 1.2rem;
    box-shadow: none !important;
    border: 1px solid rgba(0, 89, 165, 0.1);
    display: flex;
    align-items: center;
    gap: 1.1rem;
    transition: transform 0.25s ease, border-color 0.25s ease;
    height: 100%;
    min-width: 0;
    overflow: hidden;
}

.ag-metric-card > div:not(.ag-metric-illustration) {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.ag-metric-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 89, 165, 0.25);
}

.ag-metric-illustration {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ag-metric-illustration svg {
    max-width: 100%;
    height: auto;
}

.ag-metric-val {
    font-size: 1.75rem;
    font-weight: 900;
    color: #003D73;
    line-height: 1.1;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ag-metric-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    margin-top: 0.2rem;
    line-height: 1.3;
    overflow-wrap: break-word;
    word-break: break-word;
}

@media (max-width: 991.98px) {
    .ag-stats-section {
        padding: 2.5rem 0 2rem;
    }
    .ag-metric-card {
        padding: 1rem 0.85rem;
        gap: 0.75rem;
        border-radius: 16px;
    }
    .ag-metric-illustration {
        width: 44px;
        height: 44px;
    }
    .ag-metric-illustration svg {
        width: 44px;
        height: 44px;
    }
    .ag-metric-val {
        font-size: 1.45rem;
    }
    .ag-metric-title {
        font-size: 0.78rem;
    }
}

@media (max-width: 575.98px) {
    .ag-stats-section {
        padding: 2rem 0 1.5rem;
    }
    .ag-metric-card {
        padding: 0.8rem 0.6rem;
        gap: 0.5rem;
        border-radius: 14px;
    }
    .ag-metric-illustration {
        width: 36px;
        height: 36px;
    }
    .ag-metric-illustration svg {
        width: 36px;
        height: 36px;
    }
    .ag-metric-val {
        font-size: 1.25rem;
    }
    .ag-metric-title {
        font-size: 0.72rem;
    }
}

@media (max-width: 380px) {
    .ag-metric-card {
        padding: 0.7rem 0.45rem;
        gap: 0.4rem;
    }
    .ag-metric-illustration {
        width: 30px;
        height: 30px;
    }
    .ag-metric-illustration svg {
        width: 30px;
        height: 30px;
    }
    .ag-metric-val {
        font-size: 1.1rem;
    }
    .ag-metric-title {
        font-size: 0.66rem;
    }
}

.ag-btn-main {
    background: #003D73 !important;
    color: #ffffff !important;
    font-size: 1.05rem !important;
    border: none !important;
    transition: all 0.25s ease !important;
}

.ag-btn-main:hover {
    background: #002b52 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 61, 115, 0.3) !important;
}

.ag-btn-sec {
    border: 1.5px solid #003D73 !important;
    color: #003D73 !important;
    font-size: 1.05rem !important;
    background: #ffffff !important;
    transition: all 0.25s ease !important;
}

.ag-btn-sec:hover {
    background: #EBF4FC !important;
    color: #003D73 !important;
    transform: translateY(-2px);
}

/* Floating Ambient Orbs (Zero-Gravity Space Vibe) */
.ag-ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.65;
    will-change: transform;
}

.ag-orb-1 {
    width: 480px;
    height: 480px;
    background: linear-gradient(135deg, rgba(0, 89, 165, 0.25), rgba(14, 165, 233, 0.18));
    top: -100px;
    right: -80px;
    animation: ag-float-ambient 18s ease-in-out infinite alternate;
}

.ag-orb-2 {
    width: 380px;
    height: 380px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(6, 182, 212, 0.15));
    bottom: -80px;
    left: 5%;
    animation: ag-float-ambient 14s ease-in-out infinite alternate-reverse;
}

.ag-orb-3 {
    width: 320px;
    height: 320px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(244, 63, 94, 0.1));
    top: 35%;
    left: 45%;
    animation: ag-float-ambient 22s ease-in-out infinite alternate;
}

@keyframes ag-float-ambient {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(35px, -45px) scale(1.08); }
    100% { transform: translate(-30px, 30px) scale(0.95); }
}

/* Subtle Grid Background Texture */
.ag-grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(to right, rgba(0, 89, 165, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 89, 165, 0.04) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: radial-gradient(ellipse at 60% 50%, black 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 60% 50%, black 20%, transparent 75%);
    pointer-events: none;
    z-index: 1;
}

/* --------------------------------------------------------------------------
   GLASSMORPHISM CORE COMPONENTS
   -------------------------------------------------------------------------- */
.ag-glass-card {
    background: var(--ag-surface-glass);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border: 1px solid var(--ag-glass-border);
    border-radius: var(--ag-radius-xl);
    box-shadow: var(--ag-shadow-floating);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.ag-glass-card:hover {
    background: var(--ag-surface-glass-hover);
    border-color: rgba(255, 255, 255, 1);
    box-shadow: 0 30px 65px -12px rgba(0, 61, 115, 0.18), 0 0 30px rgba(0, 89, 165, 0.1);
}

.ag-glass-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 1.15rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(0, 89, 165, 0.12);
    border-radius: 9999px;
    box-shadow: 0 8px 24px rgba(0, 89, 165, 0.06);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--ag-primary);
    transition: all 0.3s ease;
}

.ag-glass-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 89, 165, 0.12);
}

.ag-pulse-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: var(--ag-emerald);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: ag-pulse 2s infinite;
}

@keyframes ag-pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 9px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* --------------------------------------------------------------------------
   TYPOGRAPHY & GRADIENTS
   -------------------------------------------------------------------------- */
.ag-hero-title {
    font-size: clamp(2.2rem, 4.5vw, 3.8rem);
    font-weight: 900;
    line-height: 1.22;
    letter-spacing: -0.02em;
    color: #0f172a;
    margin-bottom: 1.5rem;
}

.ag-gradient-text {
    background: linear-gradient(135deg, #0059A5 0%, #0284c7 45%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline;
}

.ag-hero-subtitle {
    font-size: clamp(1.05rem, 1.8vw, 1.25rem);
    line-height: 1.75;
    color: #475569;
    max-width: 620px;
    margin-bottom: 2.25rem;
}

/* --------------------------------------------------------------------------
   MAGNETIC 3D BUTTONS
   -------------------------------------------------------------------------- */
.ag-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    background: linear-gradient(135deg, #0059A5, #004580);
    color: #ffffff !important;
    font-weight: 800;
    font-size: 1.05rem;
    padding: 0.95rem 2rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 28px -6px rgba(0, 89, 165, 0.45), 0 0 0 1px rgba(0, 89, 165, 0.1);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none !important;
    position: relative;
    overflow: hidden;
}

.ag-btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: skewX(-20deg);
    transition: 0.75s;
}

.ag-btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 18px 36px -6px rgba(0, 89, 165, 0.6);
    color: #ffffff !important;
}

.ag-btn-primary:hover::after {
    left: 140%;
}

.ag-btn-glass {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #0059A5 !important;
    font-weight: 800;
    font-size: 1.02rem;
    padding: 0.92rem 1.85rem;
    border-radius: 9999px;
    border: 1px solid rgba(0, 89, 165, 0.16);
    box-shadow: 0 8px 24px rgba(0, 89, 165, 0.08);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none !important;
}

.ag-btn-glass:hover {
    background: #ffffff;
    transform: translateY(-3px);
    border-color: #0059A5;
    box-shadow: 0 14px 30px rgba(0, 89, 165, 0.16);
    color: #004580 !important;
}

/* --------------------------------------------------------------------------
   3D SPATIAL HERO COMPOSITION (ISOMETRIC EXPERIENCE)
   -------------------------------------------------------------------------- */
.ag-spatial-stage {
    position: relative;
    width: 100%;
    min-height: 520px;
    perspective: 1200px;
    transform-style: preserve-3d;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
}

.ag-spatial-container {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

/* Floating Elements with Independent Natural Physics */
.ag-float-1 {
    animation: ag-float-card-1 6.5s ease-in-out infinite alternate;
}

.ag-float-2 {
    animation: ag-float-card-2 8s ease-in-out infinite alternate-reverse;
}

.ag-float-3 {
    animation: ag-float-card-3 5.5s ease-in-out infinite alternate;
}

@keyframes ag-float-card-1 {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(0.8deg); }
    100% { transform: translateY(-4px) rotate(-0.5deg); }
}

@keyframes ag-float-card-2 {
    0% { transform: translateY(0px) translateZ(40px); }
    50% { transform: translateY(-8px) translateZ(45px); }
    100% { transform: translateY(-3px) translateZ(40px); }
}

@keyframes ag-float-card-3 {
    0% { transform: translateY(0px) translateZ(40px); }
    50% { transform: translateY(8px) translateZ(45px); }
    100% { transform: translateY(3px) translateZ(40px); }
}

/* Main Showcase Card in 3D Stage */
.ag-hero-card-main {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(24px) saturate(190%);
    -webkit-backdrop-filter: blur(24px) saturate(190%);
    border: 1.5px solid rgba(255, 255, 255, 0.98);
    border-radius: var(--ag-radius-2xl);
    box-shadow: 0 30px 60px -15px rgba(0, 61, 115, 0.18), 0 0 35px rgba(0, 89, 165, 0.08);
    padding: 1.75rem;
    position: relative;
    z-index: 2;
    transform: translateZ(20px);
    transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
}

/* Satellite Floating Mini Cards in 3D Z-Space (Sleek Pills) */
.ag-satellite-badge {
    position: absolute;
    z-index: 10;
    padding: 0.65rem 1.25rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1.5px solid #ffffff;
    box-shadow: 0 16px 36px -6px rgba(0, 61, 115, 0.22), 0 0 0 1px rgba(0, 89, 165, 0.08);
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    width: max-content;
    max-width: 90%;
    white-space: nowrap;
    will-change: transform;
    pointer-events: auto;
}

.ag-sat-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.ag-sat-sub {
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.2;
}

/* Satellite positions: placed away from title to prevent any overlap */
.ag-satellite-top-left,
.ag-satellite-top {
    top: -38px;
    left: 15px;
    right: auto;
}
[dir="rtl"] .ag-satellite-top,
html[lang="ar"] .ag-satellite-top {
    left: 15px !important;
    right: auto !important;
}
[dir="ltr"] .ag-satellite-top {
    right: 15px !important;
    left: auto !important;
}

.ag-satellite-bottom-right,
.ag-satellite-bottom {
    bottom: -38px;
    right: 15px;
    left: auto;
}
[dir="rtl"] .ag-satellite-bottom,
html[lang="ar"] .ag-satellite-bottom {
    right: 15px !important;
    left: auto !important;
}
[dir="ltr"] .ag-satellite-bottom {
    left: 15px !important;
    right: auto !important;
}

.ag-satellite-mid-left {
    top: 55%;
    right: -35px;
}

/* --------------------------------------------------------------------------
   BENTO GRID SECTION ("THE MAHARA ECOSYSTEM")
   -------------------------------------------------------------------------- */
.ag-section {
    position: relative;
    padding: 6.5rem 0;
    z-index: 2;
}

.ag-section-badge {
    display: inline-block;
    padding: 0.4rem 1.1rem;
    background: rgba(0, 89, 165, 0.08);
    border: 1px solid rgba(0, 89, 165, 0.15);
    border-radius: 9999px;
    color: var(--ag-primary);
    font-weight: 800;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.ag-section-heading {
    font-size: clamp(2rem, 3.5vw, 2.9rem);
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.ag-section-lead {
    font-size: 1.15rem;
    color: #64748b;
    max-width: 650px;
    margin: 0 auto 3.5rem;
    line-height: 1.7;
}

.ag-bento-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.25rem;
    position: relative;
    border-radius: var(--ag-radius-xl);
    transform-style: preserve-3d;
    will-change: transform;
}

.ag-bento-icon-wrapper {
    width: 68px;
    height: 68px;
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.ag-bento-card:hover .ag-bento-icon-wrapper {
    transform: scale(1.08) translateY(-3px);
    box-shadow: 0 16px 30px rgba(0, 61, 115, 0.12);
}

.ag-icon-blue {
    background: linear-gradient(135deg, rgba(0, 89, 165, 0.15), rgba(14, 165, 233, 0.15));
    color: var(--ag-primary);
    border: 1px solid rgba(0, 89, 165, 0.2);
}

.ag-icon-emerald {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.15));
    color: var(--ag-emerald);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.ag-icon-amber {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.15));
    color: var(--ag-amber);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.ag-icon-purple {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(109, 40, 217, 0.15));
    color: var(--ag-purple);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* --------------------------------------------------------------------------
   INTERACTIVE 3D COURSE & TRACK CARDS
   -------------------------------------------------------------------------- */
.ag-course-card {
    background: #ffffff;
    border: 1px solid rgba(0, 89, 165, 0.1);
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 61, 115, 0.05);
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ag-course-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 89, 165, 0.3);
    box-shadow: 0 25px 50px -10px rgba(0, 61, 115, 0.15);
}

.ag-course-thumb {
    height: 180px;
    position: relative;
    overflow: hidden;
    background: #0f172a;
    display: block;
    text-decoration: none;
}

.ag-course-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.ag-course-card:hover .ag-course-thumb img {
    transform: scale(1.08);
}

/* Elegant Educational Course Placeholder (When no image is uploaded) */
.ag-course-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0059A5 100%);
    position: relative;
    overflow: hidden;
}

.ag-course-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
    background-size: 16px 16px;
    opacity: 0.75;
}

.ag-course-placeholder-emblem {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.65rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2;
}

.ag-course-card:hover .ag-course-placeholder-emblem {
    transform: scale(1.15) rotate(6deg);
    background: rgba(255, 255, 255, 0.2);
}

.ag-course-cat-pill {
    position: absolute;
    top: 10px;
    right: 10px;
    left: auto;
    z-index: 4;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 9999px;
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 800;
    color: #0f172a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    max-width: 58%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

[dir="rtl"] .ag-course-cat-pill,
html[lang="ar"] .ag-course-cat-pill {
    right: 10px !important;
    left: auto !important;
}

[dir="ltr"] .ag-course-cat-pill {
    left: 10px !important;
    right: auto !important;
}

.ag-course-sub-pill {
    position: absolute;
    top: 10px;
    left: 10px;
    right: auto;
    z-index: 4;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    border-radius: 9999px;
    padding: 0.3rem 0.75rem;
    font-size: 0.72rem;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

[dir="rtl"] .ag-course-sub-pill,
html[lang="ar"] .ag-course-sub-pill {
    left: 10px !important;
    right: auto !important;
}

[dir="ltr"] .ag-course-sub-pill {
    right: 10px !important;
    left: auto !important;
}

/* --------------------------------------------------------------------------
   FLOATING STATS / METRIC COUNTERS
   -------------------------------------------------------------------------- */
.ag-stats-strip {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(248, 250, 252, 0.95));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: var(--ag-radius-2xl);
    box-shadow: var(--ag-shadow-floating);
    padding: 2.75rem 2rem;
    margin-top: -3.5rem;
    position: relative;
    z-index: 10;
}

.ag-stat-item {
    text-align: center;
    position: relative;
}

.ag-stat-number {
    font-size: clamp(2.2rem, 3.5vw, 3.2rem);
    font-weight: 900;
    background: linear-gradient(135deg, #0059A5, #0284c7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    margin-bottom: 0.4rem;
}

.ag-stat-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #64748b;
}

/* --------------------------------------------------------------------------
   PARENT JOURNEY INTERACTIVE WALKTHROUGH
   -------------------------------------------------------------------------- */
.ag-step-card {
    background: #ffffff;
    border: 1px solid rgba(0, 89, 165, 0.08);
    border-radius: var(--ag-radius-xl);
    padding: 2.25rem 1.75rem;
    box-shadow: 0 10px 25px rgba(0, 61, 115, 0.04);
    position: relative;
    transition: all 0.3s ease;
    text-align: center;
    height: 100%;
}

.ag-step-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 61, 115, 0.1);
    border-color: rgba(0, 89, 165, 0.25);
}

.ag-step-illustration-wrapper {
    position: relative;
    width: 68px;
    height: 68px;
    margin: 0 auto 1.25rem;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.ag-step-card:hover .ag-step-illustration-wrapper {
    transform: scale(1.1) translateY(-3px);
}

.ag-step-badge-pill {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #003D73;
    color: #FFC20E;
    font-weight: 900;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #FFFFFF;
    box-shadow: 0 4px 10px rgba(0, 61, 115, 0.25);
}

.ag-step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0059A5, #0ea5e9);
    color: #ffffff;
    font-weight: 900;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 20px rgba(0, 89, 165, 0.3);
}

.ag-faq-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   TESTIMONIALS / WALL OF SUCCESS
   -------------------------------------------------------------------------- */
.ag-testimonial-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: var(--ag-radius-xl);
    padding: 2rem;
    box-shadow: 0 12px 30px rgba(0, 61, 115, 0.06);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ag-testimonial-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 45px rgba(0, 61, 115, 0.12);
}

.ag-stars {
    color: #f59e0b;
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   PORTAL MEGA CALLOUT (SPATIAL GLOW CTA)
   -------------------------------------------------------------------------- */
.ag-cta-banner {
    background: linear-gradient(135deg, #003d73 0%, #0059a5 50%, #0284c7 100%);
    border-radius: var(--ag-radius-2xl);
    padding: 4.5rem 2.5rem;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 30px 70px -15px rgba(0, 61, 115, 0.45);
}

.ag-cta-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.ag-cta-banner::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -15%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   ACCESSIBILITY & REDUCED MOTION
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .ag-ambient-orb, .ag-float-1, .ag-float-2, .ag-float-3 {
        animation: none !important;
    }
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .mahara-hero,
    .antigravity-hero {
        padding: 0 !important;
        text-align: center;
    }
    .ag-hero-subtitle {
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
    }
    .ag-spatial-stage {
        margin-top: 2rem;
        min-height: auto;
        padding: 1rem 0.5rem;
    }
    .ag-spatial-container {
        max-width: 100%;
    }
    .ag-stats-strip {
        margin-top: 2rem;
    }
    .ag-satellite-badge {
        position: static !important;
        margin: 0.65rem auto;
        transform: none !important;
        width: fit-content;
        max-width: 100%;
        box-shadow: 0 8px 20px rgba(0, 61, 115, 0.1);
    }
    .ag-satellite-top-left,
    .ag-satellite-top {
        margin-bottom: 0.85rem;
    }
    .ag-satellite-bottom-right,
    .ag-satellite-bottom {
        margin-top: 0.85rem;
    }
}

