/* ============================================================
   Eduglobal software — Agency Design System
   ------------------------------------------------------------
   Light, Material-3 flavoured design system for the small-shop
   website agency site. Hand-written CSS on purpose: the design
   was handed over as a Tailwind-CDN prototype, but shipping the
   CDN build to production would mean a render-blocking script
   compiling utilities in the browser on every page view. The
   prototype's `tailwind.config` tokens are reproduced 1:1 as the
   custom properties below, so the rendered result matches while
   the site keeps serving one cached stylesheet.

   Loads AFTER assets/css/eduglobal.css, so the token block here
   also re-points the legacy dark LMS variables at the light
   palette — see "LEGACY LMS BRIDGE" at the bottom of the file.

   @package EduGlobal
   @since 2.0.0
   ============================================================ */

/* ─── Design tokens (from the prototype's tailwind.config) ─── */
:root {
    /* Primary */
    --ega-primary: #00288e;
    --ega-on-primary: #ffffff;
    --ega-primary-container: #1e40af;
    --ega-on-primary-container: #a8b8ff;

    /* Secondary — the orange call-to-action family */
    --ega-secondary: #9d4300;
    --ega-on-secondary: #ffffff;
    --ega-secondary-container: #fd761a;
    --ega-on-secondary-container: #5c2400;

    /* Tertiary */
    --ega-tertiary: #25354a;
    --ega-on-tertiary: #ffffff;

    /* Surfaces */
    --ega-background: #f7f9fb;
    --ega-on-background: #191c1e;
    --ega-surface: #f7f9fb;
    --ega-on-surface: #191c1e;
    --ega-surface-variant: #e0e3e5;
    --ega-on-surface-variant: #444653;
    --ega-surface-dim: #d8dadc;
    --ega-surface-container-lowest: #ffffff;
    --ega-surface-container-low: #f2f4f6;
    --ega-surface-container: #eceef0;
    --ega-surface-container-high: #e6e8ea;
    --ega-surface-container-highest: #e0e3e5;

    /* Outlines + status */
    --ega-outline: #757684;
    --ega-outline-variant: #c4c5d5;
    --ega-error: #ba1a1a;
    --ega-on-error: #ffffff;
    --ega-error-container: #ffdad6;
    --ega-on-error-container: #93000a;
    --ega-success: #1b6b3a;

    /* Typography */
    --ega-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Radius scale — note `full` is 12px in the handover config,
       not a pill; kept faithful so shapes match the prototype. */
    --ega-radius: 2px;
    --ega-radius-lg: 4px;
    --ega-radius-xl: 8px;
    --ega-radius-full: 12px;

    /* Spacing scale */
    --ega-base: 8px;
    --ega-gutter: 24px;
    --ega-margin-mobile: 16px;
    --ega-section-gap: 80px;
    --ega-container-max: 1200px;
    --ega-header-height: 90px;

    /* Elevation */
    --ega-shadow-sm: 0 1px 2px rgba(0, 40, 142, 0.06), 0 1px 3px rgba(0, 40, 142, 0.08);
    --ega-ambient-shadow: 0 10px 25px -5px rgba(0, 40, 142, 0.1), 0 8px 10px -6px rgba(0, 40, 142, 0.1);

    /* Motion */
    --ega-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --ega-transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Base ─── */
body.eduglobal-theme {
    background: var(--ega-background) !important;
    color: var(--ega-on-background);
    font-family: var(--ega-font);
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.eduglobal-theme ::selection {
    background: var(--ega-primary-container);
    color: var(--ega-on-primary-container);
}

.eduglobal-theme main,
.eduglobal-theme .wp-block-group {
    color: var(--ega-on-background);
}

/* Material Symbols — the prototype's icon font */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* ─── Type scale ─── */
.ega-display {
    font-size: 32px;
    line-height: 40px;
    letter-spacing: -0.01em;
    font-weight: 700;
    margin: 0;
}

.ega-headline {
    font-size: 24px;
    line-height: 32px;
    font-weight: 600;
    margin: 0;
}

.ega-title {
    font-size: 20px;
    line-height: 28px;
    font-weight: 600;
    margin: 0;
}

.ega-body-lg {
    font-size: 18px;
    line-height: 28px;
    font-weight: 400;
}

.ega-label {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.05em;
    font-weight: 600;
}

@media (min-width: 768px) {
    .ega-display {
        font-size: 48px;
        line-height: 56px;
        letter-spacing: -0.02em;
    }
}

/* ─── Layout primitives ─── */
.ega-container {
    max-width: var(--ega-container-max);
    margin: 0 auto;
    padding: 0 var(--ega-margin-mobile);
    width: 100%;
}

@media (min-width: 768px) {
    .ega-container {
        padding: 0 32px;
    }
}

.ega-section {
    padding: var(--ega-section-gap) 0;
}

.ega-main {
    /* Offset for the fixed header. */
    padding-top: var(--ega-header-height);
}

.ega-ambient-shadow {
    box-shadow: var(--ega-ambient-shadow);
}

.ega-glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ─── Buttons ─── */
.ega-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--ega-base);
    font-family: var(--ega-font);
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.05em;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--ega-radius-lg);
    padding: 8px 24px;
    cursor: pointer;
    transition: background-color var(--ega-transition), color var(--ega-transition),
                border-color var(--ega-transition), box-shadow var(--ega-transition);
    white-space: nowrap;
}

