/* ============================================
   CaliforniaCrypto.io — Core Styles
   Mobile-first, California/Crypto theme
   ============================================ */

/* --- CSS Variables --- */
:root {
  --color-primary: #F7931A;
  --color-primary-dark: #e07f0e;
  --color-primary-light: #FFD700;
  --color-bg-dark: #0f0f1a;
  --color-bg-section: #1a1a2e;
  --color-bg-card: #16213e;
  --color-bg-light: #f8f9fa;
  --color-bg-white: #ffffff;
  --color-text: #e0e0e0;
  --color-text-dark: #1a1a2e;
  --color-text-muted: #9ca3af;
  --color-text-light: #f8f9fa;
  --color-accent-blue: #0ea5e9;
  --color-accent-green: #10b981;
  --color-accent-red: #ef4444;
  --color-border: #2a2a4a;
  --color-border-light: #e5e7eb;
  --font-primary: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.25);
  --shadow-glow: 0 0 20px rgba(247,147,26,0.3);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --max-width: 1200px;
  --transition: all 0.3s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-primary);
  color: var(--color-text-dark);
  background: var(--color-bg-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--color-primary-dark); }
ul, ol { padding-left: 1.5rem; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text-dark);
}
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 0.8rem; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); margin-bottom: 0.6rem; }
p { margin-bottom: 1rem; }

/* --- Container --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1rem; }

/* --- Header & Navigation --- */
.site-header {
  background: var(--color-bg-dark);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid var(--color-primary);
}
.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  max-width: var(--max-width);
  margin: 0 auto;
}
.nav-logo img { height: 40px; width: auto; }
.nav-logo { display: flex; align-items: center; gap: 0.5rem; }
.nav-menu { display: none; list-style: none; padding: 0; margin: 0; }
.nav-menu.active {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-bg-dark);
  border-bottom: 2px solid var(--color-primary);
  padding: 1rem;
  gap: 0;
}
.nav-menu li { position: relative; }
.nav-menu a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.7rem 1rem;
  display: block;
  transition: var(--transition);
}
.nav-menu a:hover { color: var(--color-primary); }
.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}
.nav-toggle span {
  width: 25px;
  height: 3px;
  background: var(--color-text);
  border-radius: 2px;
  transition: var(--transition);
}
/* Dropdown */
.dropdown-menu {
  display: none;
  list-style: none;
  padding: 0;
  background: var(--color-bg-card);
  border-radius: var(--radius-sm);
}
.dropdown-menu a { font-size: 0.9rem; padding: 0.5rem 1.5rem; }
.nav-menu li:hover .dropdown-menu,
.nav-menu li.open .dropdown-menu { display: block; }

