@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Fraunces:ital,wght@0,700;0,900;1,700&display=swap');

:root {
  --primary: #7C3AED;
  --primary-light: #A78BFA;
  --secondary: #EC4899;
  --accent: #F59E0B;
  --success: #10B981;
  --bg-dark: #0D0815;
  --bg-card: rgba(255,255,255,0.04);
  --border: rgba(255,255,255,0.10);
  --text-primary: #F8F5FF;
  --text-secondary: #C4B5FD;
  --text-muted: #7C6FA0;
  --gradient-hero: linear-gradient(135deg, #0D0815 0%, #1A0A2E 50%, #0F1A3E 100%);
  --gradient-primary: linear-gradient(135deg, #7C3AED, #EC4899);
  --gradient-gold: linear-gradient(135deg, #F59E0B, #EF4444);
  --radius-lg: 20px;
  --radius-full: 9999px;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-display: 'Fraunces', serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--gradient-hero); color: var(--text-primary); line-height: 1.6; min-height: 100vh; overflow-x: hidden; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 6rem 0; }
.section-alt { background: rgba(255,255,255,0.02); }

.gradient-text { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.display { font-family: var(--font-display); font-style: italic; }

/* Cards */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); backdrop-filter: blur(20px); transition: var(--transition); padding: 2rem; }
.card:hover { transform: translateY(-5px); border-color: rgba(167,139,250,0.3); box-shadow: 0 20px 40px rgba(124,58,237,0.15); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.75rem; border-radius: var(--radius-full); font-weight: 600; cursor: pointer; text-decoration: none; transition: var(--transition); font-family: var(--font-body); border: none; }
.btn-primary { background: var(--gradient-primary); color: white; }
.btn-primary:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: 0 8px 25px rgba(124,58,237,0.4); }
.btn-outline { border: 1px solid var(--border); color: var(--text-primary); background: transparent; }
.btn-outline:hover { border-color: var(--primary-light); color: var(--primary-light); }
.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.85rem; }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.05rem; }
.glow-btn { box-shadow: 0 0 30px rgba(124,58,237,0.3); }