.ega-btn .material-symbols-outlined {
    font-size: 20px;
}

.ega-btn-primary {
    background: var(--ega-secondary-container);
    color: var(--ega-on-secondary-container);
    box-shadow: var(--ega-shadow-sm);
}

.ega-btn-primary:hover,
.ega-btn-primary:focus-visible {
    background: var(--ega-secondary);
    color: var(--ega-on-secondary);
}

.ega-btn-outline {
    background: var(--ega-surface-container-lowest);
    color: var(--ega-primary);
    border-color: var(--ega-primary);
}

.ega-btn-outline:hover,
.ega-btn-outline:focus-visible {
    background: var(--ega-surface-container-low);
}

.ega-btn-filled {
    background: var(--ega-primary);
    color: var(--ega-on-primary);
}

.ega-btn-filled:hover,
.ega-btn-filled:focus-visible {
    background: var(--ega-primary-container);
}

.ega-btn-lg {
    padding: 16px 32px;
    box-shadow: var(--ega-ambient-shadow);
}

.ega-btn-outline.ega-btn-lg {
    box-shadow: none;
}

.ega-btn-block {
    width: 100%;
}

.ega-btn:focus-visible {
    outline: 2px solid var(--ega-primary);
    outline-offset: 2px;
}

/* ─── Eyebrow badge ─── */
.ega-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--ega-base);
    padding: 4px 12px;
    border-radius: var(--ega-radius-full);
    background: rgba(0, 40, 142, 0.1);
    border: 1px solid rgba(0, 40, 142, 0.2);
    color: var(--ega-primary);
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.ega-badge .material-symbols-outlined {
    font-size: 16px;
}

/* ============================================================
   TOP NAV BAR
   ============================================================ */
.ega-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 50;
    background: var(--ega-surface-container-lowest);
    border-bottom: 1px solid var(--ega-outline-variant);
    box-shadow: var(--ega-shadow-sm);
}

.ega-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--ega-gutter);
    max-width: var(--ega-container-max);
    margin: 0 auto;
    padding: 16px var(--ega-margin-mobile);
}

@media (min-width: 768px) {
    .ega-header-inner {
        padding: 16px 32px;
    }
}

.ega-logo {
    display: inline-flex;
    align-items: center;
    gap: var(--ega-base);
    font-size: 24px;
    line-height: 32px;
    font-weight: 700;
    color: var(--ega-primary);
    text-decoration: none;
}

.ega-logo img {
    max-height: 40px;
    width: auto;
}

.ega-nav {
    display: none;
    align-items: center;
    gap: var(--ega-gutter);
    list-style: none;
    margin: 0;
    padding: 0;
}

