/* ==============================================================
   BASE & UTILITY
============================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #050d08; min-height: 100vh; font-family: 'Inter', sans-serif; overflow-x: hidden; color: #f9fafb; }
a { text-decoration: none; }
.text-white { color: #f9fafb; } .text-accent { color: #f59e0b; } .text-left { text-align: left; }
.text-gradient { background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 50%, #d97706 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-size: 200% auto; }

/* ==============================================================
   GLOBAL WIDE LAYOUT (Stretches content correctly on Desktop)
============================================================== */
.kloot-hero-grid,
.kloot-features-grid,
.kloot-stats-grid,
.kloot-steps-grid,
.kloot-courses-grid,
.kloot-books-grid,
.kloot-testimonials-grid,
.features-header,
.steps-header,
.courses-header-row {
    max-width: 1600px;
    width: 94%;
    margin-left: auto;
    margin-right: auto;
}

/* ==============================================================
   ANIMATIONS
============================================================== */
@keyframes spin-slow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse-gold-strong { 
    0% { box-shadow: 0 0 0 0 rgba(245,158,11,0.7); } 
    70% { box-shadow: 0 0 0 15px rgba(245,158,11,0); } 
    100% { box-shadow: 0 0 0 0 rgba(245,158,11,0); } 
}
@keyframes pulseSpin { 0% { transform: scale(1) rotate(0deg); } 50% { transform: scale(1.1) rotate(180deg); } 100% { transform: scale(1) rotate(360deg); } }
@keyframes spin-coin-css { 0% { transform: rotateY(0deg); } 100% { transform: rotateY(360deg); } }
@keyframes mascot-idle { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-10px); } }

