/* ====================================================
   GLOBAL EXCHANGE - INDEX PAGE STYLES
   Mobile-first, fully responsive, production-ready
==================================================== */

/* ==================== CSS VARIABLES ==================== */
:root {
  /* Colors - Light Theme */
  --color-primary: #21808D;
  --color-primary-dark: #1A686F;
  --color-primary-light: #32A4B3;
  --color-secondary: #E68161;
  --color-accent: #FFD166;
  --color-bg: #FCFCF9;
  --color-surface: #FFFFFF;
  --color-text: #1F2121;
  --color-text-secondary: #626C6C;
  --color-border: rgba(0, 0, 0, 0.08);
  --color-success: #28a745;
  --color-error: #dc3545;
  --color-warning: #ffc107;
  --color-info: #17a2b8;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #21808D 0%, #1A686F 100%);
  --gradient-secondary: linear-gradient(135deg, #E68161 0%, #D67152 100%);
  --gradient-hero: linear-gradient(135deg, rgba(33, 128, 141, 0.1) 0%, rgba(230, 129, 97, 0.1) 100%);

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;

  /* Typography */
  --font-base: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.5rem;
  --font-size-5xl: 3rem;

  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.15);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
  --nav-height: 40px;

  
}

/* Dark Theme */
[data-theme="dark"] {
  --color-bg: #0f1419;
  --color-surface: #1a1f2e;
  --color-text: #FCFCF9;
  --color-text-secondary: #A7A9A9;
  --color-border: rgba(255, 255, 255, 0.1);
  --gradient-hero: linear-gradient(135deg, rgba(33, 128, 141, 0.15) 0%, rgba(230, 129, 97, 0.15) 100%);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.6);
}

/* Dark-mode tweaks just for the user menu */
[data-theme="dark"] .user-menu-btn {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--color-text); /* stays light text */
}

[data-theme="dark"] .user-menu-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Dropdown surface a bit lighter + stronger elevation */
[data-theme="dark"] .user-dropdown {
  background: #222738;                   /* lighter than #1a1f2e */
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6);
}

/* Links inside dropdown */
[data-theme="dark"] .user-dropdown a {
  color: var(--color-text);
}

[data-theme="dark"] .user-dropdown a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text);
}


/* ==================== RESET & BASE ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  min-height: 100vh;
  min-height: 100dvh; /* for mobile browsers */
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-base);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-base);
  padding-top: var(--nav-height); /* pushes all content below fixed header */
}

img {
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

/* ==================== CONTAINER ==================== */
.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-md);
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 var(--space-lg);
  }
}

/* ==================== NAVIGATION - THREE SECTION LAYOUT ==================== */
/* ==================== NAVIGATION - COMPLETE FIXED VERSION ==================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  transition: all var(--transition-base);
  backdrop-filter: blur(10px);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: var(--space-md);
}

/* Remove any pseudo-elements that might create arrows */
.nav-container::before,
.nav-container::after {
  display: none !important;
  content: none !important;
}

/* ==================== LEFT: Logo and Name ==================== */
.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--color-primary);
  flex-shrink: 0;
}

.brand-logo {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: var(--font-size-sm);
}

.nav-brand .brand-name {
  font-size: var(--font-size-sm);
}

/* ==================== CENTER: Navigation Menu ==================== */
.nav-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  flex-direction: column;
  padding: var(--space-md);
  max-height: calc(100dvh - var(--nav-height));
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  z-index: 999;
}


.nav-menu.active {
  display: flex;
}

/* Hide scrollbar in nav menu */
.nav-menu::-webkit-scrollbar {
  display: none;
}

.nav-menu {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Navigation Links */
.nav-link {
  color: var(--color-text);
  font-weight: 500;
  font-size: var(--font-size-sm);
  transition: color var(--transition-fast);
  position: relative;
  padding: var(--space-sm) 0;
  width: 100%;
  text-align: left;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary);
  display: none;
}