.ega-nav a {
    display: block;
    padding: 8px 12px;
    border-radius: var(--ega-radius);
    color: var(--ega-on-surface-variant);
    text-decoration: none;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.05em;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: color var(--ega-transition), background-color var(--ega-transition);
}

.ega-nav a:hover,
.ega-nav a:focus-visible {
    color: var(--ega-primary);
    background: var(--ega-surface-container-low);
}

.ega-nav a.active {
    color: var(--ega-primary);
    border-bottom-color: var(--ega-secondary-container);
}

.ega-header-actions {
    display: none;
    align-items: center;
    gap: var(--ega-base);
}

/* Hamburger — reuses the legacy .eg-nav-toggle markup contract so
   the existing initMobileNav() in eduglobal.js keeps driving it. */
.ega-header .eg-nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.ega-header .eg-nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--ega-primary);
    border-radius: var(--ega-radius);
    transition: transform var(--ega-transition), opacity var(--ega-transition);
}

.ega-header .eg-nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.ega-header .eg-nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.ega-header .eg-nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 768px) {
    .ega-nav,
    .ega-header-actions {
        display: flex;
    }

    .ega-header .eg-nav-toggle {
        display: none;
    }
}

/* Mobile drawer — .mobile-open is toggled by initMobileNav().
   The opened panels are full-width rows in the header's normal flow, so
   the fixed header simply grows downward over the page. Deliberately not
   absolutely positioned: the actions group varies in height (a logged-in
   admin gets two extra buttons), and any fixed offset would misplace it. */
@media (max-width: 767px) {
    .ega-header-inner {
        flex-wrap: wrap;
    }

    /* The toggle is last in the DOM (so it comes after the nav for keyboard
       users), but must stay on the top row once the panels wrap below. */
    .ega-logo { order: 1; }
    .ega-header .eg-nav-toggle { order: 2; }
    .ega-nav { order: 3; }
    .ega-header-actions { order: 4; }

    .ega-nav.mobile-open,
    .ega-header-actions.mobile-open {
        display: flex;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: var(--ega-base);
        margin-top: var(--ega-margin-mobile);
        border-top: 1px solid var(--ega-outline-variant);
        padding-top: var(--ega-margin-mobile);
    }

    .ega-header-actions.mobile-open {
        margin-top: 0;
        border-top: 0;
        padding-top: 0;
    }

    .ega-nav.mobile-open a {
        padding: 12px;
        border-bottom: 1px solid var(--ega-outline-variant);
    }

    .ega-header-actions.mobile-open .ega-btn {
        justify-content: center;
        padding-top: 12px;
        padding-bottom: 12px;
    }
}

/* ============================================================
   HERO
   ============================================================ */
.ega-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 80vh;
    overflow: hidden;
    background: var(--ega-surface);
    padding: var(--ega-section-gap) 0;
}

.ega-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.ega-hero-bg-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.2;
}

.ega-hero-bg-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        var(--ega-surface) 0%,
        rgba(247, 249, 251, 0.9) 50%,
        rgba(247, 249, 251, 0.4) 100%
    );
}

.ega-hero-inner {
    position: relative;
    z-index: 1;
}

.ega-hero-copy {
    max-width: 672px;
}

.ega-hero .ega-badge {
    margin-bottom: var(--ega-gutter);
}

.ega-hero h1 {
    color: var(--ega-on-surface);
    margin: 0 0 var(--ega-gutter);
}

.ega-hero h1 .ega-accent {
    color: var(--ega-primary);
}

.ega-hero-sub {
    color: var(--ega-on-surface-variant);
    max-width: 576px;
    margin: 0 0 32px;
}

.ega-hero-actions {
    display: flex;
    flex-direction: column;
    gap: var(--ega-margin-mobile);
}

@media (min-width: 640px) {
    .ega-hero-actions {
        flex-direction: row;
    }
}

