/* ============================================
   Aurexa Academy — Premium Base v2.0
   ============================================ */

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; font-size: 16px; }

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  background-image: var(--gradient-mesh);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

img, video { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: color var(--transition-fast); }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; border: none; outline: none; }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--text-primary);
  letter-spacing: var(--ls-tight);
}
h1 { font-size: var(--fs-hero); font-weight: var(--fw-extrabold); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-md); }
p { line-height: var(--lh-relaxed); color: var(--text-secondary); }

/* ── Layout ── */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-lg); }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--space-lg); }
.section { padding: var(--space-section) 0; }
.section-dark { background: var(--bg-dark); color: var(--text-light); }
.section-dark h2, .section-dark h3, .section-dark h4 { color: var(--text-light); }
.section-dark p { color: rgba(255,255,255,0.7); }
.section-light { background: var(--bg-secondary); }

/* Section Headers */
.section-header { text-align: center; margin-bottom: var(--space-3xl); }
.section-header h2 {
  margin-bottom: var(--space-md); position: relative; display: inline-block;
}
.section-header h2::after {
  content: ''; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
  width: 60px; height: 4px; background: var(--gradient-accent); border-radius: var(--radius-full);
}
.section-header p { max-width: 640px; margin: var(--space-lg) auto 0; font-size: var(--fs-md); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm);
  padding: 12px 28px; font-family: var(--font-heading); font-weight: var(--fw-semibold);
  font-size: var(--fs-base); border-radius: var(--radius-md); transition: all var(--transition-base);
  cursor: pointer; border: 2px solid transparent; white-space: nowrap;
  position: relative; overflow: hidden;
}
.btn::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 100%);
  opacity: 0; transition: opacity var(--transition-fast);
}
.btn:hover::after { opacity: 1; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }

.btn-primary { background: var(--primary); color: var(--text-light); border-color: var(--primary); }
.btn-primary:hover { box-shadow: var(--shadow-primary); }
.btn-accent { background: var(--gradient-cta); color: var(--text-on-accent); border-color: var(--accent); }
.btn-accent:hover { box-shadow: var(--shadow-accent); filter: brightness(1.05); }
.btn-brand { background: var(--gradient-brand); color: white; border-color: var(--brand); }
.btn-brand:hover { box-shadow: var(--shadow-brand); }
.btn-outline { background: transparent; color: var(--text-primary); border-color: var(--border-medium); }
.btn-outline:hover { background: var(--bg-secondary); border-color: var(--brand); color: var(--brand); }
.btn-outline-light { background: transparent; color: var(--text-light); border-color: rgba(255,255,255,0.3); }
.btn-outline-light:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.7); }
.btn-ghost { background: transparent; color: var(--text-secondary); padding: 8px 16px; }
.btn-ghost:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.btn-sm { padding: 8px 18px; font-size: var(--fs-sm); }
.btn-lg { padding: 16px 36px; font-size: var(--fs-md); }
.btn-icon { width: 44px; height: 44px; padding: 0; border-radius: var(--radius-full); }
.btn-whatsapp { background: #25D366; color: white; border-color: #25D366; }
.btn-whatsapp:hover { background: #1EBE5A; box-shadow: 0 4px 20px rgba(37,211,102,0.3); }
.btn-call { background: var(--info); color: white; border-color: var(--info); }
.btn-call:hover { box-shadow: 0 4px 20px rgba(59,130,246,0.3); }
.btn-danger { background: var(--error); color: white; border-color: var(--error); }
.btn-danger:hover { box-shadow: 0 4px 20px rgba(239,68,68,0.3); }
.btn-success { background: var(--success); color: white; border-color: var(--success); }
.btn-success:hover { box-shadow: 0 4px 20px rgba(16,185,129,0.3); }

/* ── Glass Cards ── */
.card {
  background: var(--glass-bg); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); overflow: hidden; transition: all var(--transition-base);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
}

/* ── Form Elements ── */
.form-group { margin-bottom: var(--space-lg); }
.form-label {
  display: block; margin-bottom: var(--space-sm); font-weight: var(--fw-medium);
  font-size: var(--fs-sm); color: var(--text-primary); letter-spacing: var(--ls-wide);
}
.form-input, .form-textarea, .form-select {
  width: 100%; padding: 12px 16px; border: 2px solid var(--border-light);
  border-radius: var(--radius-md); background: var(--bg-primary); color: var(--text-primary);
  transition: all var(--transition-fast); font-size: var(--fs-base);
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--brand); box-shadow: 0 0 0 4px rgba(var(--brand-rgb),0.1);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 120px; }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; padding: 4px 12px;
  font-size: var(--fs-xs); font-weight: var(--fw-semibold); border-radius: var(--radius-full);
  text-transform: uppercase; letter-spacing: var(--ls-wider);
}
.badge-primary { background: rgba(var(--brand-rgb),0.1); color: var(--brand); }
.badge-accent { background: rgba(var(--accent-rgb),0.15); color: var(--accent-dark); }
.badge-success { background: rgba(var(--success-rgb),0.1); color: var(--success); }
.badge-error { background: rgba(var(--error-rgb),0.1); color: var(--error); }