/* Auth Buttons in Nav Menu */
.nav-auth {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.nav-auth .btn-primary,
.nav-auth .btn-outline {
  width: 100%;
}

/* ==================== User Dropdown Menu ==================== */
.nav-user {
  position: relative;
  margin-top: var(--space-md);
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  transition: all var(--transition-fast);
  width: 100%;
  justify-content: center;
  cursor: pointer;
}

.user-menu-btn:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.user-dropdown {
  position: static;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: none;
  min-width: 100%;
  display: none;
  flex-direction: column;
  overflow: hidden;
  margin-top: var(--space-sm);
  z-index: 1001;
}

.user-dropdown.show {
  display: flex;
}

.user-dropdown a {
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  transition: background var(--transition-fast);
  color: var(--color-text);
  font-size: var(--font-size-sm);
}

.user-dropdown a:hover {
  background: var(--color-primary);
  color: white;
}

.user-dropdown hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 0;
}

/* ==================== RIGHT: Theme Toggle + Hamburger ==================== */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* Theme Toggle Button */
.theme-toggle {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  font-size: var(--font-size-base);
  color: var(--color-text);
  cursor: pointer;
}

.theme-toggle:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* Hamburger Menu (Three Lines) */
.mobile-menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  padding: 8px;
  gap: 4px;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.mobile-menu-toggle:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.mobile-menu-toggle:hover span {
  background: white;
}

/* Hide Font Awesome icon if present */
.mobile-menu-toggle i {
  display: none;
}

/* Animate hamburger to X when active */
.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ==================== TABLET (768px - 1023px) ==================== */
@media (min-width: 768px) and (max-width: 1023px) {
  .nav-container {
    gap: var(--space-sm);
  }
  
  .nav-brand .brand-name {
    font-size: var(--font-size-base);
  }
  
  /* Keep mobile menu on tablet */
  .nav-menu {
    display: none;
    position: fixed;
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  /* Keep hamburger visible */
  .mobile-menu-toggle {
    display: flex;
  }
  
  /* Tighter spacing */
  .nav-actions {
    gap: var(--space-xs);
  }
  
  /* Slightly smaller buttons */
  .theme-toggle,
  .mobile-menu-toggle {
    width: 36px;
    height: 36px;
  }
}

/* ==================== DESKTOP HAMBURGER MENU (1024px+) ==================== */
@media (min-width: 1024px) {

  /* Show hamburger on desktop */
  .mobile-menu-toggle {
    display: flex !important;
  }

  /* Main dropdown menu — same style as profile menu */
  .nav-menu {
    display: none !important;
    position: absolute !important;
    top: 70px;
    right: 20px !important;
    left: auto !important;     /* FORCE right alignment */
    transform: none !important;

    width: 240px !important;   /* Same as profile dropdown */
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);

    padding: 10px 0 !important;
    max-height: 70vh;
    overflow-y: auto;
    flex-direction: column;
    gap: 0 !important;
    z-index: 2000;
  }

  /* When hamburger is active */
  .nav-menu.active {
    display: flex !important;
  }

  /* Menu item spacing exactly like profile menu */
  .nav-menu .nav-link {
    padding: 10px 16px !important;
    margin: 0 !important;
    font-size: var(--font-size-sm) !important;
    line-height: 1.2 !important;
    width: 100%;
    text-align: left;
  }

  .nav-menu .nav-link:hover {
    background: var(--color-primary);
    color: white;
    border-radius: var(--radius-md);
  }

  /* User dropdown area inside menu */
  .nav-user {
    margin-top: 8px !important;
  }

  .user-dropdown {
    position: static !important;
    width: 100% !important;
    margin-top: 4px !important;
  }

  .user-dropdown a {
    padding: 10px 16px !important;
  }
}

/* ==================== LARGE DESKTOP (1200px+) ==================== */
@media (min-width: 1200px) {
  .nav-menu {
    gap: var(--space-lg);
  }
  
  .nav-brand {
    font-size: var(--font-size-xl);
  }
  
  .brand-logo {
    width: 40px;
    height: 40px;
  }
  
  .nav-brand .brand-name {
    font-size: var(--font-size-lg);
  }
  
  .nav-auth .btn-primary,
  .nav-auth .btn-outline {
    padding: var(--space-sm) var(--space-lg);
  }
  
  .theme-toggle {
    width: 40px;
    height: 40px;
  }
}

