/* ==========================================
   MOBILE EDUCATION PAGE STYLES
   ========================================== */

.edu-container {
    padding-bottom: 60px;
    overflow-x: hidden !important; /* Lock horizontal growth */
    width: 100%;
}

.edu-header {
    text-align: center;
    margin: 1rem 0; /* Reduced to match mobile home/disclaimer tight look */
    padding: 0; 
}

.edu-header .badge {
    margin-bottom: 1rem !important; /* Tightened gap between pill and title for mobile consistency */
}

.edu-header h1 {
    font-size: 2rem; /* Matched to disclaimer */
    line-height: 1.2;
    margin-bottom: 1rem;
    white-space: normal;
}

.edu-header h1 span {
    color: var(--gold);
}

.edu-header p {
    text-align: center;
    font-size: 1rem; /* Matched to disclaimer */
    line-height: 1.6; /* Matched to disclaimer */
    color: var(--text-dim);
}

.edu-grid {
    display: grid;
    gap: 1.5rem 1rem;
    padding: 0 0 100px; /* Side padding handled by global container */
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    justify-content: center;
    justify-items: center;
    grid-template-columns: repeat(1, minmax(250px, 320px));
}

.edu-sections {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    width: 100%;
    padding: 0 0 100px;
}

.edu-section {
    width: 100%;
}

.edu-section-header {
    margin: 0 0 1.25rem;
    width: 100%;
    max-width: none;
    text-align: left;
}

.edu-section-title-row {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.edu-section-kicker {
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.45rem;
}

.edu-section-header h2 {
    font-size: 1.55rem;
    line-height: 1.15;
    margin: 0;
    color: #fff;
    letter-spacing: -0.03em;
}

.edu-section-header p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-dim);
    text-align: justify;
    width: 100%;
    max-width: none;
}

.edu-section-grid {
    padding-bottom: 0;
}

.edu-section-legal {
    --edu-pill-start: rgba(37, 99, 235, 0.42);
    --edu-pill-end: rgba(14, 116, 144, 0.52);
    --edu-pill-glow: rgba(34, 211, 238, 0.8);
    --edu-pill-shadow: rgba(37, 99, 235, 0.22);
    --edu-card-accent: rgba(34, 211, 238, 0.2);
    --edu-card-accent-soft: rgba(37, 99, 235, 0.12);
    --edu-card-panel-top: rgba(20, 29, 54, 0.98);
    --edu-card-panel-bottom: rgba(11, 16, 32, 0.98);
}

.edu-section-scenarios {
    --edu-pill-start: rgba(217, 119, 6, 0.42);
    --edu-pill-end: rgba(234, 88, 12, 0.5);
    --edu-pill-glow: rgba(251, 191, 36, 0.8);
    --edu-pill-shadow: rgba(245, 158, 11, 0.22);
    --edu-card-accent: rgba(251, 191, 36, 0.2);
    --edu-card-accent-soft: rgba(249, 115, 22, 0.12);
    --edu-card-panel-top: rgba(45, 27, 12, 0.98);
    --edu-card-panel-bottom: rgba(22, 13, 8, 0.98);
}

.edu-section-crime {
    --edu-pill-start: rgba(190, 24, 93, 0.42);
    --edu-pill-end: rgba(220, 38, 38, 0.5);
    --edu-pill-glow: rgba(251, 113, 133, 0.82);
    --edu-pill-shadow: rgba(225, 29, 72, 0.22);
    --edu-card-accent: rgba(251, 113, 133, 0.2);
    --edu-card-accent-soft: rgba(225, 29, 72, 0.12);
    --edu-card-panel-top: rgba(49, 17, 27, 0.98);
    --edu-card-panel-bottom: rgba(24, 10, 16, 0.98);
}

.edu-section-finance {
    --edu-pill-start: rgba(5, 150, 105, 0.42);
    --edu-pill-end: rgba(8, 145, 178, 0.5);
    --edu-pill-glow: rgba(45, 212, 191, 0.8);
    --edu-pill-shadow: rgba(16, 185, 129, 0.22);
    --edu-card-accent: rgba(45, 212, 191, 0.2);
    --edu-card-accent-soft: rgba(16, 185, 129, 0.12);
    --edu-card-panel-top: rgba(12, 41, 35, 0.98);
    --edu-card-panel-bottom: rgba(7, 20, 18, 0.98);
}