.ega-hero-proof {
    display: flex;
    align-items: center;
    gap: var(--ega-margin-mobile);
    margin-top: 32px;
    color: var(--ega-on-surface-variant);
    font-size: 14px;
    line-height: 20px;
}

.ega-hero-proof p {
    margin: 0;
}

.ega-avatar-stack {
    display: flex;
}

.ega-avatar-stack img {
    width: 32px;
    height: 32px;
    border-radius: var(--ega-radius-full);
    border: 2px solid var(--ega-surface);
    object-fit: cover;
}

.ega-avatar-stack img + img {
    margin-left: -8px;
}

/* ============================================================
   BENTO GRID — services
   ============================================================ */
.ega-section-head {
    text-align: center;
    margin-bottom: 64px;
}

.ega-section-head h2 {
    color: var(--ega-on-surface);
    margin: 0 0 var(--ega-margin-mobile);
}

.ega-section-head p {
    color: var(--ega-on-surface-variant);
    max-width: 672px;
    margin: 0 auto;
}

.ega-surface-section {
    background: var(--ega-surface-container-lowest);
    position: relative;
    z-index: 1;
}

.ega-bento {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--ega-gutter);
}

@media (min-width: 768px) {
    .ega-bento {
        grid-template-columns: repeat(3, 1fr);
    }

    .ega-bento-wide {
        grid-column: span 2;
        flex-direction: row;
        align-items: center;
    }
}

.ega-card {
    background: var(--ega-surface-container-low);
    border: 1px solid var(--ega-outline-variant);
    border-radius: var(--ega-radius-xl);
    padding: 32px;
    box-shadow: var(--ega-ambient-shadow);
    transition: transform var(--ega-transition-slow);
}

.ega-card:hover {
    transform: translateY(-4px);
}

.ega-card h3 {
    color: var(--ega-on-surface);
    margin: 0 0 var(--ega-base);
}

.ega-card p {
    color: var(--ega-on-surface-variant);
    margin: 0;
}

.ega-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    margin-bottom: var(--ega-gutter);
    border-radius: var(--ega-radius-full);
    background: rgba(0, 40, 142, 0.1);
    color: var(--ega-primary);
}

.ega-bento-wide {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--ega-gutter);
}

.ega-bento-wide .ega-card-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 0;
}

.ega-bento-wide .ega-card-icon .material-symbols-outlined {
    font-size: 32px;
}

@media (min-width: 640px) {
    .ega-bento-wide {
        flex-direction: row;
        align-items: center;
    }
}

/* ============================================================
   PRICING
   ============================================================ */
.ega-pricing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--ega-gutter);
    align-items: stretch;
}