/* ==================== BUTTONS ==================== */
.btn-primary,
.btn-outline {
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--font-size-sm);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: white;
}

.btn-lg {
  padding: var(--space-md) var(--space-xl);
  font-size: var(--font-size-base);
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* ==================== HERO SECTION (MOBILE FIRST) ==================== */
.hero {
  position: relative;
  /* offset content below the fixed navbar */
  padding: calc(var(--nav-height) + var(--space-xl)) 0 var(--space-xl);
  min-height: calc(100dvh - var(--nav-height));
  display: flex;
  align-items: center;
  overflow: hidden;
}

@media (min-width: 768px) {
 .hero {
    padding: var(--space-2xl) 0 var(--space-2xl);
  }
}

.bg-animation {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-hero);
  z-index: -1;
}

.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(var(--color-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-border) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.3;
  z-index: -1;
}

.crypto-shapes {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  overflow: hidden;
}

.crypto-shapes .shape {
  position: absolute;
  border-radius: 50%;
  background: var(--gradient-primary);
  opacity: 0.1;
  animation: float 20s infinite ease-in-out;
}

.crypto-shapes .shape:nth-child(1) {
  width: 200px;
  height: 200px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

@media (min-width: 768px) {
  .crypto-shapes .shape:nth-child(1) {
    width: 300px;
    height: 300px;
  }
}

.crypto-shapes .shape:nth-child(2) {
  width: 150px;
  height: 150px;
  top: 50%;
  right: 15%;
  animation-delay: 7s;
}

@media (min-width: 768px) {
  .crypto-shapes .shape:nth-child(2) {
    width: 200px;
    height: 200px;
  }
}

.crypto-shapes .shape:nth-child(3) {
  width: 180px;
  height: 180px;
  bottom: 10%;
  left: 50%;
  animation-delay: 14s;
}

@media (min-width: 768px) {
  .crypto-shapes .shape:nth-child(3) {
    width: 250px;
    height: 250px;
  }
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(30px, -30px) rotate(120deg);
  }
  66% {
    transform: translate(-20px, 20px) rotate(240deg);
  }
}

/* Mobile: Single column */
.hero-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: center;
}

/* Tablet and up: Two columns */
@media (min-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
  }
}

.hero-content {
  z-index: 1;
}

/* Mobile: Show visual first */
.hero-visual {
  order: -1;
}

@media (min-width: 1024px) {
  .hero-visual {
    order: 0;
  }
}

.hero-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

@media (min-width: 600px) {
  .hero-title {
    font-size: var(--font-size-3xl);
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: var(--font-size-5xl);
  }
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
  line-height: 1.8;
}

@media (min-width: 768px) {
  .hero-subtitle {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-xl);
  }
}

/* Mobile: Stack CTA buttons */
.hero-cta {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.hero-cta .btn-primary,
.hero-cta .btn-outline {
  width: 100%;
}

@media (min-width: 600px) {
  .hero-cta {
    flex-direction: row;
    gap: var(--space-md);
  }

  .hero-cta .btn-primary,
  .hero-cta .btn-outline {
    width: auto;
  }
}

.trust-badges {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .trust-badges {
    gap: var(--space-lg);
  }
}

.trust-badges .badge {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
}

@media (min-width: 768px) {
  .trust-badges .badge {
    font-size: var(--font-size-sm);
  }
}

.trust-badges .badge i {
  color: var(--color-primary);
  font-size: var(--font-size-base);
}

@media (min-width: 768px) {
  .trust-badges .badge i {
    font-size: var(--font-size-lg);
  }
}

.hero-visual {
  position: relative;
  z-index: 1;
}

.exchange-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-md);
  box-shadow: var(--shadow-xl);
}

@media (min-width: 768px) {
  .exchange-card {
    padding: var(--space-xl);
  }
}

.card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  right: -50%;
  bottom: -50%;
  background: var(--gradient-primary);
  opacity: 0.1;
  filter: blur(60px);
  z-index: -1;
  animation: pulse 3s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.1; }
  50% { opacity: 0.2; }
}

.live-rate-ticker {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

@media (min-width: 768px) {
  .live-rate-ticker {
    gap: var(--space-md);
  }
}

.ticker-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm);
  background: var(--gradient-hero);
  border-radius: var(--radius-md);
}