/* NAVBAR */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; padding: 1rem 0; transition: var(--transition); background: rgba(13,8,21,0.85); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); }
.navbar.scrolled { background: rgba(13,8,21,0.95); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nav-logo { display: flex; align-items: center; gap: 0.6rem; font-weight: 800; font-size: 1.2rem; text-decoration: none; color: var(--text-primary); }
.nav-logo-icon { width: 36px; height: 36px; background: var(--gradient-primary); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.nav-links { display: flex; gap: 2rem; list-style: none; align-items: center; }
.nav-links a { color: var(--text-secondary); font-weight: 500; font-size: 0.9rem; text-decoration: none; transition: var(--transition); }
.nav-links a:hover, .nav-links a.active { color: var(--primary-light); font-weight: 700; }
.nav-actions { display: flex; align-items: center; gap: 0.75rem; }
.hamburger { display: none; background: none; border: 1px solid var(--border); color: var(--text-primary); width: 38px; height: 38px; border-radius: 8px; cursor: pointer; align-items: center; justify-content: center; }

/* Lang Switcher */
.lang-switcher { cursor: pointer; display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.85rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-full); font-size: 0.85rem; position: relative; user-select: none; }
.lang-switcher:hover { border-color: var(--primary-light); }
.lang-dropdown { display: none; position: absolute; top: calc(100% + 8px); right: 0; background: rgba(20,12,35,0.98); border: 1px solid var(--border); border-radius: 12px; padding: 0.5rem; min-width: 120px; z-index: 1001; backdrop-filter: blur(20px); box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.lang-dropdown.open { display: block; animation: fadeDown 0.2s ease; }
.lang-item { padding: 0.45rem 0.9rem; cursor: pointer; font-size: 0.85rem; border-radius: 8px; transition: var(--transition); }
.lang-item:hover { background: rgba(124,58,237,0.2); color: var(--primary-light); }

/* HERO */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: 5rem; position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.25; animation: float 8s ease-in-out infinite; }
.orb1 { width: 500px; height: 500px; background: radial-gradient(circle, #7C3AED, transparent); top: -100px; right: -100px; }
.orb2 { width: 400px; height: 400px; background: radial-gradient(circle, #EC4899, transparent); bottom: -50px; left: -100px; animation-delay: -3s; }
.orb3 { width: 300px; height: 300px; background: radial-gradient(circle, #3B82F6, transparent); top: 50%; left: 40%; animation-delay: -6s; }
.hero .container { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; position: relative; z-index: 1; }

.hero-badge { display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(124,58,237,0.15); border: 1px solid rgba(124,58,237,0.3); border-radius: var(--radius-full); padding: 0.4rem 1rem; font-size: 0.78rem; font-weight: 600; color: var(--primary-light); margin-bottom: 1.5rem; }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary-light); animation: pulse 2s infinite; }
.hero h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 1.1; margin-bottom: 1.5rem; font-weight: 800; }
.hero-description { font-size: 1.15rem; color: var(--text-secondary); margin-bottom: 2.5rem; max-width: 500px; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }
.hero-stats { display: flex; align-items: center; gap: 2rem; }
.hero-stat { text-align: center; }
.hero-stat-number { font-size: 2.2rem; font-weight: 800; color: var(--primary-light); line-height: 1; }
.hero-stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.25rem; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* Hero Visual */
.hero-visual { position: relative; display: flex; align-items: center; justify-content: center; }
.hero-phone { width: 240px; height: 420px; background: rgba(255,255,255,0.06); border: 1px solid var(--border); border-radius: 30px; padding: 1.5rem 1rem; backdrop-filter: blur(20px); box-shadow: 0 30px 80px rgba(0,0,0,0.4); animation: float 6s ease-in-out infinite; }
.phone-header { font-weight: 700; font-size: 0.85rem; color: var(--primary-light); margin-bottom: 1rem; text-align: center; }
.phone-module { padding: 0.6rem 0.8rem; border-radius: 10px; font-size: 0.78rem; margin-bottom: 0.5rem; border: 1px solid var(--border); background: rgba(255,255,255,0.03); }
.active-mod { border-color: rgba(124,58,237,0.5); background: rgba(124,58,237,0.15); }
.phone-progress { margin-top: 1rem; }
.prog-label { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 0.4rem; }
.prog-bar { height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; }
.prog-fill { height: 100%; width: 67%; background: var(--gradient-primary); border-radius: 3px; }
.prog-pct { font-size: 0.78rem; color: var(--primary-light); margin-top: 0.25rem; font-weight: 700; }
.floating-card { position: absolute; background: rgba(20,12,35,0.9); border: 1px solid var(--border); border-radius: 14px; padding: 0.75rem 1rem; display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; font-weight: 600; backdrop-filter: blur(20px); box-shadow: 0 8px 30px rgba(0,0,0,0.3); white-space: nowrap; animation: float 7s ease-in-out infinite; }
.fc1 { top: 0; left: -20px; animation-delay: -1s; }
.fc2 { top: 50%; right: -30px; animation-delay: -3s; }
.fc3 { bottom: 10%; left: -30px; animation-delay: -5s; }
.fc-icon { font-size: 1.2rem; }

.scroll-indicator { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.scroll-dot { width: 6px; height: 30px; border: 2px solid var(--border); border-radius: 3px; position: relative; overflow: hidden; }
.scroll-dot::after { content: ''; position: absolute; top: 4px; left: 50%; transform: translateX(-50%); width: 2px; height: 8px; background: var(--primary-light); border-radius: 1px; animation: scrollAnim 2s ease-in-out infinite; }

/* Partners Bar */
.partners-bar { padding: 2rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.02); }
.partners-label { text-align: center; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 1.25rem; }
.partners-logos { display: flex; justify-content: center; align-items: center; gap: 3rem; flex-wrap: wrap; }
.partner-flag { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--text-secondary); font-weight: 500; }
.partner-flag span:first-child { font-size: 1.8rem; }

/* Section Header */
.section-header { text-align: center; margin-bottom: 4rem; }
.section-eyebrow { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; color: var(--primary-light); margin-bottom: 1rem; }
.section-header h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 800; margin-bottom: 1rem; }
.section-header p { font-size: 1.05rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto; }
.section-cta { text-align: center; margin-top: 3rem; }

/* Features */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.feature-card { position: relative; overflow: hidden; }
.feature-icon-wrap { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 1.25rem; }
.purple { background: rgba(124,58,237,0.2); color: #A78BFA; }
.pink { background: rgba(236,72,153,0.2); color: #F9A8D4; }
.amber { background: rgba(245,158,11,0.2); color: #FCD34D; }
.green { background: rgba(16,185,129,0.2); color: #6EE7B7; }
.blue { background: rgba(59,130,246,0.2); color: #93C5FD; }
.rose { background: rgba(244,63,94,0.2); color: #FDA4AF; }
.feature-card h4 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }

/* Courses */
.courses-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; }
.course-card { position: relative; }
.course-num { font-size: 3rem; font-weight: 900; color: rgba(255,255,255,0.05); position: absolute; top: 1rem; right: 1.5rem; line-height: 1; font-family: var(--font-display); }
.course-tag { display: inline-block; padding: 0.25rem 0.75rem; border-radius: var(--radius-full); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem; }
.purple-tag { background: rgba(124,58,237,0.2); color: #A78BFA; }
.pink-tag { background: rgba(236,72,153,0.2); color: #F9A8D4; }
.amber-tag { background: rgba(245,158,11,0.2); color: #FCD34D; }
.green-tag { background: rgba(16,185,129,0.2); color: #6EE7B7; }
.blue-tag { background: rgba(59,130,246,0.2); color: #93C5FD; }
.rose-tag { background: rgba(244,63,94,0.2); color: #FDA4AF; }
.course-card h4 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.course-card p { color: var(--text-secondary); font-size: 0.88rem; margin-bottom: 1rem; }
.course-meta { font-size: 0.8rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.5rem; }
.course-meta i.fa-star { color: var(--accent); }

/* Marketplace */
.market-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.market-card { padding: 0; overflow: hidden; }
.market-img { height: 140px; display: flex; align-items: center; justify-content: center; font-size: 4rem; border-bottom: 1px solid var(--border); }
.market-img1 { background: linear-gradient(135deg, rgba(124,58,237,0.2), rgba(236,72,153,0.2)); }
.market-img2 { background: linear-gradient(135deg, rgba(245,158,11,0.2), rgba(16,185,129,0.2)); }
.market-img3 { background: linear-gradient(135deg, rgba(236,72,153,0.2), rgba(239,68,68,0.2)); }
.market-img4 { background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(124,58,237,0.2)); }
.market-body { padding: 1.25rem; }
.market-country { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.market-body h5 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.4rem; }
.market-body p { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.market-price { font-size: 0.9rem; font-weight: 700; color: var(--primary-light); }

/* Community */
.community-split { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.community-text h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 800; margin-bottom: 1rem; }
.community-text p { color: var(--text-secondary); margin-bottom: 1.5rem; }
.community-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.community-list li { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 0.95rem; color: var(--text-secondary); }
.community-list li i { color: var(--success); margin-top: 3px; flex-shrink: 0; }
.testimonial-card { padding: 1.5rem; position: relative; }
.t-quote { font-size: 4rem; line-height: 0.5; color: var(--primary); font-family: Georgia, serif; margin-bottom: 0.75rem; display: block; }
.testimonial-card p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 1rem; font-style: italic; }
.t-author { display: flex; align-items: center; gap: 0.75rem; }
.t-avatar { font-size: 1.8rem; }
.t-author strong { font-size: 0.9rem; }
.t-author small { color: var(--text-muted); font-size: 0.8rem; }

/* About */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.about-card { text-align: center; }
.about-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.about-card h5 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; }
.about-card p { color: var(--text-secondary); font-size: 0.9rem; }

/* Lang Grid */
.lang-grid { display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; margin-top: 2rem; }
.lang-chip { padding: 0.6rem 1.25rem; border: 1px solid var(--border); border-radius: var(--radius-full); cursor: pointer; font-size: 0.9rem; transition: var(--transition); font-weight: 500; }
.lang-chip:hover, .lang-chip.active { background: var(--primary); border-color: var(--primary); color: white; transform: translateY(-2px); }

/* Footer */
footer { padding: 4rem 0 2rem; border-top: 1px solid var(--border); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 2rem; margin-bottom: 2rem; }
.footer-brand { display: flex; align-items: center; gap: 0.75rem; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; text-decoration: none; transition: var(--transition); }
.footer-links a:hover { color: var(--primary-light); }
.footer-flags { display: flex; gap: 0.5rem; font-size: 1.5rem; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.5rem; text-align: center; color: var(--text-muted); font-size: 0.82rem; }

/* AI Chat */
.ai-chat-btn { position: fixed; bottom: 2rem; right: 2rem; width: 62px; height: 62px; background: var(--gradient-primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; cursor: pointer; z-index: 1000; box-shadow: 0 4px 20px rgba(124,58,237,0.5); color: white; transition: transform 0.2s, box-shadow 0.2s; }
.ai-chat-btn:hover { transform: scale(1.08); box-shadow: 0 8px 30px rgba(124,58,237,0.7); }
.chat-btn-pulse { position: absolute; width: 100%; height: 100%; border-radius: 50%; background: rgba(124,58,237,0.4); animation: ripple 2s ease-out infinite; }
.ai-chat-panel { position: fixed; bottom: 6rem; right: 2rem; width: 380px; height: 530px; max-width: calc(100vw - 2rem); max-height: calc(100vh - 8rem); background: rgba(13,8,21,0.98); border: 1px solid var(--border); border-radius: 24px; backdrop-filter: blur(24px); display: none; flex-direction: column; z-index: 1000; overflow: hidden; box-shadow: 0 24px 70px rgba(0,0,0,0.7); }
.ai-chat-panel.open { display: flex; animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.chat-header { padding: 0.85rem 1.15rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; background: linear-gradient(135deg, rgba(124,58,237,0.2) 0%, rgba(236,72,153,0.15) 100%); }
.chat-header-info { display: flex; align-items: center; gap: 0.65rem; }
.chat-avatar { font-size: 1.6rem; }
.chat-header-actions { display: flex; align-items: center; gap: 0.4rem; }
.chat-header-btn { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); color: #F8F5FF; font-size: 0.78rem; font-weight: 600; padding: 0.35rem 0.65rem; border-radius: 8px; cursor: pointer; display: flex; align-items: center; gap: 0.3rem; transition: all 0.2s; font-family: inherit; }
.chat-header-btn:hover { background: rgba(124,58,237,0.25); border-color: var(--primary-light); color: #FFF; }
.chat-header-btn.active { background: var(--gradient-primary); border-color: transparent; }

/* History View overlay inside Chat panel */
.chat-history-view { position: absolute; inset: 56px 0 0 0; background: #0F091E; z-index: 20; display: none; flex-direction: column; overflow-y: auto; padding: 1rem; }
.chat-history-view.open { display: flex; animation: fadeDown 0.2s ease; }
.chat-history-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.85rem; padding-bottom: 0.5rem; border-bottom: 1px solid rgba(255,255,255,0.08); font-size: 0.85rem; font-weight: 700; color: #A78BFA; }
.chat-session-item { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 0.75rem 0.9rem; margin-bottom: 0.6rem; cursor: pointer; transition: all 0.2s; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.chat-session-item:hover { background: rgba(124,58,237,0.18); border-color: rgba(124,58,237,0.4); transform: translateY(-1px); }
.chat-session-item.active-session { border-color: #7C3AED; background: rgba(124,58,237,0.15); }
.chat-session-title { font-size: 0.82rem; font-weight: 700; color: #F8F5FF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.chat-session-date { font-size: 0.68rem; color: rgba(248,245,255,0.45); margin-top: 0.2rem; }
.chat-session-del { background: none; border: none; color: rgba(248,245,255,0.4); cursor: pointer; padding: 0.3rem; border-radius: 6px; font-size: 0.8rem; }
.chat-session-del:hover { color: #EF4444; background: rgba(239,68,68,0.1); }

.chat-messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.85rem; }
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.chat-msg { padding: 0.8rem 1.05rem; border-radius: 16px; font-size: 0.88rem; max-width: 88%; line-height: 1.55; word-wrap: break-word; }
.chat-msg-ai { background: rgba(124,58,237,0.16); border: 1px solid rgba(124,58,237,0.25); align-self: flex-start; border-bottom-left-radius: 4px; color: #F8F5FF; }
.chat-msg-user { background: var(--gradient-primary); align-self: flex-end; border-bottom-right-radius: 4px; color: #FFF; box-shadow: 0 4px 15px rgba(124,58,237,0.3); }
.chat-msg-time { font-size: 0.65rem; color: rgba(248,245,255,0.4); margin-top: 0.35rem; text-align: right; }
.chat-input-area { padding: 0.75rem 1rem; display: flex; gap: 0.5rem; border-top: 1px solid var(--border); background: rgba(18,10,30,0.8); }
.chat-input { flex: 1; background: rgba(255,255,255,0.06); border: 1px solid var(--border); border-radius: 20px; padding: 0.65rem 1.1rem; color: white; font-size: 0.88rem; outline: none; font-family: var(--font-body); }
.chat-input:focus { border-color: var(--primary); background: rgba(255,255,255,0.09); }
.chat-send { background: var(--gradient-primary); border: none; color: white; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.95rem; transition: var(--transition); flex-shrink: 0; }
.chat-send:hover { transform: scale(1.08); box-shadow: 0 4px 15px rgba(124,58,237,0.5); }

/* Animations */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes ripple { 0% { transform: scale(1); opacity: 0.6; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes scrollAnim { 0% { top: 4px; opacity: 1; } 100% { top: 18px; opacity: 0; } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Responsive */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

@media (max-width: 1024px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .community-split { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .hero h1 { font-size: 2.2rem; }
  .nav-inner { padding: 0 0.5rem; }
  .nav-actions .btn { display: none; }
  .nav-links {
    display: none;
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    background: rgba(13,8,21,0.98);
    padding: 1.5rem 1.75rem;
    flex-direction: column;
    gap: 1.15rem;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(24px);
    z-index: 999;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .hero-stats { flex-wrap: wrap; gap: 1rem; }
  .stat-divider { display: none; }
  .partners-logos { gap: 1.5rem; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
  .ai-chat-panel { width: calc(100vw - 2rem); right: 1rem; }
  .btn-lg { padding: 0.85rem 1.75rem; font-size: 0.95rem; }
}

/* ==========================================================================
   UNIVERSAL MODAL & CERTIFICATE STYLES (Phase 34 Enhancement)
   ========================================================================== */
.course-modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(5, 2, 12, 0.88) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  z-index: 100000 !important;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
}

.course-modal-overlay.open {
  display: flex !important;
  animation: modalFadeIn 0.25s ease-out forwards;
}

.course-modal {
  background: #130B24;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  max-width: 860px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  padding: 2.25rem;
  position: relative;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(124, 58, 237, 0.25);
  animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-close-btn {
  position: absolute;
  right: 1.25rem;
  top: 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #F8F5FF;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100005;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(236, 72, 153, 0.35);
  border-color: #EC4899;
  color: #FFF;
  transform: scale(1.08);
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* High-Contrast Legible Printing Rules for Certificate & Transcripts */
@media print {
  @page {
    size: A4 portrait;
    margin: 10mm 12mm;
  }

  /* Hide background interface, header, sidebars, modals wrappers */
  html, body {
    background: #FFF !important;
    color: #0F172A !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body > *:not(#eu_cert_modal) {
    display: none !important;
  }

  .course-modal-overlay {
    position: static !important;
    background: transparent !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    display: block !important;
    overflow: visible !important;
  }

  .course-modal {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    max-width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  .cert-no-print, .modal-close-btn {
    display: none !important;
  }

  #printable_certificate {
    display: block !important;
    width: 100% !important;
  }

  .cert-page {
    display: block !important;
    background: #FFFFFF !important;
    color: #0F172A !important;
    border: 3px double #7C3AED !important;
    border-radius: 12px !important;
    padding: 2.25rem !important;
    margin-bottom: 2rem !important;
    box-shadow: none !important;
    page-break-after: always !important;
    break-after: page !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .cert-page:last-child {
    page-break-after: auto !important;
    break-after: auto !important;
    margin-bottom: 0 !important;
  }

  /* Force all certificate typography to high-contrast dark colors */
  .cert-page * {
    -webkit-text-fill-color: initial !important;
    text-shadow: none !important;
  }

  .cert-title-badge {
    color: #BE185D !important;
  }

  .cert-academy-title {
    color: #5B21B6 !important;
    -webkit-text-fill-color: #5B21B6 !important;
    background: none !important;
  }

  .cert-learner-name {
    color: #0F172A !important;
    border-bottom: 2px solid #7C3AED !important;
  }

  .cert-module-name {
    color: #6D28D9 !important;
  }

  .cert-regular-text {
    color: #334155 !important;
  }

  .cert-meta-label {
    color: #64748B !important;
  }

  .cert-meta-value {
    color: #0F172A !important;
  }

  .cert-signature-name {
    color: #BE185D !important;
  }

  .cert-signature-title {
    color: #64748B !important;
    border-top: 1px dashed #CBD5E1 !important;
  }

  .cert-meta-box {
    background: #F8FAFC !important;
    border: 1px solid #E2E8F0 !important;
    color: #0F172A !important;
  }

  .cert-mc-card {
    background: #F8FAFC !important;
    border: 1px solid #E2E8F0 !important;
  }

  .cert-mc-title {
    color: #4338CA !important;
  }

  .cert-mc-desc {
    color: #334155 !important;
  }
}