@media (min-width: 768px) {
    .ega-pricing-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.ega-plan {
    display: flex;
    flex-direction: column;
    background: var(--ega-surface-container-lowest);
    border: 1px solid var(--ega-outline-variant);
    border-radius: var(--ega-radius-xl);
    padding: 32px;
    box-shadow: var(--ega-shadow-sm);
    transition: transform var(--ega-transition-slow), box-shadow var(--ega-transition-slow);
}

.ega-plan:hover {
    transform: translateY(-4px);
    box-shadow: var(--ega-ambient-shadow);
}

.ega-plan-featured {
    border-color: var(--ega-primary);
    box-shadow: var(--ega-ambient-shadow);
}

.ega-plan-flag {
    align-self: flex-start;
    margin-bottom: var(--ega-margin-mobile);
    padding: 4px 12px;
    border-radius: var(--ega-radius-full);
    background: var(--ega-secondary-container);
    color: var(--ega-on-secondary-container);
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Hidden on non-featured cards, but it still occupies the row so the
   three cards line up. */
.ega-plan-flag-empty {
    visibility: hidden;
}

.ega-plan h3 {
    color: var(--ega-on-surface);
    margin: 0 0 var(--ega-base);
}

.ega-plan-desc {
    color: var(--ega-on-surface-variant);
    margin: 0 0 var(--ega-gutter);
}

.ega-plan-price {
    display: flex;
    align-items: baseline;
    gap: var(--ega-base);
    margin-bottom: var(--ega-gutter);
    padding-bottom: var(--ega-gutter);
    border-bottom: 1px solid var(--ega-outline-variant);
}

.ega-plan-amount {
    font-size: 40px;
    line-height: 48px;
    letter-spacing: -0.02em;
    font-weight: 700;
    color: var(--ega-primary);
}

.ega-plan-unit {
    color: var(--ega-on-surface-variant);
    font-size: 14px;
    line-height: 20px;
}

.ega-plan-features {
    list-style: none;
    margin: 0 0 32px;
    padding: 0;
    display: grid;
    gap: 12px;
    flex-grow: 1;
}

.ega-plan-features li {
    display: flex;
    align-items: flex-start;
    gap: var(--ega-base);
    color: var(--ega-on-surface-variant);
}

.ega-plan-features .material-symbols-outlined {
    font-size: 20px;
    color: var(--ega-primary);
    flex-shrink: 0;
}

.ega-pricing-note {
    margin: 32px 0 0;
    text-align: center;
    color: var(--ega-on-surface-variant);
    font-size: 14px;
    line-height: 20px;
}

/* ============================================================
   CONTACT
   ============================================================ */
.ega-contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: start;
}

@media (min-width: 900px) {
    .ega-contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.ega-contact-intro h2 {
    color: var(--ega-on-surface);
    margin: var(--ega-margin-mobile) 0;
}

.ega-contact-intro > p {
    color: var(--ega-on-surface-variant);
    margin: 0 0 32px;
}

.ega-contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--ega-margin-mobile);
}

.ega-contact-list a,
.ega-contact-list span.ega-contact-text {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ega-on-surface);
    text-decoration: none;
    font-weight: 600;
}

.ega-contact-list a:hover {
    color: var(--ega-primary);
}

.ega-contact-list .ega-card-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 0;
}

.ega-contact-list .ega-card-icon .material-symbols-outlined {
    font-size: 20px;
}

/* Form */
.ega-form {
    background: var(--ega-surface-container-lowest);
    border: 1px solid var(--ega-outline-variant);
    border-radius: var(--ega-radius-xl);
    padding: 32px;
    box-shadow: var(--ega-ambient-shadow);
}

.ega-form h3 {
    color: var(--ega-on-surface);
    margin: 0 0 var(--ega-gutter);
}

.ega-form-row {
    margin-bottom: var(--ega-margin-mobile);
}

.ega-form label {
    display: block;
    margin-bottom: 4px;
    color: var(--ega-on-surface-variant);
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.ega-form input,
.ega-form select,
.ega-form textarea {
    width: 100%;
    padding: 12px var(--ega-margin-mobile);
    background: var(--ega-surface-container-low);
    border: 1px solid var(--ega-outline);
    border-radius: var(--ega-radius-lg);
    color: var(--ega-on-surface);
    font-family: var(--ega-font);
    font-size: 16px;
    line-height: 24px;
    transition: border-color var(--ega-transition), box-shadow var(--ega-transition);
}

.ega-form input::placeholder,
.ega-form textarea::placeholder {
    color: var(--ega-outline);
}

.ega-form input:focus,
.ega-form select:focus,
.ega-form textarea:focus {
    outline: none;
    border-color: var(--ega-primary);
    box-shadow: 0 0 0 3px rgba(0, 40, 142, 0.12);
}

.ega-form textarea {
    resize: vertical;
    min-height: 96px;
}

.ega-form-status {
    margin: var(--ega-margin-mobile) 0 0;
    min-height: 20px;
    font-size: 14px;
    line-height: 20px;
    color: var(--ega-on-surface-variant);
}

.ega-form-status.success {
    color: var(--ega-success);
}

.ega-form-status.error {
    color: var(--ega-error);
}

/* ============================================================
   FOOTER
   ============================================================ */
.ega-footer {
    background: var(--ega-primary);
    color: var(--ega-on-primary);
    width: 100%;
}

.ega-footer-inner {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    max-width: var(--ega-container-max);
    margin: 0 auto;
    padding: 48px var(--ega-margin-mobile);
    text-align: center;
}

@media (min-width: 768px) {
    .ega-footer-inner {
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: 48px 32px;
    }
}

.ega-footer-brand-name {
    font-size: 24px;
    line-height: 32px;
    font-weight: 700;
    color: var(--ega-on-primary);
    text-decoration: none;
    display: block;
    margin-bottom: var(--ega-base);
}

.ega-footer-brand p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
}