/* ── Animations ── */
@keyframes fadeInUp { from { opacity:0; transform:translateY(30px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes fadeInDown { from { opacity:0; transform:translateY(-20px); } to { opacity:1; transform:translateY(0); } }
@keyframes slideInRight { from { opacity:0; transform:translateX(30px); } to { opacity:1; transform:translateX(0); } }
@keyframes slideInLeft { from { opacity:0; transform:translateX(-30px); } to { opacity:1; transform:translateX(0); } }
@keyframes scaleIn { from { opacity:0; transform:scale(0.9); } to { opacity:1; transform:scale(1); } }
@keyframes float { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-10px); } }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.5; } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes slideUp { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes glow { 0%,100% { box-shadow: 0 0 20px rgba(var(--accent-rgb),0.2); } 50% { box-shadow: 0 0 40px rgba(var(--accent-rgb),0.4); } }

.animate-on-scroll { opacity:0; transform:translateY(30px); transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1); }
.animate-on-scroll.visible { opacity:1; transform:translateY(0); }
.animate-on-scroll.delay-1 { transition-delay:0.1s; }
.animate-on-scroll.delay-2 { transition-delay:0.2s; }
.animate-on-scroll.delay-3 { transition-delay:0.3s; }
.animate-on-scroll.delay-4 { transition-delay:0.4s; }
.animate-on-scroll.delay-5 { transition-delay:0.5s; }

/* Page Transitions */
#app { min-height: calc(100vh - var(--navbar-height)); }
.page-content { animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1); }

/* ── Scroll Progress Bar ── */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; z-index: var(--z-progress);
  background: var(--gradient-brand); transform-origin: left;
  transition: transform 0.1s linear; width: 100%; transform: scaleX(0);
}

/* ── Loading Skeleton ── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
  background-size: 400% 100%; animation: shimmer 1.5s ease infinite; border-radius: var(--radius-md);
}
.skeleton-text { height: 14px; margin-bottom: 8px; border-radius: var(--radius-sm); }
.skeleton-text.w-75 { width: 75%; }
.skeleton-text.w-50 { width: 50%; }
.skeleton-heading { height: 28px; width: 60%; margin-bottom: 16px; }
.skeleton-avatar { width: 48px; height: 48px; border-radius: var(--radius-full); }
.skeleton-card { height: 200px; border-radius: var(--radius-lg); }

/* ── Page Loader ── */
.page-loader {
  position: fixed; inset: 0; background: var(--bg-primary); z-index: var(--z-loader);
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: var(--space-lg);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.page-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.page-loader-spinner {
  width: 48px; height: 48px; border: 3px solid var(--border-light);
  border-top-color: var(--brand); border-radius: 50%; animation: spin 0.8s linear infinite;
}
.page-loader-text { font-family: var(--font-heading); font-weight: var(--fw-semibold); color: var(--text-secondary); }

/* ── Theme Toggle ── */
.theme-toggle {
  position: fixed; bottom: 24px; left: 24px; z-index: var(--z-sticky);
  width: 48px; height: 48px; border-radius: var(--radius-full);
  background: var(--glass-bg); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); box-shadow: var(--shadow-lg);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 20px; transition: all var(--transition-spring);
}
.theme-toggle:hover { transform: scale(1.1) rotate(15deg); box-shadow: var(--shadow-xl); }
.theme-toggle:active { transform: scale(0.95); }