@media (min-width: 768px) {
  .ticker-item {
    padding: var(--space-md);
  }
}

.ticker-item .crypto {
  font-weight: 700;
  font-size: var(--font-size-base);
}

@media (min-width: 768px) {
  .ticker-item .crypto {
    font-size: var(--font-size-lg);
  }
}

.ticker-item .rate {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-primary);
}

@media (min-width: 768px) {
  .ticker-item .rate {
    font-size: var(--font-size-xl);
  }
}

.ticker-item .change {
  font-size: var(--font-size-xs);
  font-weight: 600;
}

@media (min-width: 768px) {
  .ticker-item .change {
    font-size: var(--font-size-sm);
  }
}

.ticker-item .change.positive {
  color: var(--color-success);
}

.ticker-item .change.negative {
  color: var(--color-error);
}

/* ==================== STATS SECTION (MOBILE FIRST) ==================== */
/* ==================== STATS SECTION (MOBILE FIRST) ==================== */
.stats-section {
  padding: var(--space-xl) 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

@media (min-width: 768px) {
  .stats-section {
    padding: var(--space-2xl) 0;
  }
}

/* 📱 Mobile: 2 columns */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* FIXED */
  gap: var(--space-md);
}

/* Small tablets: still 2 columns */
@media (min-width: 600px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }
}

/* 💻 Desktop: 4 columns */
@media (min-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-card {
  text-align: center;
  padding: var(--space-md);
}

@media (min-width: 768px) {
  .stat-card {
    padding: var(--space-lg);
  }
}

.stat-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto var(--space-sm);
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: var(--font-size-xl);
}

@media (min-width: 768px) {
  .stat-icon {
    width: 60px;
    height: 60px;
    margin-bottom: var(--space-md);
    font-size: var(--font-size-2xl);
  }
}

.stat-number {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

@media (min-width: 768px) {
  .stat-number {
    font-size: var(--font-size-3xl);
  }
}

.stat-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}

@media (min-width: 768px) {
  .stat-label {
    font-size: var(--font-size-sm);
  }
}

/* ==================== SECTION HEADER ==================== */
.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

@media (min-width: 768px) {
  .section-header {
    margin-bottom: var(--space-2xl);
  }
}

.section-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

@media (min-width: 768px) {
  .section-title {
    font-size: var(--font-size-3xl);
  }
}

.section-subtitle {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
}

@media (min-width: 768px) {
  .section-subtitle {
    font-size: var(--font-size-lg);
  }
}


/* ==================== CALCULATOR SECTION ==================== */
.calculator-section {
  padding: var(--space-xl) 0;
}

@media (min-width: 768px) {
  .calculator-section {
    padding: var(--space-2xl) 0;
  }
}

.calculator-card {
  max-width: 600px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-md);
  box-shadow: var(--shadow-lg);
}

@media (min-width: 768px) {
  .calculator-card {
    padding: var(--space-xl);
  }
}

.calculator-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.calc-group label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  font-size: var(--font-size-sm);
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

@media (min-width: 600px) {
  .input-group {
    flex-direction: row;
  }
}

.input-group input {
  flex: 1;
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: inherit;
}

.input-group input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.currency-select {
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: inherit;
  min-width: 120px;
  cursor: pointer;
}

.swap-icon {
  text-align: center;
  color: var(--color-primary);
  font-size: var(--font-size-xl);
}

.calc-details {
  background: var(--gradient-hero);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  font-size: var(--font-size-sm);
}

.detail-row.total {
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-sm);
  padding-top: var(--space-md);
  font-weight: 700;
  font-size: var(--font-size-base);
  color: var(--color-primary);
}

.calc-note {
  text-align: center;
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  margin-top: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
}

/* ==================== HOW IT WORKS (MOBILE FIRST) ==================== */
.how-it-works {
  padding: var(--space-xl) 0;
  background: var(--color-surface);
}

@media (min-width: 768px) {
  .how-it-works {
    padding: var(--space-2xl) 0;
  }
}

/* Mobile: Single column */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

