/* ==========================================================================
   UI POLISH LAYER — header menu + homepage hero (loaded after style.css)
   ========================================================================== */

/* ---------- Header ---------- */
.site-header {
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid rgba(99, 102, 241, 0.10);
    box-shadow: 0 6px 24px -12px rgba(79, 70, 229, 0.18);
}
.site-header::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
    background: linear-gradient(90deg, #6366f1, #ec4899, #f59e0b, #10b981, #06b6d4, #6366f1);
    background-size: 200% 100%; animation: qmHeaderLine 12s linear infinite; opacity: .55;
}
@keyframes qmHeaderLine { to { background-position: 200% 0; } }

/* Unified capsule menu: same style for every item, colour only on icons */
.nav-menu {
    background: #ffffff;
    border: 1px solid #e8eaf6;
    box-shadow: 0 4px 18px -6px rgba(79, 70, 229, 0.12), inset 0 1px 0 #fff;
    padding: 3px 4px;
    gap: 2px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    box-sizing: border-box;
    overflow: visible;
}
.nav-menu .nav-item {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
.nav-menu .nav-item a,
.nav-menu .nav-item a.nav-link-soul,
.nav-menu .nav-item a.nav-link-kids,
.nav-menu .nav-item a.nav-link-daily,
.nav-menu .nav-item a.nav-link-english {
    background: transparent !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    color: #475569 !important;
    font-weight: 600;
    font-size: 0.82rem;
    height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    line-height: 1;
    box-sizing: border-box;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}
.nav-menu .nav-item a:hover {
    background: #f5f3ff !important;
    color: #4338ca !important;
    transform: translateY(-1px);
}
.nav-menu .nav-item.active a {
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px -2px rgba(99, 102, 241, 0.45) !important;
    font-weight: 700;
    transform: none !important;
}
.nav-menu .nav-item.active a::after { display: none; }
.nav-menu .nav-item.active a svg,
.nav-menu .nav-item.active a svg * { color: #fff !important; stroke: currentColor; }

/* Icon accent colours */
.nav-icon-iq          { color: #6366f1 !important; }
.nav-icon-soul        { color: #a855f7 !important; }
.nav-icon-english     { color: #0ea5e9 !important; }
.nav-icon-kids        { color: #ec4899 !important; }
.nav-icon-daily       { color: #f97316 !important; }
.nav-icon-trainers    { color: #06b6d4 !important; }
.nav-icon-calc        { color: #3b82f6 !important; }
.nav-icon-tournaments { color: #f59e0b !important; }
.nav-item-icon        { color: #10b981; flex-shrink: 0; }
.nav-menu .nav-item.active a .nav-icon-tournaments { color: #ffffff !important; }

/* ---------- Hero Spectacular & Interactive Upgrade ---------- */
.hero-section {
    position: relative;
    overflow: hidden;
    padding: 72px 0 52px;
}
.hero-section::before,
.hero-section::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(85px);
    z-index: 0;
    pointer-events: none;
}
.hero-section::before {
    width: 580px;
    height: 580px;
    top: -190px;
    left: -150px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.22) 0%, rgba(139, 92, 246, 0.12) 60%, transparent 80%);
    animation: heroOrbFloat1 10s ease-in-out infinite alternate;
}
.hero-section::after {
    width: 520px;
    height: 520px;
    top: 50px;
    right: -120px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.18) 0%, rgba(244, 114, 182, 0.08) 60%, transparent 80%);
    animation: heroOrbFloat2 12s ease-in-out infinite alternate;
}
@keyframes heroOrbFloat1 { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(25px, 20px) scale(1.08); } }
@keyframes heroOrbFloat2 { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(-20px, -25px) scale(1.06); } }

.hero-top-status-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.hero-live-counter-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e2e8f0;
    padding: 5px 13px;
    border-radius: 999px;
    font-size: 0.78rem;
    color: #334155;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.live-dot-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: livePulseRadar 1.8s infinite;
}
@keyframes livePulseRadar {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-pill-badge {
    background: linear-gradient(135deg, #ecfdf5, #eef2ff) !important;
    border: 1px solid rgba(16, 185, 129, 0.28) !important;
    color: #065f46 !important;
    font-weight: 750;
    box-shadow: 0 4px 14px -4px rgba(16, 185, 129, 0.28);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.80rem;
    transition: transform 0.2s ease;
}
.hero-pill-badge:hover {
    transform: translateY(-1px);
}
.hero-badge-sparkle {
    font-size: 0.85rem;
    animation: sparkleGlint 2.5s infinite;
}
@keyframes sparkleGlint { 0%, 100% { opacity: 0.5; transform: scale(0.85); } 50% { opacity: 1; transform: scale(1.15); } }

.hero-title {
    font-size: 3.35rem;
    font-weight: 900;
    background: linear-gradient(125deg, #0f172a 0%, #1e1b4b 30%, #4338ca 65%, #7c3aed 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
    line-height: 1.12;
    margin-bottom: 1.25rem;
}
.hero-subtitle {
    color: #475569 !important;
    font-size: 1.12rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 540px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}
.btn-hero-glow {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 14px 34px -6px rgba(99, 102, 241, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.25) inset !important;
    padding: 1rem 2.2rem !important;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    border-radius: 999px !important;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.btn-hero-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-25deg);
    animation: btnSweep 4.5s infinite;
}
@keyframes btnSweep { 0%, 70% { left: -120%; } 100% { left: 220%; } }

.btn-hero-glow:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 18px 40px -6px rgba(236, 72, 153, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.4) inset !important;
}
.hero-cta-arrow {
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-hero-glow:hover .hero-cta-arrow {
    transform: translateX(5px);
}
.btn-hero-sample {
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #1e1b4b !important;
    padding: 1rem 1.8rem !important;
    font-size: 1.02rem !important;
    font-weight: 750 !important;
    border-radius: 999px !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-hero-sample:hover {
    border-color: #6366f1 !important;
    background: #f8fafc !important;
    color: #4338ca !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.15);
}

.hero-trust-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.90rem;
    color: #475569;
}
.hero-trust-stars {
    color: #f59e0b;
    letter-spacing: 2px;
    font-size: 1.05rem;
}

/* 3D Floating Simulator Card */
.hero-card-floating {
    background: rgba(255, 255, 255, 0.96) !important;
    border: 1px solid rgba(99, 102, 241, 0.2) !important;
    border-radius: 26px !important;
    padding: 26px 28px !important;
    box-shadow: 0 30px 70px -15px rgba(79, 70, 229, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.9) inset !important;
    position: relative;
    animation: heroCardFloat 6s ease-in-out infinite;
    backdrop-filter: blur(14px);
}
@keyframes heroCardFloat {
    0%, 100% { transform: translateY(0) rotate(-0.3deg); }
    50% { transform: translateY(-8px) rotate(0.3deg); }
}

.hero-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.hero-card-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 850;
    color: #4338ca;
    background: #eef2ff;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 0.05em;
}
.hero-card-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    font-weight: 750;
    color: #059669;
}
.brain-pulse-icon {
    display: inline-block;
    animation: brainPulse 2.4s ease-in-out infinite;
}
@keyframes brainPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2) rotate(6deg); }
}

/* Matrix Puzzle Grid */
.hero-matrix-box {
    background: linear-gradient(160deg, #f8fafc, #f1f5f9) !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 18px !important;
    padding: 16px !important;
    margin-bottom: 14px !important;
    box-shadow: inset 0 2px 6px rgba(15, 23, 42, 0.03);
}
.hero-matrix-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}
.matrix-cell {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 800;
    color: #4338ca !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
    transition: transform 0.2s ease, border-color 0.2s;
    letter-spacing: 1px;
}
.matrix-cell:hover {
    transform: scale(1.05);
    border-color: #818cf8 !important;
}
.matrix-cell-target {
    background: linear-gradient(135deg, #f5f3ff, #fdf2f8) !important;
    border: 2px dashed #8b5cf6 !important;
    color: #7c3aed !important;
    animation: targetPulse 2s ease-in-out infinite;
    cursor: default;
}
@keyframes targetPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(139, 92, 246, 0); }
}
.matrix-cell-target.target-solved {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5) !important;
    border: 2px solid #10b981 !important;
    color: #059669 !important;
    animation: solvedSuccess 0.5s ease-out forwards;
}
@keyframes solvedSuccess {
    0% { transform: scale(0.9); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}
.correct-dots-glow {
    color: #059669;
    font-weight: 900;
    filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.5));
}
.matrix-caption {
    font-size: 0.74rem;
    color: #64748b;
    text-align: center;
    font-weight: 600;
}