.ega-footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--ega-gutter);
}

.ega-footer-nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.05em;
    font-weight: 600;
    transition: color var(--ega-transition);
}

.ega-footer-nav a:hover,
.ega-footer-nav a:focus-visible {
    color: var(--ega-secondary-container);
}


/* ============================================================
   SPECIFICITY GUARD
   ------------------------------------------------------------
   The legacy stylesheet paints every link with the brand colour via
   `.eduglobal-theme a` — specificity (0,1,1), which outranks a plain
   class selector like `.ega-btn` (0,1,0). Any agency component whose
   colour lands on an <a> therefore has to be element-qualified to win
   the tie. (Rules already written as `.ega-nav a`, `.ega-footer-nav a`
   and `.ega-contact-list a` are (0,1,1) and win on load order.)

   Without this, the footer brand name renders blue-on-blue and the CTA
   buttons lose their label colour.
   ============================================================ */
a.ega-logo {
    color: var(--ega-primary);
}

a.ega-btn-primary {
    color: var(--ega-on-secondary-container);
}

a.ega-btn-primary:hover,
a.ega-btn-primary:focus-visible {
    color: var(--ega-on-secondary);
}

a.ega-btn-outline,
a.ega-btn-outline:hover,
a.ega-btn-outline:focus-visible {
    color: var(--ega-primary);
}

a.ega-btn-filled,
a.ega-btn-filled:hover,
a.ega-btn-filled:focus-visible {
    color: var(--ega-on-primary);
}

a.ega-footer-brand-name,
a.ega-footer-brand-name:hover {
    color: var(--ega-on-primary);
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
    .ega-card:hover,
    .ega-plan:hover {
        transform: none;
    }

    .ega-btn,
    .ega-card,
    .ega-plan,
    .ega-nav a {
        transition: none;
    }
}

/* ============================================================
   LEGACY LMS BRIDGE
   ------------------------------------------------------------
   The course catalogue (/courses/), single course pages
   (/course/{slug}/) and the student dashboard still render from
   the original templates and the original `eg-*` stylesheet,
   which was designed for the dark orange brand. Rather than
   fork 2,000 lines of component CSS, this block re-points that
   stylesheet's custom properties at the light agency palette —
   every var-driven rule follows automatically — and then patches
   only the handful of rules that hardcoded dark values.

   Delete this block if/when those templates are rebuilt on the
   .ega-* system.
   ============================================================ */
