/* ==================================================================
   Variables
   ================================================================== */
:root {
  /* Colors */
  --color-bg: #05070c; /* main background, deep dark */
  --color-bg-elevated: #090d18;
  --color-bg-soft: rgba(15, 23, 42, 0.85); /* glassy cards */
  --color-surface: #0f172a;
  --color-surface-alt: #111827;
  --color-border-subtle: rgba(148, 163, 184, 0.25);
  --color-border-strong: rgba(148, 163, 184, 0.45);

  --color-text: #e5e7eb; /* main text */
  --color-text-muted: #9ca3af;
  --color-text-soft: #6b7280;
  --color-heading: #f9fafb;

  --color-primary: #22d3ee; /* bright cyan */
  --color-primary-soft: rgba(34, 211, 238, 0.12);
  --color-primary-strong: #06b6d4;

  --color-accent: #a3e635; /* lime accent */
  --color-accent-soft: rgba(163, 230, 53, 0.16);

  --color-success: #4ade80;
  --color-warning: #facc15;
  --color-danger: #f97373;

  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2933;
  --gray-900: #111827;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", 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 */

  --leading-tight: 1.2;
  --leading-normal: 1.5;
  --leading-relaxed: 1.7;

  /* Spacing scale (0–96px) */
  --space-0: 0;
  --space-1: 0.25rem;  /* 4px */
  --space-1-5: 0.375rem; /* 6px */
  --space-2: 0.5rem;   /* 8px */
  --space-2-5: 0.625rem; /* 10px */
  --space-3: 0.75rem;  /* 12px */
  --space-3-5: 0.875rem; /* 14px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-7: 1.75rem;  /* 28px */
  --space-8: 2rem;     /* 32px */
  --space-9: 2.25rem;  /* 36px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-14: 3.5rem;  /* 56px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */

  /* Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-pill: 999px;
  --radius-card: 1rem;

  /* Shadows (subtle to strong, tuned for dark UI) */
  --shadow-xs: 0 1px 1px rgba(15, 23, 42, 0.7);
  --shadow-sm: 0 4px 8px rgba(15, 23, 42, 0.85);
  --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.9);
  --shadow-glow-primary: 0 0 0 1px rgba(34, 211, 238, 0.5), 0 0 18px rgba(34, 211, 238, 0.25);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-base: 180ms ease-out;
  --transition-slow: 260ms ease-out;

  /* Layout */
  --container-max-width: 1120px;
  --container-padding-x: var(--space-4);
}

/* ==================================================================
   Reset / Normalize
   ================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: none;
  background: none;
  padding: 0;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

:focus {
  outline: none;
}

/* ==================================================================
   Base Styles
   ================================================================== */
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  background: radial-gradient(circle at top, #020617 0, #020617 40%, #020617 60%, #020617 100%), var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

main {
  min-height: 60vh;
}

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

h1 {
  font-size: var(--text-4xl);
}

h2 {
  font-size: var(--text-3xl);
}

h3 {
  font-size: var(--text-2xl);
}

h4 {
  font-size: var(--text-xl);
}

h5 {
  font-size: var(--text-lg);
}

h6 {
  font-size: var(--text-base);
}

p {
  margin-top: var(--space-2);
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

small {
  font-size: var(--text-sm);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-base), opacity var(--transition-base);
}

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

a:active {
  opacity: 0.9;
}

strong,
b {
  font-weight: 600;
}

code,
pre {
  font-family: var(--font-mono);
}

hr {
  border: none;
  border-top: 1px solid var(--color-border-subtle);
  margin: var(--space-6) 0;
}

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

/* Layout helpers */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-inline: auto;
  padding-inline: var(--container-padding-x);
}

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

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

.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.flex-row {
  flex-direction: row;
}

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

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

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

.flex-wrap {
  flex-wrap: wrap;
}

.gap-xs {
  gap: var(--space-2);
}

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

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

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

.grid {
  display: grid;
  gap: var(--space-4);
}

.grid-2 {
  display: grid;
  gap: var(--space-4);
}

.grid-3 {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: 1px solid var(--color-border-subtle);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.95));
}

.badge--poker {
  border-color: rgba(244, 63, 94, 0.7);
  background: radial-gradient(circle at top left, rgba(248, 113, 113, 0.25), rgba(15, 23, 42, 0.95));
}

