/**
 * TopPuzzles.net - Main Stylesheet
 * Version: 1.0.0
 * Last Updated: 2026-01-04
 * 
 * Table of Contents:
 * 1. CSS Variables (Design Tokens)
 * 2. CSS Reset & Base
 * 3. Typography
 * 4. Layout & Grid
 * 5. Components
 * 6. Header & Navigation
 * 7. Footer
 * 8. Cards & Sections
 * 9. Buttons
 * 10. Forms
 * 11. Breadcrumbs
 * 12. Level Colors (Thermal System)
 * 13. Utilities
 * 14. Animations
 * 15. Print Styles
 * 16. Responsive
 */

/* ==========================================================================
   1. CSS Variables (Design Tokens)
   ========================================================================== */

:root {
  /* Brand Identity */
  --brand-primary: #2563EB;
  --brand-primary-dark: #1D4ED8;
  --brand-primary-light: #3B82F6;
  --brand-secondary: #F59E0B;
  --brand-secondary-dark: #D97706;
  
  /* Neutrals */
  --bg-color: #F8FAFC;
  --bg-secondary: #F1F5F9;
  --card-bg: #FFFFFF;
  --text-color: #1E293B;
  --text-secondary: #334155;
  --text-muted: #64748B;
  --border-color: #E2E8F0;
  --border-hover: #CBD5E1;
  
  /* Semantic Colors */
  --success: #10B981;
  --success-light: #D1FAE5;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --error: #EF4444;
  --error-light: #FEE2E2;
  --info: #3B82F6;
  --info-light: #DBEAFE;
  
  /* Level Colors (Thermal System) */
  /* 🟢 Cool → 🔴 Hot → 🟣 Legendary */
  --level-1: #4CAF50;        /* Beginner - Green (Cool, Safe) */
  --level-1-dark: #388E3C;
  --level-1-light: #C8E6C9;
  
  --level-2: #8BC34A;        /* Amateur - Lime (Comfortable) */
  --level-2-dark: #689F38;
  --level-2-light: #DCEDC8;
  
  --level-3: #FFC107;        /* Regular - Gold (Attention) */
  --level-3-dark: #FFA000;
  --level-3-light: #FFECB3;
  
  --level-4: #FF9800;        /* Professional - Orange (Warning) */
  --level-4-dark: #F57C00;
  --level-4-light: #FFE0B2;
  
  --level-5: #FF5722;        /* Top Player - Deep Orange (Hot) */
  --level-5-dark: #E64A19;
  --level-5-light: #FFCCBC;
  
  --level-6: #F44336;        /* Super Star - Red (Danger!) */
  --level-6-dark: #D32F2F;
  --level-6-light: #FFCDD2;
  
  --level-7: #7C3AED;        /* Legend - Purple (Royal) */
  --level-7-dark: #6D28D9;
  --level-7-light: #DDD6FE;
  
  --level-8: #2563EB;        /* All Levels - Blue (Comprehensive) */
  --level-8-dark: #1D4ED8;
  --level-8-light: #DBEAFE;
  
  /* Spacing Scale */
  --space-xs: 0.25rem;   /* 4px */
  --space-sm: 0.5rem;    /* 8px */
  --space-md: 1rem;      /* 16px */
  --space-lg: 1.5rem;    /* 24px */
  --space-xl: 2rem;      /* 32px */
  --space-2xl: 3rem;     /* 48px */
  --space-3xl: 4rem;     /* 64px */
  
  /* Typography Scale */
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 1.875rem;  /* 30px */
  --text-4xl: 2.25rem;   /* 36px */
  --text-5xl: 3rem;      /* 48px */
  
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* Border Radius */
  --radius-sm: 0.25rem;  /* 4px */
  --radius-md: 0.5rem;   /* 8px */
  --radius-lg: 0.75rem;  /* 12px */
  --radius-xl: 1rem;     /* 16px */
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 350ms ease;
  
  /* Z-Index Scale */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-tooltip: 600;
  --z-toast: 700;
  
  /* Container */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1200px;
  --container-2xl: 1400px;
}

/* ==========================================================================
   2. CSS Reset & Base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--line-height-normal);
  color: var(--text-color);
  background-color: var(--bg-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brand-primary-dark);
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

/* ==========================================================================
   3. Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-bold);
  line-height: var(--line-height-tight);
  color: var(--text-color);
}

h1 {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-lg);
}

h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-md);
}

h4 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-sm);
}

h5 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-sm);
}

h6 {
  font-size: var(--text-base);
  margin-bottom: var(--space-sm);
}

p {
  margin-bottom: var(--space-md);
}

.text-muted {
  color: var(--text-muted);
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

/* ==========================================================================
   4. Layout & Grid
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.container-sm {
  max-width: var(--container-sm);
}

.container-md {
  max-width: var(--container-md);
}

.container-lg {
  max-width: var(--container-lg);
}

.section {
  padding-block: var(--space-3xl);
}

.section-sm {
  padding-block: var(--space-xl);
}

.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gap-sm {
  gap: var(--space-sm);
}

.gap-md {
  gap: var(--space-md);
}

.gap-lg {
  gap: var(--space-lg);
}

/* ==========================================================================
   5. Components
   ========================================================================== */

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--brand-primary);
  color: white;
  padding: var(--space-sm) var(--space-md);
  z-index: var(--z-tooltip);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
  text-decoration: none;
}

