/* ============================================
   ADN WebTech - Main Stylesheet
   assets/css/style.css
   ============================================ */

/* --- CSS Variables --- */
:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --primary-light: #818cf8;
  --secondary: #06b6d4;
  --accent: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;

  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-dark: #0f172a;
  --bg-card: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(0,0,0,0.06);
  --shadow-hover: 0 12px 40px rgba(79,70,229,0.15);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);

  --font-main: 'Space Grotesk', sans-serif;
  --font-display: 'Syne', sans-serif;
}

/* Dark Mode */
.dark-mode {
  --bg: #0f172a;
  --bg-alt: #1e293b;
  --bg-card: #1e293b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #334155;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
}

/* --- Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}
a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; }

/* --- Typography --- */
.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); font-weight: 700; }

/* ============================================
   NAVBAR
   ============================================ */
#mainNav {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  transition: var(--transition);
  z-index: 1000;
}
.dark-mode #mainNav {
  background: rgba(15,23,42,0.95);
}
.brand-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}
.brand-adn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.navbar-nav .nav-link {
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.navbar-nav .nav-link:hover {
  color: var(--primary);
  background: rgba(79,70,229,0.08);
}
.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--success);
  background: rgba(16,185,129,0.1);
  padding: 4px 10px;
  border-radius: 20px;
}
.live-dot {
  width: 8px; height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
  display: inline-block;
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50% { opacity:0.5; transform:scale(1.4); }
}
.btn-icon {
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.btn-icon:hover { background: var(--bg-alt); color: var(--primary); }
.btn-user {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 4px 14px 4px 4px;
  font-size: 0.9rem;
  font-weight: 500;
}
.user-avatar-sm {
  width: 30px; height: 30px;
  border-radius: 50%;
  object-fit: cover;
}
.mega-menu {
  min-width: 280px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 0.5rem;
}
.mega-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.9rem;
}
.mega-menu .dropdown-item .badge {
  margin-left: auto;
  background: var(--bg-alt);
  color: var(--text-muted);
}
.mega-menu .dropdown-item:hover { background: rgba(79,70,229,0.08); color: var(--primary); }

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
  position: relative;
  padding: 100px 0 80px;
  overflow: hidden;
  background: var(--bg);
}
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(79,70,229,0.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(79,70,229,0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.2);
  color: var(--success);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}
.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 500px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 2.5rem; }
.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-item strong { display: block; font-size: 1.5rem; font-family: var(--font-display); color: var(--primary); }
.stat-item span { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* Hero Visual */
.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-phone-mockup {
  width: 280px;
  background: var(--bg-card);
  border-radius: 30px;
  padding: 20px;
  box-shadow: 0 30px 80px rgba(79,70,229,0.2);
  border: 1px solid var(--border);
  position: relative;
  z-index: 2;
}
.phone-screen { }
.phone-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.phone-title { font-weight: 700; font-size: 0.95rem; }
.phone-timer { font-size: 0.8rem; color: var(--danger); background: rgba(239,68,68,0.1); padding: 3px 8px; border-radius: 20px; }
.phone-question { font-weight: 600; font-size: 0.9rem; margin-bottom: 12px; color: var(--text); }
.phone-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.phone-opt {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.phone-opt.active {
  background: rgba(79,70,229,0.1);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}
.phone-progress { display: flex; flex-direction: column; gap: 4px; }
.phone-progress small { font-size: 0.75rem; color: var(--text-muted); text-align: right; }

.floating-card {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow);
  font-size: 0.85rem;
  z-index: 3;
  animation: float 4s ease-in-out infinite;
}
.floating-card.card-1 { top: 10%; left: -10%; animation-delay: 0s; }
.floating-card.card-2 { bottom: 10%; right: -10%; animation-delay: 2s; }
.floating-card strong { display: block; font-weight: 700; }
.floating-card small { color: var(--text-muted); }
@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ============================================
   SECTIONS
   ============================================ */
.section-pad { padding: 80px 0; }
.bg-light-custom { background: var(--bg-alt); }
.bg-dark-custom { background: var(--bg-dark); }
.section-header { margin-bottom: 1rem; }
.section-tag {
  display: inline-block;
  background: rgba(79,70,229,0.1);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}
.section-tag.light {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
}
.section-title { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 0.75rem; }
.section-subtitle { color: var(--text-muted); font-size: 1.05rem; }

/* ============================================
   CATEGORY CARDS
   ============================================ */
.category-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.category-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--primary);
  transform: scaleY(0);
  transition: var(--transition);
  border-radius: 4px;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}
