/* ============================================================
   CzechExpatHome.com — Design System & Global Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,900;1,400;1,600&family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

/* ============================================================
   CSS CUSTOM PROPERTIES — LIGHT MODE
   ============================================================ */
:root {
  /* Brand Colors */
  --navy: #0A1F3F;
  --gold: #C8A951;
  --gold-light: #DFC06E;
  --gold-dark: #A88A3A;
  --white: #FFFFFF;
  --silver: #B0B8C1;
  --forest: #1B5E3B;
  --coral: #E8734A;

  /* Thematic Palettes */
  --theme-dreams: #E8F4F8;
  /* Enabling Dreams: Light, airy, sky blue */
  --theme-confidence: #E8F5E9;
  /* Future Confidence: Stable, growing green */
  --theme-security: #FFF3E0;
  /* Family Security: Warm, protective orange/gold */

  /* Semantic Light Mode */
  --bg: #FFFFFF;
  --bg-alt: #F8F6F0;
  --bg-card: #FFFFFF;
  --surface: #F5F3EE;
  --text-primary: #0A1F3F;
  --text-secondary: #4A5568;
  --text-muted: #718096;
  --border: #E2E8F0;
  --border-light: #EEF0F3;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(10, 31, 63, 0.06), 0 1px 2px rgba(10, 31, 63, 0.04);
  --shadow-md: 0 4px 16px rgba(10, 31, 63, 0.10), 0 2px 6px rgba(10, 31, 63, 0.06);
  --shadow-lg: 0 10px 40px rgba(10, 31, 63, 0.14), 0 4px 14px rgba(10, 31, 63, 0.08);
  --shadow-xl: 0 20px 60px rgba(10, 31, 63, 0.18), 0 8px 24px rgba(10, 31, 63, 0.10);
  --shadow-gold: 0 4px 20px rgba(200, 169, 81, 0.25);

  /* Transitions */
  --transition: all 0.3s ease;
  --transition-fast: all 0.15s ease;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-accent: 'Poppins', system-ui, sans-serif;

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

  /* Layout */
  --container: 1200px;
  --container-narrow: 800px;
  --header-h: 72px;
  --topbar-h: 40px;
}

/* ============================================================
   CSS CUSTOM PROPERTIES — DARK MODE
   ============================================================ */