/* ==========================================================================
   6. Header & Navigation
   ========================================================================== */

.header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-md);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--text-color);
}

.logo img {
  height: 40px;
  width: auto;
}

.logo:hover {
  color: var(--text-color);
  text-decoration: none;
}

.logo-icon {
  width: 40px;
  height: 40px;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-link {
  color: var(--text-secondary);
  font-weight: var(--font-medium);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--brand-primary);
  background: var(--bg-secondary);
  text-decoration: none;
}

.nav-link.active {
  color: var(--brand-primary);
  background: var(--info-light);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  padding: var(--space-sm);
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-color);
  margin: 5px 0;
  transition: var(--transition-fast);
}

/* ==========================================================================
   7. Footer
   ========================================================================== */

.footer {
  background: var(--text-color);
  color: var(--bg-color);
  padding-block: var(--space-2xl);
  margin-top: auto;
}

.footer a {
  color: var(--bg-secondary);
}

.footer a:hover {
  color: white;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xl);
}

.footer-section h4 {
  color: white;
  margin-bottom: var(--space-md);
}

.footer-section ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-bottom {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: var(--text-muted);
}

/* Newsletter Section */
.footer-newsletter {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(37, 99, 235, 0.05) 100%);
  border-radius: 16px;
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  text-align: center;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.newsletter-content h3 {
  font-size: 1.5rem;
  color: white;
  margin-bottom: var(--space-sm);
}

.newsletter-content p {
  color: #94A3B8;
  margin-bottom: var(--space-lg);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-form {
  display: flex;
  gap: var(--space-sm);
  max-width: 450px;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
  padding: 0.875rem 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: white;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.newsletter-input::placeholder {
  color: #64748B;
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--brand-primary);
  background: rgba(255, 255, 255, 0.1);
}

.newsletter-btn {
  padding: 0.875rem 1.75rem;
  background: var(--brand-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.newsletter-btn:hover {
  background: var(--brand-primary-dark);
  transform: translateY(-2px);
}

.newsletter-note {
  font-size: 0.8rem;
  color: #64748B;
  margin-top: var(--space-md);
}

.newsletter-success {
  display: none;
  color: var(--success);
  font-weight: 500;
  padding: var(--space-md);
  background: rgba(16, 185, 129, 0.1);
  border-radius: 8px;
  margin-top: var(--space-md);
}

.newsletter-success.show {
  display: block;
}

@media (max-width: 480px) {
  .newsletter-form {
    flex-direction: column;
  }
  
  .newsletter-btn {
    width: 100%;
  }
}

/* ==========================================================================
   8. Cards & Sections
   ========================================================================== */

/* Section Headers - Centered */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-3xl);
}

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  background: var(--info-light);
  color: var(--brand-primary);
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: var(--space-md);
  color: var(--text-color);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ==========================================================================
   Breadcrumbs Navigation
   ========================================================================== */
.breadcrumbs {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-sm) 0;
}

.breadcrumbs-container {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-size: 0.9rem;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.breadcrumb-item:hover {
  color: var(--brand-primary);
  background: var(--info-light);
}

.breadcrumb-item.current {
  color: var(--text-color);
  font-weight: 500;
  background: transparent;
}

.breadcrumb-item.current:hover {
  background: transparent;
  color: var(--text-color);
}

.breadcrumb-icon {
  font-size: 1rem;
}

.breadcrumb-label {
  white-space: nowrap;
}

.breadcrumb-sep {
  color: var(--text-muted);
  opacity: 0.5;
  font-size: 1rem;
  margin: 0 2px;
}

/* Responsive breadcrumbs */
@media (max-width: 768px) {
  .breadcrumbs-container {
    padding: 0 var(--space-md);
    gap: 4px;
  }
  
  .breadcrumb-item {
    padding: 4px 8px;
    font-size: 0.85rem;
  }
  
  .breadcrumb-label {
    display: none;
  }
  
  .breadcrumb-item.current .breadcrumb-label {
    display: inline;
  }
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-normal);
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.card-link {
  display: block;
  color: inherit;
}

.card-link:hover {
  text-decoration: none;
}

.card-header {
  margin-bottom: var(--space-md);
}

.card-title {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-xs);
}

.card-body {
  color: var(--text-secondary);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
  color: white;
  padding-block: var(--space-3xl);
  text-align: center;
}

.hero h1 {
  color: white;
  font-size: var(--text-5xl);
  margin-bottom: var(--space-md);
}

.hero p {
  font-size: var(--text-xl);
  opacity: 0.9;
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: var(--space-xl);
}

/* Stats Section */
.stats {
  display: flex;
  justify-content: center;
  gap: var(--space-2xl);
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  display: block;
}

.stat-label {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

/* ==========================================================================
   9. Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  text-decoration: none;
  border: 2px solid transparent;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--brand-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--brand-primary-dark);
  color: white;
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--text-color);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  color: var(--text-color);
  border-color: var(--border-hover);
}

.btn-amazon {
  background: #FF9900;
  color: #111;
  font-weight: var(--font-semibold);
}

.btn-amazon:hover {
  background: #E88B00;
  color: #111;
}

.btn-lg {
  padding: var(--space-md) var(--space-xl);
  font-size: var(--text-lg);
}

.btn-sm {
  padding: var(--space-xs) var(--space-md);
  font-size: var(--text-sm);
}

.btn-block {
  width: 100%;
}

/* ==========================================================================
   10. Forms
   ========================================================================== */

.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-weight: var(--font-medium);
  margin-bottom: var(--space-sm);
  color: var(--text-color);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-base);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--info-light);
}

.form-textarea {
  min-height: 150px;
  resize: vertical;
}

.form-error {
  color: var(--error);
  font-size: var(--text-sm);
  margin-top: var(--space-xs);
}

/* ==========================================================================
   11. Breadcrumbs
   ========================================================================== */

.breadcrumbs {
  padding: var(--space-md) 0;
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.breadcrumbs li {
  display: flex;
  align-items: center;
}

.breadcrumbs li:not(:last-child)::after {
  content: "›";
  margin-inline-start: var(--space-sm);
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--brand-primary);
  font-size: var(--text-sm);
}

.breadcrumbs a:hover {
  text-decoration: none;
}

.breadcrumbs li:last-child span {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* ==========================================================================
   12. Level Colors (Thermal System)
   ========================================================================== */

.level-1 { --level-color: var(--level-1); --level-light: var(--level-1-light); }
.level-2 { --level-color: var(--level-2); --level-light: var(--level-2-light); }
.level-3 { --level-color: var(--level-3); --level-light: var(--level-3-light); }
.level-4 { --level-color: var(--level-4); --level-light: var(--level-4-light); }
.level-5 { --level-color: var(--level-5); --level-light: var(--level-5-light); }
.level-6 { --level-color: var(--level-6); --level-light: var(--level-6-light); }
.level-7 { --level-color: var(--level-7); --level-light: var(--level-7-light); }
.level-8 { --level-color: var(--level-8); --level-light: var(--level-8-light); }

.level-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  background: var(--level-light);
  color: var(--level-color);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
}

.level-card {
  border-left: 4px solid var(--level-color);
}

.level-card:hover {
  background: var(--level-light);
}

.level-card:hover .level-cta {
  opacity: 1;
}

.level-cta {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-sm);
  opacity: 0.7;
  transition: opacity var(--transition-fast);
  font-weight: var(--font-medium);
}

/* Level Grid */
.levels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.level-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  transition: all var(--transition-normal);
}

.level-item:hover {
  border-color: var(--level-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.level-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--level-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--level-color);
}

.level-info h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-xs);
}

.level-info p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: 0;
}

/* ==========================================================================
   13. Utilities
   ========================================================================== */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.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); }
.mb-xl { margin-bottom: var(--space-xl); }

.py-sm { padding-block: var(--space-sm); }
.py-md { padding-block: var(--space-md); }
.py-lg { padding-block: var(--space-lg); }
.py-xl { padding-block: var(--space-xl); }

.px-sm { padding-inline: var(--space-sm); }
.px-md { padding-inline: var(--space-md); }
.px-lg { padding-inline: var(--space-lg); }
.px-xl { padding-inline: var(--space-xl); }

/* ==========================================================================
   14. Animations
   ========================================================================== */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-fade-in {
  animation: fadeIn var(--transition-normal) ease-out;
}

.animate-slide-up {
  animation: slideUp var(--transition-normal) ease-out;
}

/* ==========================================================================
   15. Print Styles
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  .header,
  .footer,
  .nav,
  .breadcrumbs,
  .btn,
  .cookie-banner {
    display: none !important;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  h2, h3 {
    page-break-after: avoid;
  }

  img {
    page-break-inside: avoid;
  }
}

/* ==========================================================================
   16. Responsive
   ========================================================================== */

/* Tablet */
@media (max-width: 1024px) {
  :root {
    --text-5xl: 2.5rem;
    --text-4xl: 2rem;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --text-5xl: 2rem;
    --text-4xl: 1.75rem;
    --text-3xl: 1.5rem;
  }

  .container {
    padding-inline: var(--space-md);
  }

  .section {
    padding-block: var(--space-xl);
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  /* Mobile Navigation */
  .nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--card-bg);
    flex-direction: column;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
  }

  .nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .menu-toggle {
    display: block;
  }

  .hero h1 {
    font-size: var(--text-3xl);
  }

  .hero p {
    font-size: var(--text-base);
  }

  .stats {
    gap: var(--space-lg);
  }

  .stat-number {
    font-size: var(--text-2xl);
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .btn-lg {
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--text-base);
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .breadcrumbs ol {
    font-size: var(--text-xs);
  }

  .level-item {
    flex-direction: column;
    text-align: center;
  }
}