/* Interactive Choices Tray */
.hero-interactive-tray {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 14px;
}
.interactive-tray-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.interactive-tray-title {
    font-size: 0.76rem;
    font-weight: 750;
    color: #0f172a;
}
.interactive-timer-chip {
    font-size: 0.70rem;
    font-weight: 800;
    color: #d97706;
    background: #fffbeb;
    border: 1px solid #fef3c7;
    padding: 2px 7px;
    border-radius: 999px;
}
.matrix-choices-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.matrix-choice-btn {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 800;
    color: #334155;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.04);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: 0.5px;
}
.matrix-choice-btn:hover {
    background: #eef2ff;
    border-color: #6366f1;
    color: #4338ca;
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 6px 14px -2px rgba(99, 102, 241, 0.2);
}
.matrix-choice-btn.selected-correct {
    background: #ecfdf5 !important;
    border-color: #10b981 !important;
    color: #059669 !important;
    transform: scale(1.08);
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.4) !important;
}
.matrix-choice-btn.shake-wrong {
    animation: wrongShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
    color: #dc2626 !important;
}
@keyframes wrongShake {
    10%, 90% { transform: translate3d(-2px, 0, 0); }
    20%, 80% { transform: translate3d(3px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
    40%, 60% { transform: translate3d(3px, 0, 0); }
}

.matrix-feedback-msg {
    margin-top: 8px;
    animation: feedbackSlide 0.3s ease-out;
}
@keyframes feedbackSlide { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

.feedback-success-badge {
    display: block;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    text-align: center;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}
.feedback-hint-badge {
    display: block;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.76rem;
    font-weight: 750;
    text-align: center;
}

/* Metric chips */
.hero-card-chips {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}
.hero-mini-chip {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    transition: transform 0.2s ease, border-color 0.2s;
}
.hero-mini-chip:hover {
    transform: translateY(-2px);
    border-color: #818cf8 !important;
}
.mini-chip-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    flex-shrink: 0;
}
.chip-icon-agility { background: linear-gradient(135deg, #10b981, #06b6d4) !important; box-shadow: 0 3px 8px rgba(16, 185, 129, 0.3); }
.chip-icon-speed   { background: linear-gradient(135deg, #f59e0b, #ec4899) !important; box-shadow: 0 3px 8px rgba(245, 158, 11, 0.3); }
.mini-chip-val { font-size: 0.88rem; font-weight: 850; color: #0f172a; }
.mini-chip-lbl { font-size: 0.70rem; color: #64748b; font-weight: 600; }

.btn-hero-matrix-cta {
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    border: none !important;
    font-weight: 800 !important;
    padding: 0.85rem !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 22px -4px rgba(99, 102, 241, 0.4) !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.btn-hero-matrix-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -4px rgba(99, 102, 241, 0.6) !important;
}
.btn-hero-matrix-cta.pulse-glow-accent {
    animation: ctaAccentGlow 1.8s infinite;
    background: linear-gradient(135deg, #10b981, #059669) !important;
    box-shadow: 0 8px 26px -2px rgba(16, 185, 129, 0.6) !important;
}
@keyframes ctaAccentGlow {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

/* Floating Metrics Strip (Jewel-toned Bubbles) */
.hero-metrics-strip {
    margin-top: 3.5rem;
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 999px !important;
    padding: 14px 28px !important;
    box-shadow: 0 16px 40px -12px rgba(79, 70, 229, 0.16), 0 0 0 1px #fff inset !important;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 16px;
    flex-wrap: wrap;
}
.metric-item {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.metric-item:hover {
    transform: translateY(-3px) scale(1.03);
}
.metric-icon-bubble {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}
.bubble-puzzle { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.bubble-timer  { background: linear-gradient(135deg, #ec4899, #db2777); }
.bubble-bulb   { background: linear-gradient(135deg, #f59e0b, #d97706); }
.bubble-globe  { background: linear-gradient(135deg, #10b981, #059669); }
.metric-text { font-size: 0.92rem; color: #334155; font-weight: 600; }
.metric-text strong { color: #0f172a; font-weight: 850; }
.metric-divider {
    width: 1px;
    height: 28px;
    background: #e2e8f0;
}

@media (max-width: 1100px) {
    .hero-title { font-size: 2.7rem; }
    .hero-metrics-strip { border-radius: 20px !important; }
}
@media (max-width: 900px) {
    .hero-split-grid { grid-template-columns: 1fr; gap: 32px; }
    .hero-title { font-size: 2.3rem; }
    .hero-card-floating { max-width: 100%; }
}
@media (max-width: 768px) {
    .hero-metrics-strip {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        border-radius: 20px !important;
        padding: 12px !important;
        margin-top: 2rem !important;
    }
    .hero-metrics-strip .metric-divider {
        display: none !important;
    }
    .hero-metrics-strip .metric-item {
        display: flex;
        align-items: center;
        gap: 10px;
        background: #f8fafc;
        border: 1px solid #edf2f7;
        border-radius: 14px;
        padding: 10px 12px;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }
    .hero-metrics-strip .metric-icon-bubble {
        width: 36px;
        height: 36px;
        min-width: 36px;
        flex-shrink: 0;
    }
    .hero-metrics-strip .metric-text {
        font-size: 0.84rem;
        line-height: 1.25;
    }
}
@media (max-width: 540px) {
    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 0.9rem 1.2rem;
    }
    .hero-trust-bar {
        justify-content: center;
        text-align: center;
        font-size: 0.82rem;
    }
}
@media (max-width: 480px) {
    .hero-card-floating {
        padding: 1.15rem 1rem !important;
        border-radius: 20px !important;
    }
    .hero-matrix-box {
        padding: 12px 10px;
    }
    .hero-matrix-grid {
        gap: 6px;
    }
    .matrix-cell {
        width: clamp(54px, 19vw, 68px);
        height: clamp(54px, 19vw, 68px);
        font-size: clamp(0.75rem, 3.2vw, 0.95rem);
    }
    .matrix-choices-grid {
        gap: 6px;
    }
    .matrix-choice-btn {
        padding: 7px 4px;
        font-size: clamp(0.72rem, 3vw, 0.88rem);
    }
    .hero-card-chips {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .hero-mini-chip {
        padding: 8px 10px;
    }
    .hero-metrics-strip .metric-item {
        padding: 8px 10px;
        gap: 8px;
    }
    .hero-metrics-strip .metric-icon-bubble {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }
    .hero-metrics-strip .metric-text {
        font-size: 0.78rem;
    }
}

/* Daily Highlight Banner */
.section-daily-highlight {
    padding: 1rem 0 3rem 0;
}
.daily-highlight-banner {
    padding: 1.8rem 2.2rem;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}
.daily-highlight-main {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 1;
    min-width: 280px;
}
.daily-highlight-icon {
    width: 58px;
    height: 58px;
    min-width: 58px;
    flex-shrink: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(234, 88, 12, 0.35);
}
.daily-highlight-content {
    flex: 1;
}
.daily-highlight-badge-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}
.badge-daily-tag {
    background: rgba(249, 115, 22, 0.12);
    color: #ea580c;
    border: 1px solid rgba(249, 115, 22, 0.25);
    font-size: 0.72rem;
    text-transform: uppercase;
    font-weight: 700;
}
.daily-highlight-mechanic {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}
.daily-highlight-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
}
.daily-highlight-desc {
    margin: 0.25rem 0 0 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.daily-highlight-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.btn-daily-solve {
    padding: 0.85rem 1.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-daily-trainers {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 768px) {
    .section-daily-highlight {
        padding: 0.5rem 0 2rem 0;
    }
    .daily-highlight-banner {
        padding: 1.25rem 1.15rem;
        border-radius: 18px;
        gap: 1.2rem;
    }
    .daily-highlight-main {
        align-items: flex-start;
        gap: 1rem;
        min-width: unset;
        width: 100%;
    }
    .daily-highlight-icon {
        width: 48px;
        height: 48px;
        min-width: 48px;
        border-radius: 14px;
    }
    .daily-highlight-icon svg {
        width: 24px;
        height: 24px;
    }
    .daily-highlight-title {
        font-size: 1.15rem;
        line-height: 1.3;
    }
    .daily-highlight-desc {
        font-size: 0.84rem;
        line-height: 1.4;
    }
    .daily-highlight-actions {
        width: 100%;
        flex-direction: column;
        gap: 0.65rem;
    }
    .daily-highlight-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 0.8rem 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-card-floating, .matrix-cell-target, .site-header::after { animation: none; }
}


/* ---------- Language switcher inside the menu capsule ---------- */
.nav-menu { overflow: visible; }
.nav-item-lang {
    margin-left: 3px;
    padding-left: 5px;
    border-left: 1px solid #e8eaf6;
    display: inline-flex;
    align-items: center;
}
.nav-item-lang .lang-dropdown { position: relative; display: inline-flex; align-items: center; }
.nav-item-lang .lang-btn {
    background: #f5f3ff;
    border: 1px solid transparent;
    box-shadow: none;
    border-radius: 999px;
    padding: 0 9px;
    height: 34px;
    gap: 5px;
    font-weight: 700;
    color: #4338ca;
    font-size: 0.80rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    line-height: 1;
}
.nav-item-lang .lang-btn:hover { background: #ede9fe; border-color: #c4b5fd; }
.nav-item-lang .lang-label-full { display: none !important; }
.nav-item-lang .lang-label-short { display: inline !important; }
.nav-item-lang .lang-menu { right: 0; left: auto; top: calc(100% + 10px); min-width: 210px; }
/* Links inside the dropdown must not inherit capsule pill styles */
.nav-menu .nav-item-lang .lang-menu a {
    border-radius: 10px; padding: 8px 12px; width: 100%; color: #334155 !important; transform: none; height: auto;
}
.nav-menu .nav-item-lang .lang-menu li.active a { background: #eef2ff !important; color: #4338ca !important; }

/* ---------- Responsive Header Scaling & Harmony ---------- */
@media (max-width: 1420px) {
    .nav-menu .nav-item a {
        padding: 0 8px;
        font-size: 0.79rem;
        gap: 4px;
    }
}
@media (max-width: 1320px) {
    .nav-item-icon {
        display: none !important;
    }
    .nav-menu .nav-item a {
        padding: 0 7px;
        font-size: 0.78rem;
    }
}