:root {
    /* Brand */
    --eg-primary: var(--ega-primary);
    --eg-primary-light: var(--ega-primary-container);
    --eg-primary-dark: #001453;
    --eg-primary-glow: rgba(0, 40, 142, 0.15);

    /* Backgrounds — inverted from dark to the light surface ramp */
    --eg-bg-dark: var(--ega-background);
    --eg-bg-section: var(--ega-surface-container-lowest);
    --eg-bg-card: var(--ega-surface-container-low);
    --eg-bg-card-hover: var(--ega-surface-container);
    --eg-bg-glass: var(--ega-surface-container-lowest);
    --eg-bg-glass-hover: var(--ega-surface-container-low);

    /* Text */
    --eg-text-primary: var(--ega-on-surface);
    --eg-text-secondary: var(--ega-on-surface-variant);
    --eg-text-muted: var(--ega-outline);

    /* Borders */
    --eg-border: var(--ega-outline-variant);
    --eg-border-hover: rgba(0, 40, 142, 0.4);

    /* Gradients */
    --eg-gradient-primary: linear-gradient(135deg, #00288e 0%, #1e40af 100%);
    --eg-gradient-dark: linear-gradient(180deg, #f7f9fb 0%, #ffffff 100%);
    --eg-gradient-card: linear-gradient(145deg, #ffffff 0%, #f2f4f6 100%);
    --eg-gradient-hero-overlay: linear-gradient(180deg, rgba(247,249,251,0.85) 0%, rgba(247,249,251,0.6) 40%, rgba(247,249,251,0.95) 100%);

    /* Shadows — soft blue ambient instead of heavy black */
    --eg-shadow-sm: 0 1px 3px rgba(0, 40, 142, 0.08);
    --eg-shadow-md: 0 10px 25px -5px rgba(0, 40, 142, 0.1);
    --eg-shadow-lg: 0 20px 40px -10px rgba(0, 40, 142, 0.15);
    --eg-shadow-glow: 0 0 32px rgba(0, 40, 142, 0.12);

    /* Typography — one family across the whole site now */
    --eg-font-heading: 'Inter', sans-serif;
    --eg-font-body: 'Inter', sans-serif;

    /* Layout — the fixed agency header is 90px, not 80px */
    --eg-navbar-height: 90px;
}

/* Legacy pages already offset themselves by --eg-navbar-height, which the
   token block above bumped from 80px to the agency header's 90px — so no
   extra padding is added here. */

/* Rules below hardcoded white text / dark panels; restated for light. */
.eduglobal-theme .eg-section-header h2,
.eduglobal-theme .eg-dashboard-header h1,
.eduglobal-theme .eg-course-hero h1,
.eduglobal-theme .eg-course-about h2,
.eduglobal-theme .eg-curriculum h2 {
    color: var(--ega-on-surface);
}

.eduglobal-theme .eg-curriculum-module,
.eduglobal-theme .eg-course-buybox,
.eduglobal-theme .eg-player-shell,
.eduglobal-theme .eg-dash-stat-card,
.eduglobal-theme .eg-progress-track {
    background: var(--ega-surface-container-lowest);
    border-color: var(--ega-outline-variant);
}

.eduglobal-theme .eg-progress-track {
    background: var(--ega-surface-container-high);
}

.eduglobal-theme .eg-progress-fill {
    background: var(--ega-primary);
}

.eduglobal-theme .eg-curriculum-module li {
    border-bottom-color: var(--ega-outline-variant);
}

.eduglobal-theme .eg-curriculum-module li a:hover {
    background: rgba(0, 40, 142, 0.06);
    color: var(--ega-primary);
}

/* Buttons on legacy pages adopt the agency CTA colours. */
.eduglobal-theme .eg-btn-primary {
    background: var(--ega-secondary-container);
    color: var(--ega-on-secondary-container);
    border-radius: var(--ega-radius-lg);
}

.eduglobal-theme .eg-btn-primary:hover {
    background: var(--ega-secondary);
    color: var(--ega-on-secondary);
}

.eduglobal-theme .eg-btn-outline {
    background: var(--ega-surface-container-lowest);
    color: var(--ega-primary);
    border: 1px solid var(--ega-primary);
    border-radius: var(--ega-radius-lg);
}

.eduglobal-theme .eg-btn-outline:hover {
    background: var(--ega-surface-container-low);
    color: var(--ega-primary);
}

/* Section tags / badges. */
.eduglobal-theme .eg-section-tag,
.eduglobal-theme .eg-course-card-badge,
.eduglobal-theme .eg-live-badge {
    background: rgba(0, 40, 142, 0.1);
    color: var(--ega-primary);
    border-color: rgba(0, 40, 142, 0.2);
}

.eduglobal-theme .eg-course-card-badge,
.eduglobal-theme .eg-live-badge {
    background: var(--ega-primary);
    color: var(--ega-on-primary);
}

/* `.highlight` was an orange-on-dark accent; now the brand blue. */
.eduglobal-theme .highlight {
    color: var(--ega-primary);
    -webkit-text-fill-color: var(--ega-primary);
    background: none;
}