.badge--board {
  border-color: rgba(129, 140, 248, 0.7);
  background: radial-gradient(circle at top left, rgba(129, 140, 248, 0.25), rgba(15, 23, 42, 0.95));
}

.badge--sport {
  border-color: rgba(52, 211, 153, 0.7);
  background: radial-gradient(circle at top left, rgba(52, 211, 153, 0.25), rgba(15, 23, 42, 0.95));
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--color-border-subtle);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.chip--active {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-soft);
}

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

/* Screen reader only */
.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;
}

/* Width helpers */
.w-100 {
  width: 100%;
}

/* Spacing utilities (commonly used) */
.mt-0 { margin-top: 0; }
.mt-xs { margin-top: var(--space-2); }
.mt-sm { margin-top: var(--space-3); }
.mt-md { margin-top: var(--space-4); }
.mt-lg { margin-top: var(--space-6); }

.mb-0 { margin-bottom: 0; }
.mb-xs { margin-bottom: var(--space-2); }
.mb-sm { margin-bottom: var(--space-3); }
.mb-md { margin-bottom: var(--space-4); }
.mb-lg { margin-bottom: var(--space-6); }

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

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

/* ==================================================================
   Components
   ================================================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  background: rgba(15, 23, 42, 0.9);
  color: var(--color-text);
  transition:
    background-color var(--transition-base),
    border-color var(--transition-base),
    color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast),
    opacity var(--transition-fast);
}

.btn--primary {
  background: linear-gradient(135deg, #0891b2, #22c55e);
  color: #0b1120;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.8);
}

.btn--primary:hover {
  background: linear-gradient(135deg, #06b6d4, #22c55e);
  transform: translateY(-1px);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.95);
}

.btn--outline {
  background: rgba(15, 23, 42, 0.7);
  border-color: var(--color-border-strong);
  color: var(--color-text);
}

.btn--outline:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}

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

.btn--ghost:hover {
  color: var(--color-primary);
  background: rgba(15, 23, 42, 0.8);
}

.btn--sm {
  padding: 0.35rem 0.85rem;
  font-size: var(--text-xs);
}

.btn--lg {
  padding: 0.75rem 1.4rem;
  font-size: var(--text-base);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

/* Inputs & forms */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: var(--space-4);
}

.field-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.field-hint {
  font-size: var(--text-xs);
  color: var(--color-text-soft);
}

.input,
select,
textarea {
  width: 100%;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background: rgba(15, 23, 42, 0.85);
  color: var(--color-text);
  font-size: var(--text-sm);
  outline: none;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    background-color var(--transition-base);
}

.input::placeholder,
textarea::placeholder {
  color: var(--color-text-soft);
}

.input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow-primary);
  background: rgba(15, 23, 42, 0.98);
}

.input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Cards (glass event cards, schedule blocks) */
.card {
  position: relative;
  border-radius: var(--radius-card);
  padding: var(--space-4);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base),
    border-color var(--transition-base),
    background var(--transition-base);
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(148, 163, 184, 0.38);
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.92));
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.card-title {
  font-size: var(--text-lg);
  font-weight: 600;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.card-footer {
  margin-top: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.card--highlight {
  border-color: rgba(34, 211, 238, 0.75);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.4), 0 20px 45px rgba(15, 23, 42, 0.95);
}

/* Schedule / table styles (for Menetrendek, Poker, Társasjátékok, Sportesemények) */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-subtle);
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.9));
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.table thead {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.9));
}

.table th,
.table td {
  padding: 0.7rem 0.9rem;
  white-space: nowrap;
}

.table th {
  text-align: left;
  font-weight: 500;
  color: var(--color-text-muted);
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.94);
}

.table tbody tr:nth-child(odd) {
  background: rgba(15, 23, 42, 0.98);
}

.table tbody tr:hover {
  background: rgba(15, 23, 42, 1);
}

.table tbody td {
  border-top: 1px solid rgba(15, 23, 42, 0.9);
}

/* Calendar blocks (Eseménynaptár) */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--space-2);
}

.calendar-day {
  min-height: 4.25rem;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(31, 41, 55, 0.9);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--text-xs);
}

.calendar-day--today {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.4);
}

.calendar-day-number {
  font-weight: 600;
  color: var(--color-text-muted);
}

.calendar-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
}