@media (min-width: 600px) {
    .edu-grid {
        grid-template-columns: repeat(2, minmax(250px, 320px));
    }
}

/* --- EXACT DESKTOP CARD CSS COPY --- */
.edu-magic-card {
    width: 100%;
    position: relative;
    height: 380px;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    perspective: 1000px;
}

.edu-magic-card:hover {
    /* No translateY on mobile to avoid touch jitter */
    transform: none;
}

.edu-aura-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px; /* Reduced for mobile */
    height: 280px;
    background: radial-gradient(circle, var(--edu-card-accent-soft, rgba(93, 95, 239, 0.1)) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
    filter: blur(40px);
    transition: none; /* No transition needed if no change */
}

.edu-magic-card:hover .edu-aura-glow {
    /* No size increase on mobile to prevent horizontal scroll */
    width: 280px;
    height: 280px;
}

.edu-prot-no {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    color: rgba(255, 255, 255, 0.2);
    z-index: 5;
    pointer-events: none;
    user-select: none;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.05em;
}

.edu-magic-card:hover .edu-prot-no {
    color: var(--edu-pill-glow, rgba(0, 242, 255, 0.6));
}

.edu-poster-bg {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 280px;
    height: 340px;
    background:
        radial-gradient(circle at top right, var(--edu-card-accent, rgba(255, 204, 51, 0.08)), transparent 34%),
        radial-gradient(circle at bottom left, var(--edu-card-accent-soft, rgba(93, 95, 239, 0.12)), transparent 42%),
        linear-gradient(180deg, var(--edu-card-panel-top, rgba(15, 18, 33, 0.98)) 0%, var(--edu-card-panel-bottom, rgba(11, 13, 24, 0.98)) 100%);
    border-radius: 20px;
    z-index: 1;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    border: 4px solid #fff;
}

.edu-magic-card:hover .edu-poster-bg {
    transform: none;
    border-color: rgba(255, 255, 255, 1);
    box-shadow: 0 34px 68px rgba(0, 0, 0, 0.62), 0 0 22px var(--edu-card-accent-soft, rgba(255, 204, 51, 0.14));
}

.edu-glass-layer {
    position: absolute;
    top: 30px;
    left: 30px;
    width: 260px;
    height: 320px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--edu-card-panel-top, rgba(24, 28, 47, 0.84)) 88%, rgba(255,255,255,0.03)) 0%, color-mix(in srgb, var(--edu-card-panel-bottom, rgba(15, 18, 31, 0.84)) 92%, rgba(255,255,255,0.02)) 100%);
    backdrop-filter: blur(6px) saturate(140%);
    -webkit-backdrop-filter: blur(6px) saturate(140%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.edu-glass-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.edu-glass-layer::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 2px;
    background: conic-gradient(from var(--border-angle),
            transparent 70%,
            color-mix(in srgb, var(--edu-pill-glow, rgba(0, 242, 255, 0.4)) 70%, transparent) 85%,
            rgba(255, 255, 255, 0.9) 95%,
            color-mix(in srgb, var(--edu-pill-glow, rgba(0, 242, 255, 0.4)) 70%, transparent) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    animation: rotate-border 4s linear infinite;
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.edu-magic-card:hover .edu-glass-layer {
    transform: none;
    background: linear-gradient(180deg, color-mix(in srgb, var(--edu-card-panel-top, rgba(24, 28, 47, 0.84)) 85%, rgba(255,255,255,0.08)) 0%, color-mix(in srgb, var(--edu-card-panel-bottom, rgba(15, 18, 31, 0.84)) 90%, rgba(255,255,255,0.03)) 100%);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5), 0 0 18px var(--edu-card-accent-soft, rgba(255, 204, 51, 0.14));
}

.edu-magic-card:hover .edu-glass-layer::before {
    opacity: 1;
}

.edu-glass-tag {
    display: inline-flex;
    padding: 0.3rem 0.9rem;
    border-radius: 100px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    width: fit-content;
    position: relative;
    overflow: hidden;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    border: 0.5px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: linear-gradient(135deg, var(--edu-pill-start, rgba(79, 172, 254, 0.4)) 0%, var(--edu-pill-end, rgba(0, 102, 255, 0.5)) 100%);
    box-shadow: 0 4px 15px var(--edu-pill-shadow, rgba(0, 102, 255, 0.2)), inset 0 0 8px var(--edu-pill-shadow, rgba(0, 102, 255, 0.3)), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    margin-bottom: 1.5rem;
    align-self: flex-start;
}

.edu-glass-tag::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 10%;
    width: 45%;
    height: 30%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, transparent 100%);
    filter: blur(2px);
    border-radius: 100px;
    pointer-events: none;
    z-index: 2;
}