/* --- Hero Section --- */
.hero {
  background: linear-gradient(135deg, var(--color-bg-dark) 0%, var(--color-bg-section) 50%, #1e3a5f 100%);
  color: var(--color-text);
  padding: 3rem 1rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(247,147,26,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-content { position: relative; z-index: 2; max-width: 800px; }
.hero h1 {
  color: var(--color-text-light);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 1rem;
}
.hero h1 .highlight { color: var(--color-primary); }
.hero .subtitle {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(247,147,26,0.15);
  border: 1px solid rgba(247,147,26,0.3);
  color: var(--color-primary-light);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}
.badge-green {
  background: rgba(16,185,129,0.15);
  border-color: rgba(16,185,129,0.3);
  color: var(--color-accent-green);
}

/* --- CTA Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-family: var(--font-primary);
}
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(247,147,26,0.5);
  color: #fff;
}
.btn-secondary {
  background: transparent;
  color: var(--color-text-light);
  border: 2px solid var(--color-primary);
}
.btn-secondary:hover {
  background: var(--color-primary);
  color: #fff;
}
.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
}
.btn-sm { padding: 0.5rem 1.2rem; font-size: 0.875rem; }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.1rem; }
.btn-group { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* --- Sections --- */
.section { padding: 3rem 1rem; }
.section-dark { background: var(--color-bg-dark); color: var(--color-text); }
.section-dark h2, .section-dark h3 { color: var(--color-text-light); }
.section-alt { background: var(--color-bg-light); }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header p { color: var(--color-text-muted); max-width: 700px; margin: 0 auto; }

/* --- Cards --- */
.card {
  background: var(--color-bg-white);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card-dark {
  background: var(--color-bg-card);
  border-color: var(--color-border);
  color: var(--color-text);
}
.card-dark h3, .card-dark h4 { color: var(--color-text-light); }
.card-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  background: rgba(247,147,26,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.cards-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

/* --- Exchange Comparison Table --- */
.table-wrapper { overflow-x: auto; margin: 1.5rem 0; border-radius: var(--radius-md); }
.exchange-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 600px;
}
.exchange-table thead {
  background: var(--color-primary);
}
.exchange-table th {
  padding: 1rem 0.8rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #ffffff;
}
.exchange-table td {
  padding: 0.9rem 0.8rem;
  border-bottom: 1px solid var(--color-border-light);
  vertical-align: middle;
}
.exchange-table tbody tr:hover { background: rgba(247,147,26,0.05); }
.exchange-table .recommended {
  background: rgba(247,147,26,0.08);
  border-left: 3px solid var(--color-primary);
}
.exchange-table .exchange-name {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
}
.exchange-table .exchange-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
  background: #fff;
  padding: 2px;
}
.rating { color: var(--color-primary); font-weight: 700; }
.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}
.tag-green { background: rgba(16,185,129,0.15); color: var(--color-accent-green); }
.tag-blue { background: rgba(14,165,233,0.15); color: var(--color-accent-blue); }
.tag-orange { background: rgba(247,147,26,0.15); color: var(--color-primary); }

/* --- FAQ Accordion --- */
.faq-item {
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 0.8rem;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.2rem;
  background: none;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-dark);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-primary);
  transition: var(--transition);
}
.faq-question:hover { background: var(--color-bg-light); }
.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--color-primary);
  transition: var(--transition);
  flex-shrink: 0;
  margin-left: 1rem;
}
.faq-item.active .faq-question::after { content: '−'; }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-item.active .faq-answer { max-height: 500px; }
.faq-answer-inner { padding: 0 1.2rem 1.2rem; color: var(--color-text-muted); line-height: 1.7; }

/* --- Steps --- */
.steps { counter-reset: step; }
.step {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}
.step-number {
  counter-increment: step;
  flex-shrink: 0;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}
.step-content h3 { margin-bottom: 0.3rem; font-size: 1.1rem; }
.step-content p { color: var(--color-text-muted); margin-bottom: 0; }

/* --- Info Boxes --- */
.info-box {
  background: rgba(14,165,233,0.08);
  border-left: 4px solid var(--color-accent-blue);
  padding: 1.2rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
}
.info-box-warning {
  background: rgba(247,147,26,0.08);
  border-color: var(--color-primary);
}
.info-box-success {
  background: rgba(16,185,129,0.08);
  border-color: var(--color-accent-green);
}
.info-box strong { display: block; margin-bottom: 0.3rem; }

/* --- Breadcrumb --- */
.breadcrumb {
  padding: 0.8rem 1rem;
  background: var(--color-bg-light);
  border-bottom: 1px solid var(--color-border-light);
}
.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.85rem;
  max-width: var(--max-width);
  margin: 0 auto;
}
.breadcrumb-list li::after { content: '/'; margin-left: 0.5rem; color: var(--color-text-muted); }
.breadcrumb-list li:last-child::after { content: ''; }
.breadcrumb-list a { color: var(--color-primary); }
.breadcrumb-list li:last-child { color: var(--color-text-muted); }

/* --- Footer --- */
.site-footer {
  background: var(--color-bg-dark);
  color: var(--color-text);
  padding: 3rem 1rem 1.5rem;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}