/* ==============================================================
   BUTTONS
============================================================== */
.kloot-btn-primary { background: linear-gradient(135deg, #f59e0b, #d97706); color: #0a0a0a; font-weight: 700; font-size: 15px; padding: 12px 28px; border-radius: 8px; border: none; cursor: pointer; transition: all 0.2s; display: inline-block; text-align: center; }
.kloot-btn-primary:hover { background: linear-gradient(135deg, #fcd34d, #f59e0b); transform: translateY(-1px); box-shadow: 0 8px 25px rgba(245,158,11,0.35); }
.kloot-btn-outline { background: transparent; color: #d1fae5; font-weight: 600; font-size: 15px; padding: 12px 28px; border-radius: 8px; border: 1px solid rgba(209,250,229,0.3); cursor: pointer; transition: all 0.2s; display: inline-block; text-align: center; }
.kloot-btn-outline:hover { border-color: #fcd34d; color: #fcd34d; }
.btn-pulse { animation: pulse-gold-strong 2s infinite; border-color: #f59e0b !important; color: #fcd34d !important; }

/* ==============================================================
   NAVBAR & DROPDOWNS (Grid Setup)
============================================================== */
.nav-wrapper { position: fixed; width: 100%; top: 0; z-index: 100; background: transparent; transition: all 0.3s; height: 64px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 2%; }
.nav-scrolled { background: rgba(5,13,8,0.95); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(245,158,11,0.15); }
.nav-brand-link { grid-column: 1; justify-self: start; display: flex; align-items: center; gap: 8px; z-index: 101; }
.nav-brand-text { color: #f9fafb; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; text-transform: uppercase; }
.kloot-nav-links { grid-column: 2; justify-self: center; display: flex; gap: 28px; align-items: center; }
.kloot-nav-link { color: #d1fae5; font-size: 14px; font-weight: 500; transition: color 0.2s; cursor: pointer; }
.kloot-nav-link:hover { color: #fcd34d; }
.auth-wrapper { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 12px; z-index: 101; }
.coin-badge-box { display: none !important; }
.coin-icon { font-size: 16px; } .coin-text { color: #fcd34d; font-weight: 700; font-size: 14px; }
.main-nav-burger { display: none; background: transparent; border: none; cursor: pointer; color: #fcd34d; z-index: 101; }

.nav-dropdown { position: relative; display: inline-block; }
.nav-dropdown-toggle { background: transparent; border: none; font-family: inherit; display: flex; align-items: center; gap: 4px; padding: 10px 0; outline: none; }
.nav-dropdown-menu { position: absolute; top: 100%; left: 0; background: #0a1a10; border: 1px solid #1a4a28; border-radius: 8px; padding: 8px 0; min-width: 180px; display: flex; flex-direction: column; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.2s ease; z-index: 102; box-shadow: 0 10px 25px rgba(0,0,0,0.5); }
.nav-dropdown:hover .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item { padding: 10px 20px; color: #d1fae5; font-size: 13px; font-weight: 500; transition: background 0.2s, color 0.2s; white-space: nowrap; }
.dropdown-item:hover { background: rgba(245,158,11,0.1); color: #fcd34d; }

.moodle-nav-theme { background: #ffffff !important; border-bottom: 1px solid #e2e8f0 !important; }
.moodle-nav-theme .nav-brand-text { color: #f59e0b !important; font-weight: 900; }
.moodle-nav-theme .kloot-nav-link { color: #475569 !important; font-weight: 500; }
.moodle-nav-theme .kloot-nav-link:hover { color: #0f172a !important; }
.moodle-nav-theme .coin-badge-box { background: #f8fafc; border-color: #cbd5e1; }
.moodle-nav-theme .coin-text { color: #334155 !important; }
.moodle-nav-theme .main-nav-burger { color: #f59e0b; }
.moodle-nav-theme .nav-dropdown-menu { background: #ffffff; border: 1px solid #e2e8f0; box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.moodle-nav-theme .dropdown-item { color: #475569; }
.moodle-nav-theme .dropdown-item:hover { background: #f8fafc; color: #0f172a; }

/* ==============================================================
   SUPPORT BANNER
============================================================== */
.support-banner-wrapper { margin-top: 64px; background: #0a1a10; border-bottom: 1px solid #1a4a28; border-top: 1px solid #1a4a28; padding: 12px 20px; position: relative; z-index: 90; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.support-banner-content { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; max-width: 1600px; margin: 0 auto; }
.support-punchline { background: linear-gradient(135deg, #fcd34d, #f59e0b); color: #050d08; padding: 4px 12px; border-radius: 20px; font-weight: 900; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; box-shadow: 0 0 12px rgba(245,158,11,0.3); white-space: nowrap; }
.support-desc { font-size: 14px; font-weight: 500; color: #d1d5db; text-align: center; }
.support-link-btn { background: transparent; color: #fcd34d; border: 1px solid #f59e0b; padding: 6px 16px; border-radius: 6px; font-size: 13px; font-weight: 700; transition: all 0.2s; white-space: nowrap; }
.support-link-btn:hover { background: rgba(245,158,11,0.15); color: #fff; }
body.has-support-banner .hero-section { padding-top: 25px !important; }

/* ==============================================================
   HERO SECTION (FIXED: Reduced Spacing & Auto Height)
============================================================== */
.hero-section { position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; padding-top: clamp(120px, 15vh, 160px); padding-bottom: 40px; min-height: auto; height: auto; }
.hero-bg-gradient { position: absolute; inset: 0; background-color: #050d08; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='242.48'%3E%3Cg fill='none' stroke='%23f59e0b' stroke-opacity='0.07' stroke-width='1.5'%3E%3Cpath d='M70 0L140 40.41v80.83L70 161.65L0 121.24V40.41z M70 20L122 50v61L70 141L18 111V50z'/%3E%3Cpath d='M70 242.48L140 202.07v-80.83L70 80.83L0 121.24v80.83z M70 222.48L122 192.47v-61L70 101.48L18 131.47v61z'/%3E%3C/g%3E%3C/svg%3E"), radial-gradient(ellipse 80% 60% at 50% 40%, #0d3320 0%, #050d08 70%); background-size: 150px 259.8px, 100% 100%; background-position: center center; }
.kloot-hero-grid { position: relative; z-index: 2; padding: 40px 0; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center; }
.hero-content { animation: fadeInUp 0.8s ease both; display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.kloot-hero-title { font-size: 52px; font-weight: 900; line-height: 1.1; margin-bottom: 24px; letter-spacing: -0.02em; margin-left: 0; }
.hero-desc { color: #9ca3af; font-size: 17px; line-height: 1.7; margin-bottom: 30px; max-width: 480px; }
.hero-mini-badges { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 36px; }
.h-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.25); border-radius: 20px; padding: 6px 14px; color: #86efac; font-size: 13px; font-weight: 600; }
.hero-actions { display: flex; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; justify-content: flex-start; align-items: center; } 
.hero-btn { white-space: nowrap; height: auto; }

.hero-graphic { display: flex; align-items: center; justify-content: center; }
.hero-graphic-circle { position: relative; width: 320px; height: 320px; }
.hero-graphic-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(245,158,11,0.2); animation: spin-slow 20s linear infinite; }
.hero-graphic-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.hg-main-letter { font-size: 110px; color: #fcd34d; text-shadow: 0 0 40px rgba(245,158,11,0.6); z-index: 2; font-family: 'Amiri', serif; }
.hg-subtitle { color: #6b7280; font-size: 13px; margin-top: 8px; letter-spacing: 0.05em; z-index: 2; }
.hg-dynamic-item { position: absolute; top: 50%; left: 50%; color: #f59e0b; font-size: 20px; opacity: 0.7; font-weight: bold; margin-top: -15px; margin-left: -10px; z-index: 1; }
.hg-particle { position: absolute; top: 50%; left: 50%; opacity: 1; transition: transform 2.5s cubic-bezier(0.1, 0.8, 0.3, 1), opacity 2.5s ease-in; pointer-events: none; z-index: 1; margin-top: -12px; margin-left: -12px; }

/* ==============================================================
   PAGE SECTIONS (FIXED: Reduced Top Padding)
============================================================== */
.features-section { padding: 20px 0 clamp(60px, 8vh, 100px); }
.features-header { text-align: center; margin-bottom: 40px; }
.kloot-features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.feature-card { background: linear-gradient(145deg, #0a1a10, #050d08); border: 1px solid #1a4a28; border-radius: 16px; padding: 24px; }
.fc-icon { font-size: 32px; margin-bottom: 16px; width: 56px; height: 56px; border-radius: 12px; background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.2); display: flex; align-items: center; justify-content: center; }
.fc-title { color: #f9fafb; font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.fc-desc { color: #9ca3af; font-size: 14px; margin-bottom: 16px; }
.fc-readmore { background: none; border: none; color: #f59e0b; font-size: 14px; font-weight: 600; cursor: pointer; }

.stats-section { background: linear-gradient(135deg, #0d3320, #0a2918); padding: clamp(60px, 8vh, 100px) 0; }
.kloot-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.stat-card { text-align: center; } .stat-icon { font-size: 36px; margin-bottom: 8px; } .stat-val { color: #fcd34d; font-size: 32px; font-weight: 800; } .stat-label { color: #9ca3af; font-size: 14px; }

.testimonials-section { padding: clamp(60px, 8vh, 100px) 0 0; }
.kloot-testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.testimonial-card { background: #0a1a10; border: 1px solid #1a4a28; padding: 24px; border-radius: 16px; position: relative; }
.t-quote { color: #d1d5db; font-size: 15px; font-style: italic; margin-bottom: 24px; line-height: 1.6; }
.t-author { display: flex; align-items: center; gap: 12px; }
.t-avatar { width: 40px; height: 40px; border-radius: 50%; background: #f59e0b; color: #000; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; }
.t-name { color: #f9fafb; font-size: 15px; font-weight: 700; } .t-role { color: #9ca3af; font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; }

.section-subtitle { color: #f59e0b; font-size: 18px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 12px; }
.section-title { color: #f9fafb; font-size: 38px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 16px; }

.steps-section { padding: clamp(60px, 8vh, 100px) 0; } 
.steps-header { text-align: center; margin-bottom: 40px; }
.kloot-steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; }
.steps-line { position: absolute; top: 36px; left: 12.5%; right: 12.5%; height: 1px; background: linear-gradient(90deg, transparent, #1a4a28, #f59e0b, #1a4a28, transparent); z-index: 0; }
.step-card { text-align: center; padding: 0 16px; position: relative; z-index: 1; }
.step-icon { width: 72px; height: 72px; border-radius: 50%; background: linear-gradient(135deg, #1a4a28, #0a2e17); border: 2px solid #f59e0b; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 30px; }
.step-title { color: #f9fafb; font-size: 18px; font-weight: 700; margin-bottom: 8px; } .step-desc { color: #9ca3af; font-size: 14px; }

.courses-section { padding: 0 0 clamp(60px, 8vh, 100px); }
.kloot-courses-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.course-card { background: #0f172a; border: 1px solid #1e293b; border-radius: 12px; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; display: flex; flex-direction: column; }
.course-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.4); border-color: #334155; }
.course-card-top { height: 200px; position: relative; display: flex; align-items: center; justify-content: center; box-shadow: inset 16px 0 24px rgba(0,0,0,0.4), inset -2px 0 5px rgba(255,255,255,0.05); }
.course-badge { position: absolute; top: 14px; right: 14px; font-size: 11px; font-weight: 800; padding: 4px 12px; border-radius: 20px; z-index: 2; text-transform: uppercase; letter-spacing: 0.05em; backdrop-filter: blur(4px); }
.course-card-letter { font-size: 80px; color: #fcd34d; z-index: 1; text-shadow: 0 5px 15px rgba(0,0,0,0.5); font-family: 'Amiri', serif; }
.course-info { padding: 20px; background: #0b1120; flex-grow: 1; border-top: 1px solid rgba(255,255,255,0.03); } 
.course-cat { color: #94a3b8; font-size: 12px; font-weight: 700; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.course-title { color: #f8fafc; font-size: 18px; font-weight: 800; }
.courses-header-row { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px; }

/* ==============================================================
   BOOK SERIES SECTION (Glassmorphic Cards)
============================================================== */
.books-section { padding: 4rem 0; position: relative; }
.kloot-books-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 25px; margin-top: 2rem; }

.book-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.book-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 20px rgba(16,185,129,0.15);
}

.book-icon-wrapper {
    width: 65px; height: 65px; border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; margin-bottom: 25px;
}

.book-title { color: #fff; font-size: 24px; font-weight: 800; margin-bottom: 12px; line-height: 1.2; letter-spacing: -0.5px; }
.book-desc { color: #94a3b8; font-size: 15px; line-height: 1.6; margin-bottom: 25px; flex-grow: 1; }

.book-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 25px; }
.book-badge { background: rgba(255, 255, 255, 0.05); color: #cbd5e1; padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 700; border: 1px solid rgba(255,255,255,0.05); }

.book-btn {
    background: rgba(16, 185, 129, 0.1); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 14px; border-radius: 12px; font-weight: 800; text-align: center; font-size: 15px;
    transition: all 0.3s; text-decoration: none; display: block;
}

.book-card:hover .book-btn { background: #10b981; color: #fff; border-color: #10b981; box-shadow: 0 5px 15px rgba(16,185,129,0.3); }

.cta-section { padding: 40px 0 80px; text-align: center; }
.cta-icon { font-size: 90px; margin-bottom: 24px; }
.cta-title { color: #f9fafb; font-size: 40px; font-weight: 900; margin-bottom: 20px; }

/* ==============================================================
   FOOTER (Moodle Match)
============================================================== */
.footer { border-top: 1px solid rgba(255, 255, 255, 0.05); padding: 60px 40px 40px; background: #020610; position: relative; z-index: 10; } 
.footer-container { max-width: 1200px; margin: 0 auto; } 
.kloot-footer-grid { display: grid; grid-template-columns: repeat(3, 1fr) !important; gap: 40px; text-align: left; margin-bottom: 40px; } 
.footer-heading { color: #ffffff; font-size: 16px; font-weight: 700; letter-spacing: normal; text-transform: none; margin-bottom: 24px; } 
.footer-link { margin-bottom: 16px; } 
.footer-link a { color: #f1f5f9; font-size: 15px; font-weight: 400; transition: color 0.2s; } 
.footer-link a:hover { color: #fcd34d; }
.footer-bottom-brand { display: flex; align-items: center; gap: 12px; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.05); }
.footer-brand-text { color: #f59e0b; font-size: 18px; font-weight: 800; letter-spacing: 0.05em; }

/* ==============================================================
   UI ELEMENTS & MODALS (Text Feature Modal)
============================================================== */
.f-modal-overlay { position: fixed; inset: 0; background: rgba(3, 10, 5, 0.85); backdrop-filter: blur(8px); z-index: 10000; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; padding: 20px; }
.f-modal-overlay.is-active { opacity: 1; pointer-events: auto; }
.f-modal-content { background: #0a1a10; border: 1px solid #1a4a28; border-radius: 16px; width: 100%; max-width: 550px; max-height: 85vh; display: flex; flex-direction: column; position: relative; transform: translateY(30px); transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); }
.f-modal-overlay.is-active .f-modal-content { transform: translateY(0); }
.f-modal-close { position: absolute; top: 16px; right: 20px; background: transparent; border: none; color: #6b7280; font-size: 28px; cursor: pointer; transition: color 0.2s; padding: 4px; }
.f-modal-close:hover { color: #f59e0b; }
.f-modal-header { padding: 32px 32px 16px; display: flex; align-items: center; gap: 16px; border-bottom: 1px solid rgba(26,74,40,0.5); }
.f-modal-icon { font-size: 32px; }
.f-modal-title { color: #f9fafb; font-size: 22px; font-weight: 800; }
.f-modal-body { padding: 24px 32px 32px; overflow-y: auto; color: #d1d5db; font-size: 15px; line-height: 1.8; }
.f-modal-body p { margin-bottom: 16px; } .f-modal-body i { color: #9ca3af; font-size: 13px; }

/* ==============================================================
   3D CUBE MODAL (RESTORED)
============================================================== */
.threed-trigger-btn { display: inline-flex !important; align-items: center !important; gap: 8px !important; } 
.threed-trigger-btn svg { animation: pulseSpin 4s infinite linear; width: 18px; height: 18px; fill: currentColor; }
.threed-modal { position: fixed; inset: 0; width: 100vw; height: 100vh; background-color: #050505; background-image: radial-gradient(circle at center, #1a1a2e 0%, #050505 100%); z-index: 9999; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; overflow: hidden; } 
.threed-modal.is-active { opacity: 1; pointer-events: auto; } 
.threed-modal-close { position: absolute; top: 30px; right: 30px; background: rgba(255, 255, 255, 0.1); color: #ffffff; border: none; width: 45px; height: 45px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 10000; transition: background 0.2s; } 
.threed-modal-close:hover { background: rgba(255, 255, 255, 0.3); }

.threed-scene-wrapper { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.threed-scene { width: 300px; height: 300px; perspective: 1000px; cursor: grab; margin: auto; transition: transform 0.3s ease; } 
.threed-scene:active { cursor: grabbing; } 
.threed-cube { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transform: translateZ(-150px); } 
.threed-face { position: absolute; width: 300px; height: 300px; background: rgba(0, 0, 0, 0.8); border: 2px solid #0ff; box-shadow: 0 0 20px rgba(0, 255, 255, 0.5), inset 0 0 20px rgba(0, 255, 255, 0.5); display: flex; justify-content: center; align-items: center; }
.threed-front { transform: rotateY(0deg) translateZ(150px); } .threed-back { transform: rotateY(180deg) translateZ(150px); } 
.threed-right { transform: rotateY(90deg) translateZ(150px); } .threed-left { transform: rotateY(-90deg) translateZ(150px); } 
.threed-top { transform: rotateX(90deg) translateZ(150px); } .threed-bottom { transform: rotateX(-90deg) translateZ(150px); }
.threed-drag-shield { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: transparent; z-index: 5; cursor: pointer; } 
.threed-drag-shield:hover { background: rgba(0, 255, 255, 0.1); } 
.threed-helper { position: absolute; bottom: 40px; color: #0ff; font-family: sans-serif; font-size: 14px; letter-spacing: 1px; text-shadow: 0 0 10px #0ff; pointer-events: none; }

.threed-cinema-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(5, 5, 5, 0.95); z-index: 10010; display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; } 
.threed-cinema-overlay.is-active { opacity: 1; pointer-events: auto; } 
.threed-cinema-player { width: 90%; max-width: 1000px; aspect-ratio: 16 / 9; background: #000; box-shadow: 0 15px 50px rgba(0, 255, 255, 0.2); border: 1px solid #0ff; border-radius: 12px; overflow: hidden; } 
.threed-cinema-close-btn { margin-top: 25px; background: #e74c3c; color: #fff; border: none; padding: 12px 30px; border-radius: 30px; font-weight: bold; font-size: 16px; cursor: pointer; transition: transform 0.2s; }
.threed-cinema-close-btn:hover { transform: scale(1.05); }

/* ==============================================================
   MASCOT & RIGHT SIDETAB (RESTORED + FIXED POSITIONING)
============================================================== */
.guestmascot-wrapper { position: fixed; z-index: 10000; cursor: grab; user-select: none; transition: transform 0.3s ease; touch-action: none; bottom: 24px !important; left: 24px !important; max-width: 80px; }
.guestmascot-img { filter: drop-shadow(0 15px 25px rgba(0,0,0,0.4)); pointer-events: none; }
.guestmascot-bubble { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: white; color: #000; padding: 12px 18px; border-radius: 20px; font-size: 14px; font-weight: 700; box-shadow: 0 10px 25px rgba(0,0,0,0.3); margin-bottom: 15px; white-space: nowrap; transition: opacity 0.5s ease; opacity: 1; display: block; pointer-events: none; }
.guestmascot-bubble::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border-width: 8px; border-style: solid; border-color: white transparent transparent transparent; }
.guestmascot-bubble.hidden { opacity: 0; }
.mascot-floating { animation: mascot-idle 3.5s ease-in-out infinite; transform-origin: center bottom; }

.mascot-sidetab { position: fixed; top: 50%; transform: translateY(-50%) translateX(100%); z-index: 9999; display: flex; align-items: stretch; transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.mascot-sidetab.fully-open { transform: translateY(-50%) translateX(0); }
.mascot-sidetab.pos-right { right: 0; flex-direction: row-reverse; }
.mascot-sidetab.pos-left { left: 0; flex-direction: row; }

#master-gamepad-toggle { position: fixed; right: 0; top: 50%; transform: translateY(-50%); background: #0f172a; border: 1px solid rgba(255,255,255,0.1); border-right: none; color: #fcd34d; font-size: 28px; padding: 14px 16px; border-radius: 16px 0 0 16px; cursor: pointer; z-index: 10000; box-shadow: -5px 0 25px rgba(0,0,0,0.6); transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
#master-gamepad-toggle:hover { background: #1e293b; padding-right: 24px; color: #f59e0b; }
body:has(.mascot-sidetab.fully-open) #master-gamepad-toggle { transform: translateY(-50%) translateX(100%); opacity: 0; pointer-events: none; }

.sidetab-vertical-nav { display: flex; flex-direction: column; gap: 8px; background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(8px); padding: 16px 12px; box-shadow: -5px 0 25px rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px 0 0 16px; border-right: none; }
.st-vnav-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; background: transparent; border: none; font-size: 13px; font-weight: 700; color: #94a3b8; padding: 12px 8px; cursor: pointer; border-radius: 12px; transition: all 0.2s; gap: 8px; }
.st-vnav-btn.active { background: rgba(245,158,11,0.2); color: #fcd34d; border: 1px solid rgba(245,158,11,0.4); }
.st-vnav-btn .icon { font-size: 22px; line-height: 1; }
.st-vnav-btn .text { writing-mode: vertical-rl; transform: rotate(180deg); margin-top: 4px; letter-spacing: 1.5px; text-transform: uppercase; font-size: 11px; }

.sidetab-content { background: #0f172a; width: 280px; min-height: 300px; position: absolute; top: 50%; opacity: 0; pointer-events: none; border-radius: 16px; border: 1px solid rgba(255,255,255,0.1); box-shadow: -15px 0 40px rgba(0,0,0,0.5); transition: all 0.3s; padding: 24px; color: #f8fafc; right: 100%; margin-right: 15px; transform: translateY(-50%) translateX(20px) scale(0.95); }
.mascot-sidetab.open .sidetab-content { opacity: 1; pointer-events: auto; transform: translateY(-50%) translateX(0) scale(1); }
.sidetab-close-btn { position: absolute; top: 12px; left: 15px; background: none; border: none; font-size: 24px; color: #64748b; cursor: pointer; }
.st-pane { display: block; }
.st-pane.hidden { display: none !important; }
.btn-toy { display: block; width: 100%; text-align: left; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); padding: 14px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; color: #e2e8f0; margin-bottom: 10px; cursor: pointer; transition: all 0.2s; }
.btn-toy:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.3); }

/* ==============================================================
   RC AIRPLANE & TOYS (RESTORED)
============================================================== */
#rc-wheel-container { position: relative; width: 220px; height: 220px; border-radius: 50%; background: #1e293b; border: 16px solid #94a3b8; display: flex; overflow: hidden; box-shadow: inset 0 0 20px rgba(0,0,0,0.5); margin: 0 auto; user-select: none; -webkit-user-select: none; touch-action: none; }
.rc-steer { flex: 1; height: 100%; cursor: pointer; transition: background 0.1s; user-select: none; touch-action: none; }
.rc-steer.left { background: rgba(0,0,0,0.1); border-right: 2px solid rgba(0,0,0,0.2); }
.rc-steer.right { background: rgba(0,0,0,0.15); border-left: 2px solid rgba(0,0,0,0.2); }
.rc-steer:active { background: rgba(245,158,11,0.4); }
.rc-boost-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 90px; height: 90px; border-radius: 50%; background: #ef4444; border: 4px solid #b91c1c; color: white; font-weight: 900; font-size: 14px; box-shadow: 0 10px 20px rgba(0,0,0,0.5); cursor: pointer; transition: transform 0.1s; display: flex; align-items: center; justify-content: center; flex-direction: column; user-select: none; touch-action: none; }
#rc-remote-ui { position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%); background: transparent; z-index: 10006; display: flex; flex-direction: column; align-items: center; }
#rc-timer-ui { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); background: rgba(0, 0, 0, 0.85); color: #fcd34d; font-weight: 900; padding: 10px 24px; border-radius: 30px; text-transform: uppercase; letter-spacing: 2px; box-shadow: 0 10px 25px rgba(0,0,0,0.5); z-index: 10010; font-size: 20px; pointer-events: none; border: 2px solid #f59e0b; }
.magic-particle { position: fixed; pointer-events: none; border-radius: 50%; background: radial-gradient(circle, #fcd34d 0%, #f59e0b 60%, transparent 100%); box-shadow: 0 0 10px #f59e0b; z-index: 9998; transition: transform 0.5s ease-out, opacity 0.5s ease-out; }

/* ==============================================================
   PURE CSS 3D K-COIN INJECTION (RESTORED)
============================================================== */
.k-coin-css-wrapper { width: 38px; height: 38px; perspective: 800px; margin-right: 6px; display: inline-block; }
.k-coin-css { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; animation: spin-coin-css 4s linear infinite; }
.k-coin-face { position: absolute; width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #fcd34d 0%, #d97706 85%); border: 2px solid #b45309; box-shadow: inset 0 0 6px rgba(255,255,255,0.6), 0 4px 8px rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; font-weight: 900; font-family: 'Inter', sans-serif; font-size: 22px; color: #ffffff; text-shadow: 1px 1px 0 #92400e; backface-visibility: hidden; }
.k-coin-front { transform: rotateY(0deg) translateZ(2px); }
.k-coin-back { transform: rotateY(180deg) translateZ(2px); }
.k-coin-edge { position: absolute; width: 100%; height: 100%; border-radius: 50%; background: #b45309; transform: translateZ(0px); }

/* ==============================================================
   GALLERY SECTION (CAROUSEL SNEAK PEEK & 3D EFFECTS)
============================================================== */
.gallery-section { padding: clamp(60px, 8vh, 100px) 0; overflow: hidden; }
.gallery-header { text-align: center; margin-bottom: 20px; }

.gallery-carousel-wrapper { position: relative; max-width: 1600px; width: 94%; margin: 0 auto; perspective: 1200px; }

.kloot-gallery-grid { display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 40px 10px; width: 100%; scrollbar-width: none; -ms-overflow-style: none; }
.kloot-gallery-grid::-webkit-scrollbar { display: none; }

.gallery-card { flex: 0 0 clamp(320px, 30vw, 450px); scroll-snap-align: center; background: #0a1a10; border: 1px solid #1a4a28; border-radius: 16px; overflow: hidden; cursor: pointer; position: relative; transform-style: preserve-3d; transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease; }
.gallery-card:hover { transform: translateY(-15px) rotateX(8deg) rotateY(-8deg) translateZ(30px); box-shadow: -20px 30px 60px rgba(0,0,0,0.8), 0 0 25px rgba(245, 158, 11, 0.4); border-color: #fcd34d; }

.gallery-card::before { content: ''; position: absolute; top: 0; left: -150%; width: 50%; height: 100%; background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(245,158,11,0.2) 50%, rgba(255,255,255,0) 100%); transform: skewX(-25deg); z-index: 10; pointer-events: none; }
.gallery-card:hover::before { animation: unhinged-glare 1.5s infinite linear; }
@keyframes unhinged-glare { 0% { left: -150%; } 100% { left: 250%; } }

.g-img-wrapper { width: 100%; aspect-ratio: 16/9; overflow: hidden; position: relative; }
.g-img-wrapper::after { content: '🔍 Expand'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) translateZ(40px); background: rgba(245,158,11,0.9); color: #000; font-weight: 800; font-size: 14px; padding: 10px 20px; border-radius: 30px; opacity: 0; transition: opacity 0.3s; pointer-events: none; box-shadow: 0 10px 20px rgba(0,0,0,0.5); }
.gallery-card:hover .g-img-wrapper::after { opacity: 1; }

.g-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.gallery-card:hover .g-img { transform: scale(1.12); filter: brightness(0.7); }

.g-info { padding: 20px; border-top: 1px solid rgba(255,255,255,0.05); transform: translateZ(20px); background: #0a1a10;}
.g-title { color: #f9fafb; font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.g-caption { color: #9ca3af; font-size: 14px; line-height: 1.5; }

.gallery-controls-bottom { display: flex; align-items: center; justify-content: center; gap: 24px; margin-top: 10px; }
.g-scroll-btn { width: 54px; height: 54px; border-radius: 50%; background: rgba(5, 13, 8, 0.9); border: 1px solid rgba(245, 158, 11, 0.5); color: #fcd34d; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; box-shadow: 0 5px 15px rgba(0,0,0,0.5); }
.g-scroll-btn svg { width: 28px; height: 28px; }
.g-scroll-btn:hover { background: #f59e0b; color: #050d08; border-color: #f59e0b; transform: scale(1.15) translateY(-2px); box-shadow: 0 10px 25px rgba(245,158,11,0.4); }

/* ==============================================================
   IMAGE MODAL (FULLSCREEN & NAVIGATION)
============================================================== */
.i-modal-overlay { position: fixed; inset: 0; background: rgba(3, 10, 5, 0.95); backdrop-filter: blur(12px); z-index: 10010; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; padding: 20px; }
.i-modal-overlay.is-active { opacity: 1; pointer-events: auto; }
.i-modal-content { position: relative; max-width: 1200px; width: 100%; display: flex; flex-direction: column; align-items: center; transform: scale(0.95); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.i-modal-overlay.is-active .i-modal-content { transform: scale(1); }

.i-modal-close { position: absolute; top: -45px; right: 0; background: transparent; border: none; color: #fcd34d; font-size: 40px; cursor: pointer; transition: color 0.2s, transform 0.2s; z-index: 5; }
.i-modal-close:hover { color: #f59e0b; transform: rotate(90deg); }

#i-modal-img { max-width: 90vw; max-height: 80vh; border-radius: 12px; box-shadow: 0 25px 50px rgba(0,0,0,0.8); border: 1px solid rgba(245,158,11,0.3); object-fit: contain; user-select: none; cursor: grab; }
#i-modal-img:active { cursor: grabbing; }

.i-modal-caption { color: #d1fae5; font-size: 16px; font-weight: 500; margin-top: 15px; text-align: center; background: rgba(0,0,0,0.6); padding: 10px 20px; border-radius: 30px; border: 1px solid #1a4a28; }

.i-modal-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(5, 13, 8, 0.8); border: 1px solid rgba(245, 158, 11, 0.5); color: #fcd34d; font-size: 24px; width: 50px; height: 50px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; z-index: 5; }
.i-modal-nav:hover { background: #f59e0b; color: #050d08; transform: translateY(-50%) scale(1.1); }
.i-modal-nav.left { left: -60px; }
.i-modal-nav.right { right: -60px; }

/* NEW MAGNIFIER GLASS (4x Area) */
.magnifier-glass { 
    position: absolute; 
    width: 200px; height: 200px; /* 4x the original area */
    border-radius: 20px; /* slightly rounder for the larger size */
    border: 3px solid #f59e0b; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.8), inset 0 0 20px rgba(0,0,0,0.5); 
    pointer-events: none; 
    display: none; 
    background-repeat: no-repeat; 
    z-index: 10020; 
    background-color: #050d08; 
    transform: translate(-50%, -50%); 
}
.magnifier-glass.is-active { display: block; }

/* ==============================================================
   RESPONSIVE MEDIA QUERIES
============================================================== */
@media screen and (max-width: 991px) {
    .nav-wrapper { padding-left: 15px; padding-right: 15px; }
    .nav-brand-link { grid-column: 1; justify-self: start; }
    .main-nav-burger { grid-column: 2; justify-self: center; display: flex; align-items: center; justify-content: center; flex-shrink: 0; min-width: 48px; min-height: 48px; padding: 8px; background: transparent; border: none; cursor: pointer; color: #fcd34d; z-index: 101; }
    .auth-wrapper { grid-column: 3; justify-self: end; }

    /* --- THE INDESTRUCTIBLE CENTERED MENU --- */
    .kloot-nav-links { 
        display: none; 
        position: fixed !important; 
        top: 85px !important; 
        left: 0 !important; 
        right: 0 !important; 
        margin: 0 auto !important; 
        width: 90vw !important; 
        max-width: 380px !important; 
        background: #0a1a10; 
        flex-direction: column; 
        padding: 30px 20px; 
        align-items: center; 
        border: 3px solid #f59e0b;
        border-radius: 20px;
        box-shadow: 0 20px 40px rgba(0,0,0,0.8), 0 0 0 2000px rgba(5, 13, 8, 0.85); 
        z-index: 100000 !important;
    }
    
    .kloot-nav-links.mobile-active { 
        display: flex !important;
        animation: mobileMenuPop 0.3s ease-out forwards;
    }
    
    @keyframes mobileMenuPop {
        0% { opacity: 0; transform: translateY(-20px); }
        100% { opacity: 1; transform: translateY(0); }
    }
    
    .kloot-nav-link { 
        padding: 14px 20px; 
        width: 100%; 
        border-bottom: none !important; 
        background: rgba(255,255,255,0.05);
        margin: 6px 0;
        border-radius: 12px;
        text-align: center;
        font-size: 18px;
        font-weight: 700 !important;
        border: 2px solid transparent;
        color: #d1fae5 !important;
    }
    .kloot-nav-link:hover {
        background: rgba(245,158,11,0.2);
        border-color: #f59e0b;
        color: #fcd34d !important;
    }
    
    .nav-dropdown { width: 100%; }
    .nav-dropdown-toggle { justify-content: center; pointer-events: none; }
    .nav-dropdown-toggle svg { display: none; } 
    
    .nav-dropdown-menu { 
        position: static; 
        box-shadow: none; 
        opacity: 1; 
        visibility: visible; 
        transform: none; 
        display: flex !important; 
        flex-direction: column;
        padding: 10px; 
        border: 2px dashed rgba(245,158,11,0.3); 
        background: rgba(0,0,0,0.3) !important;
        margin-top: 10px;
        border-radius: 15px;
    }
    .dropdown-item { text-align: center; padding: 12px; font-size: 16px; color: #d1fae5 !important; }

    /* Moodle Light Theme Overrides */
    .moodle-nav-theme .kloot-nav-links { 
        background: #ffffff !important; 
        border: 4px solid #f59e0b !important;
        box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 0 2000px rgba(15, 23, 42, 0.75) !important;
    }
    .moodle-nav-theme .kloot-nav-link { 
        background: #f8fafc;
        border: 2px solid #e2e8f0;
        color: #334155 !important; 
    }
    .moodle-nav-theme .kloot-nav-link:hover { 
        background: #fef3c7;
        border-color: #f59e0b;
        color: #0f172a !important; 
    }
    .moodle-nav-theme .nav-dropdown-menu {
        background: #f1f5f9 !important;
        border: 2px dashed #cbd5e1 !important;
    }
    .moodle-nav-theme .dropdown-item { color: #475569 !important; font-weight: 600; }
    .moodle-nav-theme .dropdown-item:hover { color: #0f172a !important; background: rgba(245,158,11,0.2); border-radius: 8px;}
}

@media (max-width: 1024px) {
    .guestmascot-wrapper {
        bottom: 12px !important;
        left: 12px !important;
        transform: scale(0.85);
    }
}

@media (max-width: 768px) {
    .threed-scene { transform: scale(0.8); }
    .kloot-hero-grid { grid-template-columns: 1fr; padding: 40px 20px; }
    .kloot-courses-grid, .kloot-steps-grid, .kloot-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .support-banner-content { flex-direction: column; text-align: center; gap: 10px; }
    
    .kloot-footer-grid { grid-template-columns: 1fr !important; gap: 40px; }
    .books-section { padding: 3rem 15px; }

    /* Gallery adjustments */
    .gallery-carousel-wrapper { width: 100%; }
    .kloot-gallery-grid { padding: 20px 5%; scroll-snap-type: x mandatory; }
    .gallery-card { flex: 0 0 85vw; scroll-snap-align: center; } 

    /* Image Modal adjustments */
    .i-modal-close { right: 10px; top: -50px; }
    .i-modal-nav.left { left: 10px; }
    .i-modal-nav.right { right: 10px; }
    #i-modal-img { max-height: 70vh; max-width: 100vw; border-radius: 8px; }
}

@media (max-width: 480px) {
    .threed-scene { transform: scale(0.65); } 
    .kloot-courses-grid, .kloot-steps-grid, .kloot-stats-grid { grid-template-columns: 1fr; }
}

/* ==============================================================
   STATIC TEXT PAGES (Privacy, Terms, About Us, etc.)
============================================================== */
body[data-page-type="static"] { background: #050d08; background-image: radial-gradient(ellipse at top center, #0d3320 0%, #050d08 80%); }
.static-page-wrapper { max-width: 900px; margin: 120px auto 100px; padding: 60px; background: #0a1a10; border: 1px solid #1a4a28; border-radius: 24px; box-shadow: 0 25px 50px rgba(0,0,0,0.5); position: relative; z-index: 10; }
.static-page-header { border-bottom: 1px solid rgba(245,158,11,0.2); padding-bottom: 24px; margin-bottom: 40px; }
.static-title { font-size: 42px; font-weight: 900; color: #f9fafb; margin-bottom: 12px; letter-spacing: -0.02em; }
.static-meta { color: #f59e0b; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.static-content h2 { color: #fcd34d; font-size: 24px; font-weight: 800; margin: 40px 0 20px; }
.static-content p, .static-content ul { color: #d1d5db; font-size: 17px; line-height: 1.8; margin-bottom: 20px; }
.static-content ul { padding-left: 24px; }
.static-content li { margin-bottom: 12px; }
.static-content strong { color: #f9fafb; }

@media (max-width: 768px) {
    .static-page-wrapper { margin: 100px 20px 60px; padding: 30px 20px; }
    .static-title { font-size: 32px; }
}

/* ==============================================================
   PROMOTIONAL FLOATING PILL (Physical Collapse Animation)
============================================================== */
.kloot-promo-pill {
    position: relative; 
    
    /* ⚡ DYNAMIC LAYOUT VARIABLES 
       We use variables so the animation scales perfectly on Desktop AND Mobile */
    --p-mt: 15px;
    --p-mb: -50px;
    --p-pad-v: 10px;
    --p-pad-h: 24px;
    --p-height: 150px;

    margin: var(--p-mt) auto var(--p-mb); 
    padding: var(--p-pad-v) var(--p-pad-h);
    
    background: rgba(5, 13, 8, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid #f59e0b;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 90;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6), 0 0 15px rgba(245, 158, 11, 0.2);
    
    /* CRITICAL: Hides the text so it doesn't spill out when the box collapses to 0px */
    overflow: hidden; 
    
    width: max-content;
    max-width: 95vw;

    /* Hidden by default, activated by JS */
    opacity: 0;
    transform: translateY(-20px);
}

.kloot-promo-pill.show {
    /* 14-Second Infinite Loop: Visible -> Shrink -> Vanish -> Pop Back */
    animation: vanishAndSlide 14s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

/* --- THE MASTER ANIMATION LOOP --- */
@keyframes vanishAndSlide {
    /* Phase 1: Fully visible and full size (Holds for 8 seconds) */
    0%, 60% {
        opacity: 1;
        transform: scale(1) translateY(0);
        max-height: var(--p-height);
        margin-top: var(--p-mt);
        margin-bottom: var(--p-mb);
        padding-top: var(--p-pad-v);
        padding-bottom: var(--p-pad-v);
        border-width: 1px;
    }
    /* Phase 2: Slowly shrinks, fades, and starts pulling the text below upwards */
    80% {
        opacity: 0;
        transform: scale(0.8) translateY(-10px);
        max-height: 30px;
        margin-top: calc(var(--p-mt) / 2);
        margin-bottom: calc(var(--p-mb) / 2);
        padding-top: 2px;
        padding-bottom: 2px;
        border-width: 1px;
    }
    /* Phase 3: Completely vanished. The box is exactly 0px by 0px.
       The "Learn Quran" text slides up seamlessly to fill the gap. */
    85%, 92% {
        opacity: 0;
        transform: scale(0) translateY(-20px);
        max-height: 0px;
        margin-top: 0px;
        margin-bottom: 0px; 
        padding-top: 0px;
        padding-bottom: 0px;
        border-width: 0px;
    }
    /* Phase 4: Popping back into existence quickly */
    96% {
        opacity: 1;
        transform: scale(1.05) translateY(0);
        max-height: var(--p-height);
        margin-top: var(--p-mt);
        margin-bottom: var(--p-mb);
        padding-top: var(--p-pad-v);
        padding-bottom: var(--p-pad-v);
        border-width: 1px;
    }
    /* Phase 5: Rested state */
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        max-height: var(--p-height);
        margin-top: var(--p-mt);
        margin-bottom: var(--p-mb);
        padding-top: var(--p-pad-v);
        padding-bottom: var(--p-pad-v);
        border-width: 1px;
    }
}

/* --- INNER CONTENT STYLING --- */
.promo-icon {
    font-size: 28px;
    animation: pulse-gold-strong 2s infinite;
    border-radius: 50%;
    flex-shrink: 0; /* Prevents icon from squishing during animation */
}

.promo-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 320px; /* Forces text to stay in a straight line while the box shrinks */
}

.promo-text {
    color: #f9fafb;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.02em;
    white-space: nowrap; /* Prevents text from breaking into weird lines */
}

.promo-highlight {
    color: #fcd34d;
    font-weight: 800;
}

.promo-date-inline {
    color: #d1d5db;
    font-weight: 700;
    margin-left: 6px;
    padding-left: 8px;
    border-left: 1px solid rgba(245, 158, 11, 0.4);
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.05em;
}

.promo-timer-row {
    display: flex;
    justify-content: center;
    width: 100%;
}

.promo-timer {
    background: rgba(245, 158, 11, 0.1);
    padding: 6px 20px;
    border-radius: 12px;
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #f59e0b;
    font-family: monospace;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 2px;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    .kloot-promo-pill {
        /* Update CSS variables for mobile layout */
        --p-mb: -30px;
        --p-pad-v: 14px;
        --p-pad-h: 16px;
        --p-height: 250px; /* Needs to be larger to fit stacked mobile content */

        flex-direction: column;
        gap: 8px;
        border-radius: 20px;
        width: 92vw;
    }
    
    .promo-icon { display: none; } 
    .promo-content-wrapper { min-width: unset; width: 100%; }
    .promo-text { font-size: 13px; line-height: 1.6; white-space: normal; }
    
    .promo-date-inline {
        display: inline-block;
        border-left: none;
        margin-left: 0;
        padding-left: 0;
        color: #9ca3af;
    }
    .promo-date-inline::before {
        content: "• ";
        color: #f59e0b;
        margin: 0 4px;
    }
    .promo-timer {
        font-size: 18px; 
        width: 100%;
        text-align: center;
    }
}

/* MAGICAL BOOK BACKGROUND FOR HERO GRAPHIC */
.hero-graphic {
    background-image: url('iqra-book-bg.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), inset 0 0 80px rgba(0, 0, 0, 0.7);
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    max-width: 450px;
    width: 100%;
    margin: 0 auto;
}

/* Add a dark overlay to make it blend perfectly */
.hero-graphic::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 30%, rgba(11,26,18,0.7) 70%, #0b1a12 100%);
    pointer-events: none;
    z-index: 0;
}

.hero-graphic-circle {
    z-index: 1;
}


/* Iqra Book Title */
.hero-book-title {
    position: absolute;
    top: 30px;
    left: 0;
    width: 100%;
    text-align: center;
    color: #fcd34d;
    font-family: 'Amiri', serif;
    font-size: 34px;
    font-weight: bold;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.9);
    z-index: 10;
    margin: 0;
    pointer-events: none;
    letter-spacing: 1px;
}
