/* Valašské Kilo - Modern Design System */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* ========== CSS Variables ========== */
:root {
  /* Colors - Modern Palette */
  --primary: hsl(15, 85%, 55%);
  --primary-dark: hsl(15, 85%, 45%);
  --primary-light: hsl(15, 85%, 65%);
  
  --secondary: hsl(200, 70%, 50%);
  --secondary-dark: hsl(200, 70%, 40%);
  
  --accent: hsl(280, 70%, 55%);
  --success: hsl(145, 65%, 50%);
  --warning: hsl(40, 90%, 55%);
  --error: hsl(0, 75%, 55%);
  
  --bg-primary: hsl(220, 20%, 10%);
  --bg-secondary: hsl(220, 15%, 15%);
  --bg-tertiary: hsl(220, 15%, 20%);
  
  --text-primary: hsl(0, 0%, 95%);
  --text-secondary: hsl(0, 0%, 80%);
  --text-muted: hsl(0, 0%, 65%);
  
  --border: hsla(0, 0%, 100%, 0.1);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  
  /* Typography */
  --font-body: 'Inter', sans-serif;
  --font-heading: 'Outfit', sans-serif;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Z-index layers */
  --z-base: 1;
  --z-dropdown: 100;
  --z-modal: 1000;
  --z-notification: 2000;
}

/* ========== Light Theme Variables ========== */
[data-theme="light"] {
  /* Colors - Light Palette */
  --primary: hsl(15, 85%, 55%);
  --primary-dark: hsl(15, 85%, 45%);
  --primary-light: hsl(15, 85%, 65%);
  
  --secondary: hsl(200, 70%, 50%);
  --secondary-dark: hsl(200, 70%, 40%);
  
  --accent: hsl(280, 70%, 55%);
  --success: hsl(145, 65%, 45%);
  --warning: hsl(40, 90%, 50%);
  --error: hsl(0, 75%, 50%);
  
  --bg-primary: hsl(0, 0%, 98%);
  --bg-secondary: hsl(0, 0%, 95%);
  --bg-tertiary: hsl(0, 0%, 92%);
  
  --text-primary: hsl(220, 20%, 15%);
  --text-secondary: hsl(220, 15%, 30%);
  --text-muted: hsl(220, 10%, 50%);
  
  --border: hsla(220, 20%, 20%, 0.15);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--transition-base), color var(--transition-base);
}

/* Dark theme background (default) */
body:not([data-theme="light"]) {
  background: 
    linear-gradient(135deg, rgba(18, 20, 28, 0.95) 0%, rgba(28, 35, 45, 0.92) 100%),
    url('/images/pattern-bg.webp');
  background-size: auto, 400px;
  background-attachment: fixed, fixed;
}

/* Light theme background */
[data-theme="light"] body {
  background: 
    linear-gradient(135deg, rgba(248, 250, 252, 0.95) 0%, rgba(241, 245, 249, 0.92) 100%),
    url('/images/pattern-bg.webp');
  background-size: auto, 400px;
  background-attachment: fixed, fixed;
}

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

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

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
}

p {
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

.lead {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-light);
}

a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}

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

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

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

.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); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 992px) {
  .grid-5, .grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .grid-5, .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .grid-5, .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ========== Compact Hero Section ========== */
.hero-compact {
  padding: var(--space-xl) 0;
  text-align: center;
  background: 
    linear-gradient(rgba(18, 20, 28, 0.7), rgba(18, 20, 28, 0.7)),
    url('/images/hero-bg.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  border-bottom: 1px solid var(--border);
}

/* Light theme for hero background */
[data-theme="light"] .hero-compact {
  background: 
    linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)),
    url('/images/hero-bg.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero-content-compact {
  max-width: 800px;
  margin: 0 auto;
}

.edition-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  padding: var(--space-xs) var(--space-lg);
  border-radius: var(--radius-full);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.event-date-highlight {
  background: rgba(255, 255, 255, 0.03);
  border: 3px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  animation: pulse-glow 2s ease-in-out infinite;
  backdrop-filter: blur(12px);
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.2);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 12px 32px rgba(255, 107, 53, 0.4);
    transform: scale(1.02);
  }
}

.date-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

.date-main {
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 900;
  color: var(--primary);
  font-family: var(--font-heading);
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.registration-note {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: var(--space-sm);
}

/* Light theme adjustments */
[data-theme="light"] .event-date-highlight {
  background: rgba(0, 0, 0, 0.02);
  box-shadow: 0 12px 40px rgba(255, 107, 53, 0.1);
}

[data-theme="light"] .date-label {
  color: var(--text-muted);
}

[data-theme="light"] .edition-badge {
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.25);
}

/* ========== Navigation ========== */
.navbar {
  position: sticky;
  top: 0;
  z-index: var(--z-dropdown);
  background: rgba(18, 20, 28, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: var(--space-sm) 0;
}

.navbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
}

.navbar-brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  transition: transform var(--transition-base);
  order: 1;
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.navbar-nav {
  display: flex;
  gap: var(--space-md);
  list-style: none;
  order: 2;
}

.navbar-nav a {
  color: var(--text-secondary);
  font-weight: 500;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  position: relative;
}