/* ── Custom Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
::selection { background: rgba(var(--brand-rgb), 0.2); color: var(--text-primary); }

/* ── Premium Toast ── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  padding: 14px 20px 14px 16px;
  background: var(--bg-elevated); color: var(--text-primary); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl); z-index: var(--z-toast);
  display: flex; align-items: center; gap: var(--space-sm);
  font-weight: var(--fw-medium); max-width: 420px; min-width: 280px;
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid var(--border-light);
  backdrop-filter: var(--glass-blur);
  transition: all 0.3s ease;
}
.toast-icon {
  width: 32px; height: 32px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.toast.success .toast-icon { background: rgba(var(--success-rgb), 0.1); color: var(--success); }
.toast.error .toast-icon { background: rgba(var(--error-rgb), 0.1); color: var(--error); }
.toast.info .toast-icon { background: rgba(var(--info-rgb), 0.1); color: var(--info); }
.toast-content { flex: 1; }
.toast-title { font-weight: var(--fw-semibold); font-size: var(--fs-sm); margin-bottom: 2px; }
.toast-message { font-size: var(--fs-xs); color: var(--text-muted); }
.toast-close {
  width: 24px; height: 24px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); cursor: pointer; flex-shrink: 0;
  transition: all var(--transition-fast);
}
.toast-close:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.toast-progress {
  position: absolute; bottom: 0; left: 0; height: 3px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  animation: toast-progress 3s linear forwards;
}
.toast.success .toast-progress { background: var(--success); }
.toast.error .toast-progress { background: var(--error); }
.toast.info .toast-progress { background: var(--info); }
@keyframes toast-progress { from { width: 100%; } to { width: 0%; } }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(8px);
  z-index: var(--z-modal-overlay); display: flex; align-items: center; justify-content: center;
  padding: var(--space-lg); animation: fadeIn 0.2s ease;
}
.modal {
  background: var(--bg-elevated); border-radius: var(--radius-xl); box-shadow: var(--shadow-2xl);
  width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid var(--border-light);
}
.modal-header { display:flex; align-items:center; justify-content:space-between; padding:var(--space-xl); border-bottom:1px solid var(--border-light); }
.modal-header h3 { font-size:var(--fs-xl); }
.modal-close {
  width:36px; height:36px; display:flex; align-items:center; justify-content:center;
  border-radius:var(--radius-full); color:var(--text-muted); transition:all var(--transition-fast); font-size:var(--fs-xl);
}
.modal-close:hover { background:var(--bg-tertiary); color:var(--text-primary); }
.modal-body { padding:var(--space-xl); }
.modal-footer { display:flex; justify-content:flex-end; gap:var(--space-md); padding:var(--space-lg) var(--space-xl); border-top:1px solid var(--border-light); }

/* ── Responsive ── */
@media(max-width:768px) {
  h1 { font-size:var(--fs-3xl); } h2 { font-size:var(--fs-2xl); } h3 { font-size:var(--fs-xl); }
  .container { padding:0 var(--space-md); }
  .section { padding:var(--space-3xl) 0; }
  .section-header { margin-bottom:var(--space-2xl); }
  .btn-lg { padding:14px 28px; font-size:var(--fs-base); }
  .theme-toggle { bottom: 16px; left: 16px; width: 40px; height: 40px; font-size: 16px; }
}
@media(max-width:480px) { html { font-size:15px; } }