[data-theme="dark"] {
  --bg: #111827;
  --bg-alt: #0D1520;
  --bg-card: #1E293B;
  --surface: #1A2744;
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --border: #2D3748;
  --border-light: #243040;

  /* Thematic Palettes (Dark Mode) */
  --theme-dreams: #0B1B2A;
  --theme-confidence: #0C1D13;
  --theme-security: #1A120B;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5), 0 4px 14px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.6), 0 8px 24px rgba(0, 0, 0, 0.4);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

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

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

ul,
ol {
  list-style: none;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
}

h3 {
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
}

h4 {
  font-size: 1.3rem;
}

h5 {
  font-size: 1.1rem;
}

h6 {
  font-size: 1rem;
}

p {
  color: var(--text-secondary);
  line-height: 1.75;
}

.lead {
  font-size: 1.2rem;
  line-height: 1.7;
}

.text-muted {
  color: var(--text-muted);
}

.text-gold {
  color: var(--gold);
}

.text-navy {
  color: var(--navy);
}

.text-white {
  color: #fff;
}

.font-heading {
  font-family: var(--font-heading);
}

.font-accent {
  font-family: var(--font-accent);
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

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

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

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header .eyebrow {
  display: inline-block;
  font-family: var(--font-accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-md);
}

.section-header h2 {
  margin-bottom: var(--space-md);
}

.section-header p {
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* Grid utilities */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.flex-col {
  display: flex;
  flex-direction: column;
}

.gap-sm {
  gap: var(--space-sm);
}

.gap-md {
  gap: var(--space-md);
}

.gap-lg {
  gap: var(--space-lg);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.8rem 1.8rem;
  border-radius: var(--radius-full);
  font-family: var(--font-accent);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  transition: var(--transition);
  white-space: nowrap;
  cursor: pointer;
  border: 2px solid transparent;
  min-height: 48px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--navy);
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(200, 169, 81, 0.40);
  filter: brightness(1.05);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--surface);
  border-color: var(--gold);
  transform: translateY(-1px);
}

.btn-outline-gold {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}

.btn-outline-gold:hover {
  background: var(--gold);
  color: var(--navy);
  transform: translateY(-2px);
}

.btn-white {
  background: #fff;
  color: var(--navy);
  box-shadow: var(--shadow-md);
}

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

.btn-ghost {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 1rem 2.2rem;
  font-size: 1.05rem;
  min-height: 56px;
}

.btn-sm {
  padding: 0.55rem 1.2rem;
  font-size: 0.85rem;
  min-height: 38px;
}

/* ============================================================
   BACKGROUND VARIANTS
   ============================================================ */
.bg-navy {
  background-color: var(--navy);
  color: #fff;
}

.bg-navy h1,
.bg-navy h2,
.bg-navy h3,
.bg-navy h4 {
  color: #fff;
}

.bg-navy p {
  color: rgba(255, 255, 255, 0.75);
}

.bg-gold-gradient {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
}

.bg-alt {
  background-color: var(--bg-alt);
}

.bg-surface {
  background-color: var(--surface);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}

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

.card-body {
  padding: var(--space-xl);
}

/* ============================================================
   BADGES & LABELS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-family: var(--font-accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-gold {
  background: rgba(200, 169, 81, 0.15);
  color: var(--gold-dark);
  border: 1px solid rgba(200, 169, 81, 0.3);
}

.badge-navy {
  background: rgba(10, 31, 63, 0.1);
  color: var(--navy);
}

.badge-forest {
  background: rgba(27, 94, 59, 0.12);
  color: var(--forest);
}

.badge-coral {
  background: rgba(232, 115, 74, 0.12);
  color: var(--coral);
}

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: var(--radius-full);
  margin: var(--space-md) 0;
}

.divider-center {
  margin: var(--space-md) auto;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}

.form-label {
  font-family: var(--font-accent);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1.1rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: var(--transition);
  outline: none;
  min-height: 48px;
}

.form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 169, 81, 0.15);
}

.form-control::placeholder {
  color: var(--text-muted);
}

select.form-control {
  cursor: pointer;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* ============================================================
   TRUST BAR / STATS
   ============================================================ */
.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.stat-label {
  font-family: var(--font-accent);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-top: 4px;
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

/* ============================================================
   SECTION: NAVY DARK SECTION
   ============================================================ */
.section-dark {
  background: var(--navy);
  position: relative;
  overflow: hidden;
}

.section-dark::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(200, 169, 81, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.section-dark h2 {
  color: #fff;
}

.section-dark .eyebrow {
  color: var(--gold);
}

.section-dark p {
  color: rgba(255, 255, 255, 0.7);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes pulse-gold {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(200, 169, 81, 0.4);
  }

  50% {
    box-shadow: 0 0 0 10px rgba(200, 169, 81, 0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }

  100% {
    background-position: 200% center;
  }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

.reveal-delay-4 {
  transition-delay: 0.4s;
}

.reveal-delay-5 {
  transition-delay: 0.5s;
}

/* ============================================================
   RESPONSIVE UTILITIES
   ============================================================ */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .container {
    padding: 0 var(--space-lg);
  }
}

@media (max-width: 768px) {
  :root {
    --space-4xl: 4rem;
    --space-3xl: 3rem;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

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

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  .container {
    padding: 0 var(--space-md);
  }

  .hide-mobile {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .hide-desktop {
    display: none !important;
  }
}

/* ============================================================
   SCROLL BAR
   ============================================================ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-alt);
}

::-webkit-scrollbar-thumb {
  background: var(--silver);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* ============================================================
   FOCUS VISIBLE (Accessibility)
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ============================================================
   SELECTION
   ============================================================ */
::selection {
  background: rgba(200, 169, 81, 0.25);
  color: var(--navy);
}
/* ============================================================
   MOBILE FRIENDLY IMPROVEMENTS (Added Mar 2026)
   ============================================================ */

/* Fix horizontal scrolling and padding on small screens */
@media (max-width: 480px) {
  :root {
    --space-xl: 1.25rem;
    --space-lg: 1rem;
  }

  .container, .container-narrow {
    padding: 0 var(--space-md);
  }

  h1 {
    font-size: 1.75rem !important;
  }

  .btn {
    width: 100%; /* Stack buttons on very small screens */
    margin-bottom: 10px;
  }

  .topbar-left {
    display: none; /* Hide secondary info on tiny screens */
  }

  .topbar-right {
    width: 100%;
    justify-content: center;
  }
}

/* Improve readability on mobile */
p {
  -webkit-hyphens: auto;
  hyphens: auto;
}

/* Ensure images don't break layout */
img {
  height: auto !important;
}

/* Better touch targets for interactive elements */
.nav-link, .btn, .lang-btn, .filter-btn {
  min-height: 44px;
}

/* Fix grid layouts on mobile */
.grid-2, .grid-3, .grid-4 {
  gap: var(--space-lg) !important;
}

/* Article specific mobile tweaks */
.article-container {
  padding-top: var(--space-xl) !important;
  padding-bottom: var(--space-xl) !important;
}

.article-header h1 {
  font-size: 1.8rem !important;
  line-height: 1.3;
}

.lang-switch-notice {
  flex-direction: column;
  gap: 10px;
  text-align: center;
}