.category-card:hover::before { transform: scaleY(1); }
.cat-icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.cat-body { flex: 1; }
.cat-body h3 { font-size: 1.05rem; margin-bottom: 4px; }
.cat-body p { font-size: 0.82rem; color: var(--text-muted); margin: 0 0 8px; }
.cat-meta { display: flex; gap: 12px; font-size: 0.78rem; color: var(--text-muted); }
.cat-arrow { color: var(--text-muted); transition: var(--transition); }
.category-card:hover .cat-arrow { color: var(--primary); transform: translateX(4px); }

/* ============================================
   TEST CARDS
   ============================================ */
.test-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  height: 100%;
  display: flex; flex-direction: column;
}
.test-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.test-card-header {
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.test-icon { font-size: 2rem; }
.test-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.test-card-body { padding: 0 24px 16px; flex: 1; }
.test-category { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.test-card-body h4 { font-size: 1.1rem; margin: 8px 0; }
.test-card-body p { font-size: 0.85rem; color: var(--text-muted); }
.test-meta { display: flex; gap: 12px; font-size: 0.8rem; color: var(--text-muted); flex-wrap: wrap; margin-top: 12px; }
.test-card-footer { padding: 16px 24px; border-top: 1px solid var(--border); }

/* Difficulty badges */
.diff-beginner { background: rgba(16,185,129,0.15); color: var(--success); }
.diff-intermediate { background: rgba(245,158,11,0.15); color: var(--warning); }
.diff-advanced { background: rgba(239,68,68,0.15); color: var(--danger); }
.diff-mixed { background: rgba(79,70,229,0.15); color: var(--primary); }
.badge-featured { background: rgba(245,158,11,0.15); color: var(--accent); }

/* ============================================
   QUESTION CARDS
   ============================================ */
.question-card-link { display: block; }
.question-card {
  display: flex;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  transition: var(--transition);
  height: 100%;
}
.question-card:hover { border-color: var(--primary); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.qc-left { padding-top: 4px; }
.qc-cat-dot { display: block; width: 10px; height: 10px; border-radius: 50%; }
.qc-body { flex: 1; }
.qc-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.qc-cat { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.qc-diff { font-size: 0.7rem; padding: 2px 8px; border-radius: 20px; font-weight: 600; }
.qc-time { font-size: 0.72rem; color: var(--text-muted); }
.qc-question { font-size: 0.9rem; font-weight: 500; color: var(--text); margin: 0 0 10px; line-height: 1.5; }
.qc-footer { display: flex; gap: 12px; font-size: 0.77rem; color: var(--text-muted); }

/* ============================================
   STEP CARDS
   ============================================ */
.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  position: relative;
  transition: var(--transition);
}
.step-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: var(--primary); }
.step-num {
  position: absolute;
  top: -1px; right: 20px;
  font-size: 3rem;
  font-weight: 900;
  font-family: var(--font-display);
  color: rgba(79,70,229,0.07);
  line-height: 1;
}
.step-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  margin: 0 auto 1rem;
}
.step-card h4 { margin-bottom: 0.5rem; }
.step-card p { color: var(--text-muted); font-size: 0.9rem; }

/* ============================================
   REVIEWS
   ============================================ */
.review-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 28px;
  color: #e2e8f0;
  transition: var(--transition);
}
.review-card:hover { background: rgba(255,255,255,0.08); transform: translateY(-4px); }
.review-stars { color: var(--accent); font-size: 1.2rem; margin-bottom: 12px; }
.review-card p { font-size: 0.9rem; line-height: 1.7; margin-bottom: 20px; opacity: 0.85; }
.reviewer { display: flex; align-items: center; gap: 12px; }
.reviewer img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--primary); }
.reviewer strong { display: block; font-size: 0.9rem; color: #fff; }
.reviewer small { font-size: 0.78rem; opacity: 0.6; }

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 80px 0;
  color: #fff;
}
.cta-section h2 { font-size: 2rem; margin-bottom: 0.75rem; }
.cta-section p { opacity: 0.85; margin-bottom: 2rem; font-size: 1.1rem; }
.btn-outline-light { border-color: rgba(255,255,255,0.4); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,0.15); color: #fff; border-color: #fff; }