.navbar-nav a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.navbar-nav a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

.navbar-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--primary);
  border-radius: 50%;
}

/* Theme Toggle Button */
.theme-toggle {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
  order: 3;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

.theme-toggle .theme-icon {
  font-size: 1.25rem;
  line-height: 1;
  transition: transform var(--transition-base);
}

.theme-toggle:hover .theme-icon {
  transform: rotate(20deg);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(232, 84, 42, 0.2);
}

.menu-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Light theme navbar adjustments */
[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .theme-toggle {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .theme-toggle:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  order: 4;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-base);
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
  
  .navbar-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(18, 20, 28, 0.95);
    backdrop-filter: blur(12px);
    padding: var(--space-md);
    gap: var(--space-xs);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-base);
  }
  
  .navbar-nav.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
}

/* ========== Cards ========== */
.card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(255, 255, 255, 0.15);
}

.card-glass {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.05) 0%, 
    rgba(255, 255, 255, 0.02) 100%);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.sponsor-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  transition: all var(--transition-base);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sponsor-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.sponsor-card img {
  max-width: 100%;
  max-height: 80px;
  object-fit: contain;
  filter: grayscale(0.2);
  transition: all var(--transition-base);
}

.sponsor-card:hover img {
  filter: grayscale(0);
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.875rem 1.75rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width var(--transition-slow), height var(--transition-slow);
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(232, 84, 42, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 24px rgba(232, 84, 42, 0.4);
  transform: translateY(-2px);
}

.btn:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

.btn-primary:focus-visible {
  outline-color: var(--primary-light);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

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

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

/* ========== Form Elements ========== */
.form-group {
  margin-bottom: var(--space-md);
}

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

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all var(--transition-base);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232, 84, 42, 0.1);
  background: rgba(255, 255, 255, 0.08);
}

/* Ensure focus-visible styles for all form elements */
.form-input:focus-visible,
.form-select:focus-visible,
.form-textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232, 84, 42, 0.15);
}

.form-select option {
  background-color: #ffffff;
  color: #000000;
}

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

/* ========== Grid System ========== */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ========== Hero Section ========== */
.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: var(--space-2xl) 0;
  background: 
    linear-gradient(135deg, rgba(18, 20, 28, 0.85) 0%, rgba(28, 35, 45, 0.75) 100%),
    url('/images/hero-bg.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(232, 84, 42, 0.15) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  animation: pulse 8s ease-in-out infinite;
}

.page-header {
  height: 40vh;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: var(--space-xl);
  background: 
    linear-gradient(135deg, rgba(18, 20, 28, 0.85) 0%, rgba(28, 35, 45, 0.75) 100%),
    url('/images/hero-bg.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(232, 84, 42, 0.15) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  animation: pulse 8s ease-in-out infinite;
}

/* Light theme hero background */
[data-theme="light"] .hero,
[data-theme="light"] .page-header {
  background: 
    linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(240, 240, 245, 0.85) 100%),
    url('/images/hero-bg.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

[data-theme="light"] .hero::before,
[data-theme="light"] .page-header::before {
  background: radial-gradient(circle, rgba(232, 84, 42, 0.05) 0%, transparent 70%);
}

.hero-content {
  position: relative;
  z-index: var(--z-base);
  max-width: 800px;
}

.hero-title {
  margin-bottom: var(--space-md);
  animation: fadeInUp 0.8s ease both;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--space-xl);
  animation: fadeInUp 0.8s ease 0.2s both;
}

[data-theme="light"] .hero-subtitle {
  color: var(--text-secondary);
}

.hero-cta {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.4s both;
}

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

/* ========== Utility Classes ========== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.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-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); }

.flex { display: flex; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-column { flex-direction: column; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.list-unstyled {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

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

.font-mono {
  font-family: 'Courier New', Courier, monospace;
}

/* ========== Animations ========== */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in {
  animation: fadeInUp 0.6s ease both;
}

/* ========== Loading Spinner ========== */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ========== Alert/Notification ========== */
.alert {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  backdrop-filter: blur(12px);
}

.alert-success {
  background: rgba(72, 187, 120, 0.15);
  border: 1px solid rgba(72, 187, 120, 0.3);
  color: var(--success);
}

.alert-error {
  background: rgba(245, 101, 101, 0.15);
  border: 1px solid rgba(245, 101, 101, 0.3);
  color: var(--error);
}

.alert-info {
  background: rgba(66, 153, 225, 0.15);
  border: 1px solid rgba(66, 153, 225, 0.3);
  color: var(--secondary);
}

/* ========== Footer ========== */
footer {
  margin-top: var(--space-xl);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
}

/* ========== Article Content ========== */
.article-body {
  color: var(--text-secondary);
}

.article-body p {
  margin-bottom: var(--space-sm);
}

.article-body h1, .article-body h2, .article-body h3 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.article-body ul, .article-body ol {
  margin-left: var(--space-md);
  margin-bottom: var(--space-md);
  padding-left: var(--space-sm);
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: var(--space-md) 0;
  display: block;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.article-body a {
  color: var(--primary-light);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.article-body a:hover {
  color: var(--primary);
}
