/* UK Visa Calculator - Mobile-First CSS */

/* ==================== Design Tokens ==================== */
:root {
  /* Colors */
  --color-primary: #1d4ed8;
  --color-primary-dark: #1e40af;
  --color-secondary: #059669;
  --color-accent: #dc2626;
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-surface: #ffffff;
  --color-border: #e2e8f0;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-link: #2563eb;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  
  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --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: 1.875rem;
  --font-size-4xl: 2.25rem;
  
  /* Layout */
  --container-max: 1200px;
  --radius: 0.5rem;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

/* ==================== Reset & Base ==================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg-alt);
}

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

/* ==================== Typography ==================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
  margin-bottom: var(--space-md);
}

a {
  color: var(--color-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ==================== Layout ==================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-2xl) 0;
}

/* ==================== Header ==================== */
.site-header {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-md) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

.site-nav {
  display: none;
}

.site-nav.active {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-md);
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.site-nav a {
  display: block;
  padding: var(--space-sm);
  color: var(--color-text);
}

.mobile-menu-toggle {
  background: none;
  border: none;
  font-size: var(--font-size-xl);
  cursor: pointer;
  color: var(--color-text);
}

/* ==================== Cards ==================== */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-lg);
}

.card-title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-md);
  color: var(--color-primary);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

/* ==================== Buttons ==================== */
.btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--font-size-base);
  font-weight: 600;
  text-align: center;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

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

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  text-decoration: none;
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: white;
}

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

/* ==================== Forms ==================== */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}

.form-input,
.form-select {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-size-base);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background-color: var(--color-surface);
  font-family: var(--font-sans);
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

/* ==================== Calculator ==================== */
.calculator {
  background: var(--color-surface);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.calculator-title {
  font-size: var(--font-size-2xl);
  color: var(--color-primary);
  margin-bottom: var(--space-lg);
  text-align: center;
}

.estimate-banner {
  background-color: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  border-radius: var(--radius);
}

.estimate-banner strong {
  color: #92400e;
}

.calculator-result {
  background-color: var(--color-bg-alt);
  border-radius: var(--radius);
  padding: var(--space-lg);
  margin-top: var(--space-lg);
}

.result-breakdown {
  list-style: none;
}

.result-breakdown li {
  display: flex;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border);
}

.result-breakdown li:last-child {
  border-bottom: none;
  font-weight: 700;
  font-size: var(--font-size-lg);
  padding-top: var(--space-md);
  margin-top: var(--space-sm);
  border-top: 2px solid var(--color-primary);
}

/* ==================== Ad Slots ==================== */
.ad-slot {
  background-color: var(--color-bg-alt);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  margin: var(--space-xl) 0;
}

.ad-slot-top {
  height: 90px;
}

.ad-slot-after-calc {
  height: 250px;
}

.ad-slot-footer {
  height: 90px;
}

.ad-slot-sidebar {
  display: none; /* Hidden on mobile */
}

/* ==================== FAQ ==================== */
.faq-list {
  list-style: none;
}

.faq-item {
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  background: var(--color-bg-alt);
  border-radius: var(--radius);
}

.faq-question {
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.faq-answer {
  color: var(--color-text);
  margin-bottom: 0;
}

/* ==================== Breadcrumb ==================== */
.breadcrumb {
  margin-bottom: var(--space-lg);
  font-size: var(--font-size-sm);
}

.breadcrumb-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.breadcrumb-list li:not(:last-child)::after {
  content: '›';
  margin-left: var(--space-sm);
  color: var(--color-text-muted);
}

/* ==================== Footer ==================== */
.site-footer {
  background-color: var(--color-text);
  color: white;
  padding: var(--space-2xl) 0 var(--space-lg);
  margin-top: var(--space-2xl);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.footer-links a {
  color: white;
  opacity: 0.8;
}

.footer-links a:hover {
  opacity: 1;
}

.footer-copyright {
  text-align: center;
  opacity: 0.7;
  font-size: var(--font-size-sm);
}

/* ==================== Utility Classes ==================== */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mt-lg { margin-top: var(--space-lg); }

/* ==================== Responsive - Tablet ==================== */
@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-lg);
  }
  
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .site-nav {
    display: block;
    position: static;
    border: none;
    padding: 0;
  }
  
  .site-nav ul {
    flex-direction: row;
    gap: var(--space-lg);
  }
  
  .mobile-menu-toggle {
    display: none;
  }
  
  h1 { font-size: 3rem; }
  h2 { font-size: 2.25rem; }
}

/* ==================== Responsive - Desktop ==================== */
@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .ad-slot-sidebar {
    display: flex;
    height: 600px;
    position: sticky;
    top: 80px;
  }
  
  .main-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--space-xl);
  }
}

/* ==================== Print Styles ==================== */
@media print {
  .site-header,
  .site-footer,
  .ad-slot,
  .mobile-menu-toggle {
    display: none;
  }
  
  .calculator {
    border: 1px solid #000;
  }
}