/* Tablet and up: 3 columns */
@media (min-width: 768px) {
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
  }
}

.step-card {
  position: relative;
  padding: var(--space-lg);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all var(--transition-base);
  margin-top: var(--space-lg);
}

@media (min-width: 768px) {
  .step-card {
    padding: var(--space-xl);
  }
}

.step-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.step-number {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--font-size-lg);
}

.step-icon {
  width: 60px;
  height: 60px;
  margin: var(--space-md) auto var(--space-sm);
  background: var(--gradient-hero);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-2xl);
  color: var(--color-primary);
}

@media (min-width: 768px) {
  .step-icon {
    width: 80px;
    height: 80px;
    margin: var(--space-lg) auto var(--space-md);
    font-size: var(--font-size-3xl);
  }
}

.step-card h3 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-sm);
}

@media (min-width: 768px) {
  .step-card h3 {
    font-size: var(--font-size-xl);
  }
}

.step-card p {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

/* ==================== CURRENCIES SECTION (MOBILE FIRST) ==================== */
.currencies-section {
  padding: var(--space-xl) 0;
}

@media (min-width: 768px) {
  .currencies-section {
    padding: var(--space-2xl) 0;
  }
}

/* Mobile: Single column */
.currencies-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

/* Small tablets: 2 columns */
@media (min-width: 600px) {
  .currencies-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }
}

/* Tablets: 3 columns */
@media (min-width: 900px) {
  .currencies-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Desktop: auto-fill with minimum 280px */
@media (min-width: 1200px) {
  .currencies-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

.currency-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: all var(--transition-base);
}

@media (min-width: 768px) {
  .currency-card {
    padding: var(--space-lg);
  }
}

.currency-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.currency-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

@media (min-width: 768px) {
  .currency-header {
    gap: var(--space-md);
  }
}

.currency-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: var(--font-size-base);
}

@media (min-width: 768px) {
  .currency-icon {
    width: 50px;
    height: 50px;
    font-size: var(--font-size-lg);
  }
}

.currency-info h3 {
  font-size: var(--font-size-base);
  margin-bottom: var(--space-xs);
}

@media (min-width: 768px) {
  .currency-info h3 {
    font-size: var(--font-size-lg);
  }
}

.currency-info p {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}

@media (min-width: 768px) {
  .currency-info p {
    font-size: var(--font-size-sm);
  }
}

.currency-rates {
  display: flex;
  justify-content: space-between;
  padding: var(--space-sm);
  background: var(--gradient-hero);
  border-radius: var(--radius-md);
}

@media (min-width: 768px) {
  .currency-rates {
    padding: var(--space-md);
  }
}

.rate-item {
  text-align: center;
}

.rate-item span:first-child {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xs);
}

.rate-item span:last-child {
  font-weight: 700;
  color: var(--color-primary);
  font-size: var(--font-size-sm);
}

.currency-card-skeleton {
  height: 180px;
  background: linear-gradient(
    90deg,
    var(--color-surface) 0%,
    var(--color-border) 50%,
    var(--color-surface) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-lg);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.view-all-currencies {
  text-align: center;
}

/* ==================== FEATURES SECTION (MOBILE FIRST) ==================== */
.features-section {
  padding: var(--space-xl) 0;
  background: var(--color-surface);
}

@media (min-width: 768px) {
  .features-section {
    padding: var(--space-2xl) 0;
  }
}

/* Mobile: Single column */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

/* Tablet: 2 columns */
@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop: 3 columns */
@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
  }
}

.feature-card {
  padding: var(--space-lg);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all var(--transition-base);
}

@media (min-width: 768px) {
  .feature-card {
    padding: var(--space-xl);
  }
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

.feature-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto var(--space-sm);
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xl);
  color: white;
}

@media (min-width: 768px) {
  .feature-icon {
    width: 70px;
    height: 70px;
    margin-bottom: var(--space-md);
    font-size: var(--font-size-2xl);
  }
}

.feature-card h3 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-sm);
}

@media (min-width: 768px) {
  .feature-card h3 {
    font-size: var(--font-size-xl);
  }
}

.feature-card p {
  color: var(--color-text-secondary);
  line-height: 1.7;
  font-size: var(--font-size-sm);
}