.footer-col h4 {
  color: var(--color-text-light);
  margin-bottom: 1rem;
  font-size: 1rem;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { color: var(--color-text-muted); font-size: 0.9rem; }
.footer-col a:hover { color: var(--color-primary); }
.footer-col p { color: var(--color-text-muted); font-size: 0.9rem; line-height: 1.6; }
.footer-bottom {
  max-width: var(--max-width);
  margin: 1.5rem auto 0;
  text-align: center;
}
.footer-disclaimer {
  background: rgba(247,147,26,0.08);
  border: 1px solid rgba(247,147,26,0.2);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}
.footer-copyright { font-size: 0.8rem; color: var(--color-text-muted); }

/* --- City/County Hub Grid --- */
.location-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, 1fr);
}
.location-link {
  display: block;
  padding: 0.8rem 1rem;
  background: var(--color-bg-white);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: var(--transition);
}
.location-link:hover {
  border-color: var(--color-primary);
  background: rgba(247,147,26,0.05);
  transform: translateY(-1px);
}

/* --- ATM Locations --- */
.atm-card {
  background: var(--color-bg-light);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 0.8rem;
  border-left: 3px solid var(--color-primary);
}
.atm-card h4 { font-size: 0.95rem; margin-bottom: 0.3rem; }
.atm-card p { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 0; }

/* --- Content Styles --- */
.content-body { max-width: 800px; }
.content-body h2 { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--color-border-light); }
.content-body h2:first-child { border-top: none; margin-top: 0; padding-top: 0; }
.content-body ul, .content-body ol { margin-bottom: 1rem; }
.content-body li { margin-bottom: 0.4rem; }
.content-body table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.content-body table th, .content-body table td {
  padding: 0.7rem;
  border: 1px solid var(--color-border-light);
  text-align: left;
}
.content-body table th { background: var(--color-bg-light); font-weight: 600; }

/* --- Sidebar --- */
.page-layout { display: flex; flex-direction: column; gap: 2rem; }
.sidebar .card { margin-bottom: 1rem; }
.sidebar-cta {
  background: linear-gradient(135deg, var(--color-bg-dark), var(--color-bg-section));
  color: var(--color-text);
  border: 1px solid var(--color-border);
  text-align: center;
}
.sidebar-cta h4 { color: var(--color-text-light); margin-bottom: 0.5rem; }
.sidebar-cta p { font-size: 0.9rem; color: var(--color-text-muted); margin-bottom: 1rem; }

/* --- Stats Bar --- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}
.stat-item { text-align: center; }
.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-primary);
  display: block;
}
.stat-label { font-size: 0.85rem; color: var(--color-text-muted); }

/* ============================================
   RESPONSIVE — Tablet (768px+)
   ============================================ */
@media (min-width: 768px) {
  .container { padding: 0 2rem; }
  .hero { padding: 4rem 2rem; }
  .section { padding: 4rem 2rem; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .location-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-bar { grid-template-columns: repeat(4, 1fr); }
  .page-layout { flex-direction: row; }
  .content-main { flex: 1; min-width: 0; }
  .sidebar { width: 300px; flex-shrink: 0; }
}

/* ============================================
   RESPONSIVE — Desktop (1024px+)
   ============================================ */
@media (min-width: 1024px) {
  .nav-menu {
    display: flex !important;
    position: static;
    flex-direction: row;
    background: none;
    border: none;
    padding: 0;
    gap: 0;
    align-items: center;
  }
  .nav-menu a { padding: 0.5rem 0.8rem; }
  .nav-toggle { display: none; }
  .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    z-index: 100;
  }
  .hero { padding: 5rem 2rem; }
  .hero-content { max-width: 700px; }
  .hero-split { display: flex; align-items: center; gap: 3rem; }
  .hero-image { flex: 1; max-width: 400px; border-radius: var(--radius-lg); }
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
  .location-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
  .section { padding: 5rem 2rem; }
}

/* ============================================
   RESPONSIVE — Large Desktop (1200px+)
   ============================================ */
@media (min-width: 1200px) {
  .location-grid { grid-template-columns: repeat(5, 1fr); }
}

/* --- Utility Classes --- */
.text-center { text-align: center; }
.text-primary { color: var(--color-primary); }
.text-muted { color: var(--color-text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.nofollow-link { /* marker for external links */ }

/* --- Print --- */
@media print {
  .site-header, .site-footer, .btn, .nav-toggle { display: none; }
  body { color: #000; background: #fff; }
}