/* ============================================
   FAQ
   ============================================ */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm) !important;
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-item .accordion-button {
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--bg-card);
  color: var(--text);
}
.faq-item .accordion-button:not(.collapsed) {
  background: rgba(79,70,229,0.08);
  color: var(--primary);
  box-shadow: none;
}
.faq-item .accordion-body {
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 64px 0 0;
}
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; margin: 1rem 0; }
.social-links { display: flex; gap: 10px; }
.social-links a {
  width: 38px; height: 38px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: var(--transition);
}
.social-links a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.site-footer h5 { font-size: 1rem; margin-bottom: 1rem; color: var(--text); }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--primary); }
.newsletter-form .form-control {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px 0 0 10px;
  font-size: 0.9rem;
}
.footer-contact p { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 4px; }
.footer-divider { border-color: var(--border); margin: 40px 0 24px; }
.footer-bottom {
  padding-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { color: var(--text-muted); }
.footer-legal a:hover { color: var(--primary); }

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  border-radius: 10px;
  font-weight: 600;
  padding: 10px 20px;
  transition: var(--transition);
  color: #fff;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(79,70,229,0.35);
  color: #fff;
}
.btn-outline-primary {
  border: 1.5px solid var(--primary);
  color: var(--primary);
  border-radius: 10px;
  font-weight: 600;
  padding: 10px 20px;
  background: transparent;
  transition: var(--transition);
}
.btn-outline-primary:hover { background: var(--primary); color: #fff; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }

/* ============================================
   ANIMATIONS
   ============================================ */
.animate-in { opacity: 0; transform: translateY(20px); animation: fadeInUp 0.7s ease forwards; }
.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }
.delay-4 { animation-delay: 0.6s; }
@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   TOAST
   ============================================ */
.toast-container { z-index: 9999; }
.adn-toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  animation: slideInRight 0.4s ease;
  min-width: 260px;
  margin-top: 8px;
}
.adn-toast.success .toast-icon { color: var(--success); }
.adn-toast.error .toast-icon { color: var(--danger); }
.adn-toast.info .toast-icon { color: var(--primary); }
@keyframes slideInRight {
  from { transform: translateX(100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ============================================
   MODAL
   ============================================ */
.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.modal-icon { color: var(--primary); }

/* ============================================
   PAGINATION
   ============================================ */
.pagination-nav { margin-top: 2rem; display: flex; justify-content: center; }
.pagination .page-link {
  border-radius: 8px !important;
  margin: 0 2px;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--bg-card);
}
.pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .hero-section { padding: 60px 0; }
  .hero-visual { display: none; }
  .hero-stats { gap: 1rem; }
  .section-pad { padding: 50px 0; }
  .floating-card { display: none; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .stat-divider { display: none; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; text-align: center; }
}

/* ============================================
   UTILITY
   ============================================ */
.badge { font-size: 0.72rem; font-weight: 700; border-radius: 6px; padding: 4px 8px; }
.form-control {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 14px;
  transition: var(--transition);
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79,70,229,0.1);
  background: var(--bg-card);
  color: var(--text);
}
.form-label { font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.dropdown-menu {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.dropdown-item { color: var(--text); transition: var(--transition); }
.dropdown-item:hover { background: rgba(79,70,229,0.08); color: var(--primary); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }
