/**
 * TV Zdrowie Design System
 *
 * A comprehensive design system for the TV Zdrowie health television website.
 * Based on the visual designs featuring burgundy gradients, medical themes,
 * and modern card-based layouts.
 */

/* ==========================================================================
   CSS Custom Properties (Design Tokens)
   ========================================================================== */

:root {
  /* -------------------------------------------------------------------------
     Colors - Primary Palette
     ------------------------------------------------------------------------- */

  /* Burgundy/Maroon - Primary Background */
  --color-burgundy-950: #1F0A11;
  --color-burgundy-900: #491027;
  --color-burgundy-800: #491027;
  --color-burgundy-700: #5A1F35;
  --color-burgundy-600: #6B1B3D;
  --color-burgundy-500: #8B2A4F;
  --color-burgundy-400: #A83A62;
  --color-burgundy-300: #C45A7D;

  /* Teal/Cyan - Accent Color */
  --color-teal-500: #7ECAE7;
  --color-teal-400: #9DD5EC;
  --color-teal-300: #BCE0F1;
  --color-teal-600: #5FBCD9;
  --color-teal-700: #2F8AA7;

  /* Red - Secondary Accent */
  --color-red-500: #C81B41;
  --color-red-400: #E02D54;
  --color-red-600: #A31535;

  /* Medical Green - Logo Color */
  --color-medical-green: #00A651;
  --color-medical-green-light: #2ECC71;

  /* Neutrals */
  --color-white: #FFFFFF;
  --color-gray-50: #F9FAFB;
  --color-gray-100: #F3F4F6;
  --color-gray-200: #E5E7EB;
  --color-gray-300: #D1D5DB;
  --color-gray-400: #9CA3AF;
  --color-gray-500: #6B7280;
  --color-gray-600: #4B5563;
  --color-gray-700: #374151;
  --color-gray-800: #1F2937;
  --color-gray-900: #111827;
  --color-black: #000000;

  /* Semantic Colors */
  --color-success: var(--color-medical-green);
  --color-error: var(--color-red-500);
  --color-warning: #F59E0B;
  --color-info: var(--color-teal-500);

  /* -------------------------------------------------------------------------
     Gradients
     ------------------------------------------------------------------------- */

  /* Primary background gradient (burgundy) */
  --gradient-bg-primary: linear-gradient(
    135deg,
    var(--color-burgundy-600) 0%,
    var(--color-burgundy-800) 50%,
    var(--color-burgundy-900) 100%
  );

  /* Hero section gradient */
  --gradient-hero: linear-gradient(
    180deg,
    var(--color-burgundy-700) 0%,
    var(--color-burgundy-800) 100%
  );

  /* Card overlay gradient */
  --gradient-card-overlay: linear-gradient(
    180deg,
    transparent 0%,
    rgba(31, 10, 18, 0.8) 100%
  );

  /* Text gradient (for titles like NERKI) */
  --gradient-text-accent: linear-gradient(
    90deg,
    var(--color-white) 0%,
    var(--color-teal-500) 50%,
    var(--color-red-500) 100%
  );

  /* -------------------------------------------------------------------------
     Typography
     ------------------------------------------------------------------------- */

  /* Font Families */
  --font-family-base: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-heading: 'Poppins', 'Open Sans', sans-serif;
  --font-family-mono: 'Fira Code', 'Courier New', monospace;

  /* Font Sizes - Using fluid typography scale */
  --font-size-xs: clamp(0.625rem, 0.6rem + 0.125vw, 0.75rem);     /* 10-12px */
  --font-size-sm: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);      /* 12-14px */
  --font-size-base: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);      /* 14-16px */
  --font-size-lg: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);          /* 16-18px */
  --font-size-xl: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);       /* 18-20px */
  --font-size-2xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);       /* 20-24px */
  --font-size-3xl: clamp(1.5rem, 1.3rem + 1vw, 1.875rem);         /* 24-30px */
  --font-size-4xl: clamp(1.875rem, 1.5rem + 1.875vw, 2.25rem);    /* 30-36px */
  --font-size-5xl: clamp(2.25rem, 1.75rem + 2.5vw, 3rem);         /* 36-48px */
  --font-size-6xl: clamp(3rem, 2.25rem + 3.75vw, 4rem);           /* 48-64px */
  --font-size-7xl: clamp(4rem, 3rem + 5vw, 5.5rem);               /* 64-88px */

  /* Font Weights */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  --font-weight-black: 900;

  /* Line Heights */
  --line-height-none: 1;
  --line-height-tight: 1.15;
  --line-height-snug: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
  --line-height-loose: 2;

  /* Letter Spacing */
  --letter-spacing-tighter: -0.05em;
  --letter-spacing-tight: -0.025em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.025em;
  --letter-spacing-wider: 0.05em;
  --letter-spacing-widest: 0.1em;
  --letter-spacing-ultra: 0.2em;

  /* -------------------------------------------------------------------------
     Spacing
     ------------------------------------------------------------------------- */

  --space-0: 0;
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
  --space-32: 8rem;     /* 128px */

  /* -------------------------------------------------------------------------
     Sizing
     ------------------------------------------------------------------------- */

  --size-container-sm: 640px;
  --size-container-md: 768px;
  --size-container-lg: 1024px;
  --size-container-xl: 1280px;
  --size-container-2xl: 1440px;
  --size-container-max: 1600px;

  /* -------------------------------------------------------------------------
     Border Radius
     ------------------------------------------------------------------------- */

  --radius-none: 0;
  --radius-sm: 0.25rem;    /* 4px */
  --radius-md: 0.5rem;     /* 8px */
  --radius-lg: 0.75rem;    /* 12px */
  --radius-xl: 1rem;       /* 16px */
  --radius-2xl: 1.5rem;    /* 24px */
  --radius-3xl: 2rem;      /* 32px */
  --radius-full: 9999px;

  /* -------------------------------------------------------------------------
     Shadows
     ------------------------------------------------------------------------- */

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);

  /* Card shadows */
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 8px 30px rgba(0, 0, 0, 0.4);

  /* -------------------------------------------------------------------------
     Transitions
     ------------------------------------------------------------------------- */

  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;
  --transition-slower: 700ms ease;

  /* Specific transitions */
  --transition-colors: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
  --transition-transform: transform 300ms ease;
  --transition-opacity: opacity 300ms ease;
  --transition-all: all 300ms ease;

  /* -------------------------------------------------------------------------
     Z-Index Scale
     ------------------------------------------------------------------------- */

  --z-behind: -1;
  --z-base: 0;
  --z-dropdown: 10;
  --z-sticky: 20;
  --z-fixed: 30;
  --z-modal-backdrop: 40;
  --z-modal: 50;
  --z-popover: 60;
  --z-tooltip: 70;
  --z-toast: 80;
  --z-max: 9999;

  /* -------------------------------------------------------------------------
     Component-Specific Tokens
     ------------------------------------------------------------------------- */

  /* Header */
  --header-height: 80px;
  --header-height-mobile: 60px;
  --header-bg: transparent;

  /* Cards */
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-bg-hover: rgba(255, 255, 255, 0.1);
  --card-border: rgba(255, 255, 255, 0.1);
  --card-aspect-ratio-vertical: 9 / 16;
  --card-aspect-ratio-horizontal: 16 / 9;

  /* Buttons */
  --btn-padding-x: var(--space-6);
  --btn-padding-y: var(--space-3);
  --btn-radius: var(--radius-full);

  /* Video Player */
  --player-aspect-ratio: 16 / 9;
  --player-radius: var(--radius-lg);

  /* Partners Bar */
  --partners-height: 60px;
  --partners-bg: rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */

*,
*::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-base);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-white);
  background-color: var(--color-burgundy-900);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Typography Utilities
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
}

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

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

a {
  color: var(--color-teal-500);
  text-decoration: none;
  transition: var(--transition-colors);
}

a:hover {
  color: var(--color-teal-400);
}

/* ==========================================================================
   Layout Utilities
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--size-container-max);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

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

@media (min-width: 1280px) {
  .container {
    padding-inline: var(--space-12);
  }
}

.section {
  padding-block: var(--space-12);
}

@media (min-width: 768px) {
  .section {
    padding-block: var(--space-16);
  }
}

/* Flexbox utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Grid utilities */
.grid { display: grid; }

/* ==========================================================================
   Component Base Styles
   ========================================================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--btn-padding-y) var(--btn-padding-x);
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--btn-radius);
  cursor: pointer;
  transition: var(--transition-all);
}

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

.btn-primary:hover {
  background-color: var(--color-red-600);
  border-color: var(--color-red-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

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

.btn-youtube {
  background-color: var(--color-red-500);
  color: var(--color-white);
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-lg);
}

.btn-youtube:hover {
  background-color: var(--color-red-600);
  transform: scale(1.02);
}

/* Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: var(--transition-all);
}

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

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  border-radius: var(--radius-sm);
}

.badge-info {
  background-color: var(--color-teal-500);
  color: var(--color-burgundy-900);
}

.badge-live {
  background-color: var(--color-red-500);
  color: var(--color-white);
}

/* ==========================================================================
   Special Text Effects
   ========================================================================== */

/* Gradient text for program titles */
.text-gradient {
  background: var(--gradient-text-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Two-color split text (like "NE RKI") */
.text-split-teal { color: var(--color-teal-500); }
.text-split-red { color: var(--color-red-500); }

/* Program title styling */
.program-title {
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-black);
  font-size: var(--font-size-7xl);
  letter-spacing: var(--letter-spacing-tight);
  line-height: var(--line-height-none);
  text-transform: uppercase;
}

.program-subtitle {
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-light);
  font-size: var(--font-size-2xl);
  letter-spacing: var(--letter-spacing-widest);
}

/* ==========================================================================
   Scrollbar Styling
   ========================================================================== */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-burgundy-900);
}

::-webkit-scrollbar-thumb {
  background: var(--color-burgundy-500);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-burgundy-400);
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fade-in {
  animation: fadeIn var(--transition-normal) forwards;
}

.animate-slide-up {
  animation: slideUp var(--transition-slow) forwards;
}

.animate-slide-in-left {
  animation: slideInLeft var(--transition-slow) forwards;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--color-teal-500);
  outline-offset: 2px;
}

/* ==========================================================================
   Media Query Breakpoints Reference

   --breakpoint-sm: 640px
   --breakpoint-md: 768px
   --breakpoint-lg: 1024px
   --breakpoint-xl: 1280px
   --breakpoint-2xl: 1536px
   ========================================================================== */