/* ==================== FAQ SECTION ==================== */
.faq-section {
  padding: var(--space-xl) 0;
}

@media (min-width: 768px) {
  .faq-section {
    padding: var(--space-2xl) 0;
  }
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md);
  background: transparent;
  text-align: left;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text);
  transition: all var(--transition-fast);
}

@media (min-width: 768px) {
  .faq-question {
    padding: var(--space-lg);
    font-size: var(--font-size-base);
  }
}

.faq-question:hover {
  background: var(--gradient-hero);
}

.faq-question i {
  transition: transform var(--transition-fast);
  color: var(--color-primary);
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer p {
  padding: 0 var(--space-md) var(--space-md);
  color: var(--color-text-secondary);
  line-height: 1.8;
  font-size: var(--font-size-sm);
}

@media (min-width: 768px) {
  .faq-answer p {
    padding: 0 var(--space-lg) var(--space-lg);
  }
}

/* ==================== FOOTER (MOBILE FIRST) ==================== */
/* ==================== FOOTER ==================== */
.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-lg) 0 var(--space-md); /* compact */
}

@media (min-width: 768px) {
  .footer {
    padding: var(--space-xl) 0 var(--space-lg);
  }
}

/* ALWAYS use laptop layout (4-col), even on mobile */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;          /* mobile: 1 column */
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

@media (min-width: 600px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr;
  }
}
/* Desktop spacing slightly larger */
@media (min-width: 1024px) {
   .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
  }
}

/* BRAND COLUMN */
.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

@media (min-width: 768px) {
  .footer-brand {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-md);
  }
}

.footer-desc {
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-sm); /* smaller */
  font-size: var(--font-size-sm);
}

/* SOCIAL ICONS */
.social-links {
  display: flex;
  gap: var(--space-xs); /* tighter spacing */
}

.social-links a {
  width: 36px;
  height: 36px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.social-links a:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* FOOTER LINK COLUMNS */
.footer-col h4 {
  font-size: var(--font-size-sm);
  margin-bottom: 6px; /* tighter */
}

@media (min-width: 768px) {
  .footer-col h4 {
    font-size: var(--font-size-base);
    margin-bottom: var(--space-sm);
  }
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 6px; /* tighter */
}

.footer-col ul li a {
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
  font-size: var(--font-size-sm);
}

.footer-col ul li a:hover {
  color: var(--color-primary);
}

/* FOOTER BOTTOM */
.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  text-align: center;
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
  font-size: var(--font-size-xs);
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    font-size: var(--font-size-sm);
  }
}

/* PAYMENT ICONS */
.payment-methods {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
  font-size: var(--font-size-lg); /* smaller */
  color: var(--color-text-secondary);
}

@media (min-width: 768px) {
  .payment-methods {
    gap: var(--space-sm);
    font-size: var(--font-size-xl);
  }
}


/* ==================== TOAST NOTIFICATIONS (MOBILE FIRST) ==================== */
.toast-container {
  position: fixed;
  top: 90px;
  right: var(--space-sm);
  left: var(--space-sm);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

@media (min-width: 600px) {
  .toast-container {
    right: var(--space-md);
    left: auto;
  }
}

.toast {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-width: auto;
  animation: slideInRight 0.3s ease;
  font-size: var(--font-size-sm);
}

@media (min-width: 600px) {
  .toast {
    padding: var(--space-md);
    gap: var(--space-sm);
    min-width: 300px;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast.success {
  border-left: 4px solid var(--color-success);
}

.toast.error {
  border-left: 4px solid var(--color-error);
}

.toast.info {
  border-left: 4px solid var(--color-info);
}

/* ==================== LOADING OVERLAY ==================== */
/* Lottie Loading Overlay - Glassmorphism Bubble */
.lottie-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lottie-loading-overlay.active {
  display: flex;
}

.lottie-loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 2.5rem;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2),
              0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

#lottieAnimationContainer {
  width: 200px;
  height: 200px;
  display: flex;             /* <-- IMPORTANT */
  align-items: center;       /* <-- IMPORTANT */
  justify-content: center;   /* <-- IMPORTANT */
}