.edu-glass-tag::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 15%;
    width: 12px;
    height: 12px;
    background: var(--edu-pill-glow, #00f2ff);
    border-radius: 50%;
    filter: blur(4px);
    opacity: 0.8;
    box-shadow: 0 0 12px var(--edu-pill-glow, #00f2ff);
    pointer-events: none;
}

.edu-glass-layer h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
    overflow: visible;
    white-space: normal;
    text-align: left;
    min-height: 3.2rem;
    display: flex;
    align-items: flex-start;
}

.edu-glass-divider {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 1rem;
    opacity: 0.3;
    width: 100%;
}

.edu-glass-divider::before,
.edu-glass-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #fff;
}

.edu-glass-divider .dot {
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
}

.edu-glass-description {
    font-size: 0.75rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.edu-glass-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.edu-magic-card:hover .edu-glass-footer {
    color: #00f2ff;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
}

.edu-magic-card:hover .edu-glass-footer svg {
    transform: translateX(5px);
}

/* Modal System - Unified fixed overlay and detailed styling */
.neo-modal-overlay {
    position: fixed;
    top: 60px; /* Below mobile-top-nav */
    bottom: 80px; /* Above mobile-bottom-nav */
    left: 0;
    width: 100vw;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999; /* Below navbars (10000+) but above content */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.neo-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.neo-modal-content {
    background: linear-gradient(135deg, rgba(20, 25, 35, 0.95) 0%, rgba(10, 14, 23, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 90% !important; /* Force width on mobile */
    height: auto !important; /* Content depth on mobile */
    border-radius: 20px;
    position: relative;
    max-height: 90% !important;
    display: flex !important;
    flex-direction: column !important; /* Stack vertically for mobile */
    overflow: hidden !important;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.8);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    margin: auto !important;
}

.neo-modal-overlay.active .neo-modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.2rem;
    z-index: 100;
}

/* No .modal-grid needed since .neo-modal-content handles it */

.neo-modal-promo {
    width: 100% !important;
    height: 155px !important; /* Increased for title visibility on mobile */
    position: relative !important;
    background: #000 !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    padding: 1.25rem 1.5rem !important; 
}

.neo-modal-promo h1 {
    font-size: 1.1rem !important;
    line-height: 1.1 !important;
    margin: 0 0 0.3rem !important;
    color: #fff !important;
    font-weight: 800 !important;
}

.neo-modal-promo p {
    font-size: 0.75rem !important;
    line-height: 1.3 !important;
    color: rgba(255,255,255,0.6) !important;
    margin: 0 !important;
}

.neo-modal-promo img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    opacity: 0.35 !important;
}

.modal-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary);
    color: #fff;
    padding: 0.15rem 0.5rem;
    border-radius: 100px;
    font-size: 0.55rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 10;
}

.neo-modal-info-side {
    padding: 1.5rem !important;
    overflow-y: auto !important;
    flex: 1 !important;
    display: block !important;
    background: rgba(10, 14, 23, 0.5) !important;
}

/* Custom Scrollbar for Modal Content */
.neo-modal-info-side::-webkit-scrollbar {
    width: 4px;
}

.neo-modal-info-side::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.neo-modal-info-side::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.neo-info-desc p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.5rem;
    text-align: justify;
}