/* Filter bar (date/category/location/format filters) */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* Alert / informational banner (for disclaimer text) */
.alert {
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.92));
  font-size: var(--text-sm);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.alert--info {
  border-color: var(--color-primary);
}

.alert-icon {
  margin-top: 0.1rem;
}

/* Navigation shell (header/footer basics) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.86));
  border-bottom: 1px solid rgba(15, 23, 42, 1);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-sm);
}

.nav-link {
  color: var(--color-text-muted);
  position: relative;
  padding-block: 0.2rem;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.2rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transform-origin: center;
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

.nav-link:hover {
  color: var(--color-text);
}

.nav-link:hover::after,
.nav-link--active::after {
  transform: scaleX(1);
}

.nav-link--active {
  color: var(--color-primary);
}

.site-footer {
  border-top: 1px solid rgba(15, 23, 42, 1);
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 1));
  padding-block: var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text-soft);
}

/* Icon circle helpers for category icons (poker cards, chess piece, ball, etc.) */
.icon-circle {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 0, rgba(34, 211, 238, 0.5), rgba(15, 23, 42, 0.95));
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.9);
}

.icon-circle--poker {
  background: radial-gradient(circle at 30% 0, rgba(248, 113, 113, 0.45), rgba(15, 23, 42, 0.95));
}

.icon-circle--board {
  background: radial-gradient(circle at 30% 0, rgba(129, 140, 248, 0.45), rgba(15, 23, 42, 0.95));
}

.icon-circle--sport {
  background: radial-gradient(circle at 30% 0, rgba(52, 211, 153, 0.45), rgba(15, 23, 42, 0.95));
}

/* Tag-like category pills for schedules */
.category-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  border-radius: var(--radius-pill);
  padding: 0.2rem 0.65rem;
  font-size: var(--text-xs);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: var(--color-text-muted);
}

.category-pill--primary {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-soft);
}

.category-pill--accent {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-soft);
}

/* ==================================================================
   Accessibility & Motion
   ================================================================== */

:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 1), 0 0 0 4px rgba(34, 211, 238, 0.9);
}

button:focus-visible,
[role="button"]:focus-visible,
.input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  border-radius: max(var(--radius-md), 4px);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ==================================================================
   Responsive Tweaks
   ================================================================== */

@media (min-width: 640px) {
  h1 { font-size: clamp(2.25rem, 4vw, 2.75rem); }
  h2 { font-size: clamp(1.875rem, 3vw, 2.25rem); }
  h3 { font-size: clamp(1.5rem, 2.4vw, 1.875rem); }

  .site-nav {
    padding-block: var(--space-4);
  }
}

@media (max-width: 639.98px) {

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

@media (max-width: 768px) {
  .highlight-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .card--highlight {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding: 12px;
  }

  .card--highlight .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .card--highlight .card-title {
    font-size: 16px;
    line-height: 1.25;
  }

  .card--highlight .card-meta {
    font-size: 11px;
  }

  .card--highlight .table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .card--highlight .table {
    min-width: 620px;
    font-size: 12px;
  }

  .card--highlight .table th,
  .card--highlight .table td {
    padding: 8px 10px;
  }

  .card--highlight .card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .card--highlight .card-footer .btn,
  .card--highlight .card-footer a {
    width: 100%;
    justify-content: center;
  }

  .highlight-media {
    width: 100%;
    max-width: 100%;
  }

  .highlight-media img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 480px) {
  .section--tight {
    padding-block: 20px;
  }

  .container {
    padding-inline: 12px;
  }

  .card--highlight {
    padding: 10px;
    border-radius: 12px;
  }

  .card--highlight .table {
    min-width: 560px;
    font-size: 11px;
  }

  .card--highlight .table th,
  .card--highlight .table td {
    padding: 7px 8px;
  }

  .card--highlight .badge,
  .card--highlight .chip,
  .card--highlight .category-pill {
    font-size: 10px;
    padding: 3px 7px;
    white-space: nowrap;
  }
}

@media (max-width: 220px) {
  .container {
    padding-inline: 6px;
  }

  .card--highlight {
    padding: 7px;
  }

  .card--highlight .card-title {
    font-size: 13px;
  }

  .card--highlight .card-meta {
    font-size: 10px;
  }

  .card--highlight .table {
    min-width: 500px;
    font-size: 10px;
  }

  .card--highlight .table th,
  .card--highlight .table td {
    padding: 6px;
  }
}