/* ========================================================================
   TravelGearumo Base Styles
   Clean, modern, content-focused, trustworthy
   ======================================================================== */

/* ========================================================================
   1. CSS Custom Properties (Variables)
   ======================================================================== */
:root {
  /* Color palette - tuned for readability & trustworthiness */
  --color-bg: #f5f7fa;
  --color-surface: #ffffff;
  --color-surface-muted: #f0f3f8;

  --color-text: #111827;
  --color-text-muted: #6b7280;
  --color-border: #d1d5db;

  --color-primary: #2563eb;      /* main accent (links, key actions) */
  --color-primary-soft: #e0edff; /* subtle background accents */

  --color-success: #16a34a;
  --color-warning: #f59e0b;
  --color-danger: #dc2626;

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

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Georgia", "Times New Roman", serif;
  --font-mono: "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Base scales (desktop-first, adjusted with media queries when needed) */
  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */

  --line-height-tight: 1.2;
  --line-height-snug: 1.35;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.8;

  /* Spacing scale (0–96px) */
  --space-0: 0;
  --space-1: 0.125rem;  /* 2px */
  --space-2: 0.25rem;   /* 4px */
  --space-3: 0.375rem;  /* 6px */
  --space-4: 0.5rem;    /* 8px */
  --space-5: 0.625rem;  /* 10px */
  --space-6: 0.75rem;   /* 12px */
  --space-8: 1rem;      /* 16px */
  --space-10: 1.25rem;  /* 20px */
  --space-12: 1.5rem;   /* 24px */
  --space-16: 2rem;     /* 32px */
  --space-20: 2.5rem;   /* 40px */
  --space-24: 3rem;     /* 48px */
  --space-32: 4rem;     /* 64px */
  --space-40: 5rem;     /* 80px */
  --space-48: 6rem;     /* 96px */

  /* Radii */
  --radius-sm: 0.25rem;  /* 4px */
  --radius-md: 0.5rem;   /* 8px */
  --radius-lg: 0.75rem;  /* 12px */
  --radius-xl: 1rem;     /* 16px */
  --radius-full: 9999px;

  /* Shadows (subtle, for trustworthy informational look) */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.12);

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

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

html,
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd,
ul,
ol,
pre {
  margin: 0;
  padding: 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[role="list"],
ol[role="list"] {
  list-style: none;
  padding-left: 0;
}

/* Remove default link underline but keep for keyboard focus via styles below */
a {
  color: inherit;
  text-decoration: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ========================================================================
   3. Base Styles
   ======================================================================== */
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  background-color: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

main {
  min-height: 60vh;
}

/* Headings: modern, content-focused hierarchy */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

h1 {
  font-size: var(--font-size-4xl);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-12);
}

h2 {
  font-size: var(--font-size-3xl);
  line-height: var(--line-height-snug);
  margin: var(--space-16) 0 var(--space-8);
}

h3 {
  font-size: var(--font-size-2xl);
  line-height: var(--line-height-snug);
  margin: var(--space-12) 0 var(--space-6);
}

h4 {
  font-size: var(--font-size-xl);
  line-height: var(--line-height-snug);
  margin: var(--space-8) 0 var(--space-4);
}

h5 {
  font-size: var(--font-size-lg);
  margin: var(--space-6) 0 var(--space-3);
}

h6 {
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin: var(--space-6) 0 var(--space-2);
}

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

p:last-child {
  margin-bottom: 0;
}

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

strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

code {
  font-family: var(--font-mono);
  font-size: 0.95em;
}

/* Links: clear primary color, subtle hover for content-focused reading */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-base),
              text-decoration-color var(--transition-base),
              background-color var(--transition-base);
}

a:hover {
  color: #1d4ed8;
}

a:active {
  color: #1e40af;
}

/* Lists */
ul,
ol {
  margin: 0 0 var(--space-6) var(--space-16);
}

/* Blockquotes - for user opinions / komentarze */
blockquote {
  margin: var(--space-10) 0;
  padding: var(--space-8) var(--space-10);
  border-left: 3px solid var(--color-primary);
  background-color: var(--color-surface-muted);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
}

hr {
  border: 0;
  border-top: 1px solid var(--color-neutral-200);
  margin: var(--space-16) 0;
}

/* ========================================================================
   4. Accessibility & Motion
   ======================================================================== */

/* Focus outlines - visible and accessible, tuned to brand */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Respect prefers-reduced-motion */
@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;
  }
}

/* Smooth scrolling already set on html; adjust for users if needed */

/* ========================================================================
   5. Layout Utilities
   ======================================================================== */

/* Centered content container (for main layout) */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-8);
  padding-right: var(--space-8);
  max-width: 1120px; /* content-focused width for articles & guides */
}

/* Simple section spacing helpers */
.section {
  padding-top: var(--space-32);
  padding-bottom: var(--space-32);
}

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

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

/* Flex utilities - for intuitive layout of lists, filters, etc. */
.flex {
  display: flex;
}

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

.flex-column {
  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-around {
  justify-content: space-around;
}

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

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

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

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

/* Grid utilities - for destination cards, thematic collections */
.grid {
  display: grid;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

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

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

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

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

/* Max-width utility for text-heavy content (articles, O nas, guides) */
/* Alignment helpers */
.text-center {
  text-align: center;
}

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

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

/* Spacing utilities (commonly needed) */
.mt-0 { margin-top: 0; }
.mt-xs { margin-top: var(--space-4); }
.mt-sm { margin-top: var(--space-8); }
.mt-md { margin-top: var(--space-12); }
.mt-lg { margin-top: var(--space-20); }

.mb-0 { margin-bottom: 0; }
.mb-xs { margin-bottom: var(--space-4); }
.mb-sm { margin-bottom: var(--space-8); }
.mb-md { margin-bottom: var(--space-12); }
.mb-lg { margin-bottom: var(--space-20); }

.py-section {
  padding-top: var(--space-32);
  padding-bottom: var(--space-32);
}

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

/* ========================================================================
   6. Components
   ======================================================================== */

/* Buttons - primary CTAs (e.g., "Sprawdź przewodnik", affiliate actions) */
.button,
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  background-color: var(--color-primary);
  color: #ffffff;
  font-weight: 600;
  font-size: var(--font-size-sm);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color var(--transition-base),
              border-color var(--transition-base),
              box-shadow var(--transition-base),
              transform var(--transition-fast);
  text-decoration: none;
  line-height: 1;
}

.button:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
  background-color: #1d4ed8;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.button:active,
button:active,
input[type="submit"]:active,
input[type="button"]:active,
input[type="reset"]:active {
  background-color: #1e40af;
  box-shadow: var(--shadow-sm);
  transform: translateY(0);
}

.button:disabled,
button:disabled,
input[type="submit"]:disabled,
input[type="button"]:disabled,
input[type="reset"]:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

.button--ghost {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.button--ghost:hover {
  background-color: var(--color-primary-soft);
}

.button--secondary {
  background-color: var(--color-neutral-900);
  border-color: var(--color-neutral-900);
}

.button--secondary:hover {
  background-color: #020617;
}

/* Inputs - for search, newsletter, contact form */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="number"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background-color: #ffffff;
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: 1.4;
  transition: border-color var(--transition-base),
              box-shadow var(--transition-base),
              background-color var(--transition-base);
}

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

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

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

input:disabled,
textarea:disabled,
select:disabled {
  background-color: var(--color-neutral-100);
  cursor: not-allowed;
}

/* Cards - for destination tiles, itineraries, thematic selections */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-12);
  border: 1px solid rgba(15, 23, 42, 0.03);
  transition: box-shadow var(--transition-base),
              transform var(--transition-base),
              border-color var(--transition-base),
              background-color var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.16);
}

.card__header {
  margin-bottom: var(--space-6);
}

.card__title {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-2);
}

.card__meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

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

.card__footer {
  margin-top: var(--space-8);
}

/* Informational labels - e.g. for affiliate disclosure */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 500;
  background-color: var(--color-neutral-100);
  color: var(--color-text-muted);
}

.badge--primary {
  background-color: var(--color-primary-soft);
  color: var(--color-primary);
}

.badge--success {
  background-color: rgba(22, 163, 74, 0.08);
  color: var(--color-success);
}

.badge--warning {
  background-color: rgba(245, 158, 11, 0.08);
  color: var(--color-warning);
}

.badge--danger {
  background-color: rgba(220, 38, 38, 0.08);
  color: var(--color-danger);
}

/* Alert boxes - for disclaimers, practical tips, affiliate info */
.alert {
  padding: var(--space-8) var(--space-10);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-neutral-200);
  background-color: var(--color-surface);
  font-size: var(--font-size-sm);
}

.alert--info {
  border-color: rgba(37, 99, 235, 0.25);
  background-color: var(--color-primary-soft);
}

.alert--success {
  border-color: rgba(22, 163, 74, 0.25);
  background-color: rgba(22, 163, 74, 0.04);
}

.alert--warning {
  border-color: rgba(245, 158, 11, 0.35);
  background-color: rgba(245, 158, 11, 0.06);
}

.alert--danger {
  border-color: rgba(220, 38, 38, 0.35);
  background-color: rgba(220, 38, 38, 0.06);
}

/* Simple tag-like chips for thematic collections (weekend, budget, nature) */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background-color: var(--color-neutral-100);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* Navigation helpers (base only; structure left to page CSS) */
.navbar {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-neutral-200);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}

.navbar__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 700;
  font-size: var(--font-size-lg);
}

.navbar__links {
  display: flex;
  gap: var(--space-8);
  font-size: var(--font-size-sm);
}

.navbar__link {
  position: relative;
  padding: var(--space-2) 0;
  color: var(--color-text-muted);
}

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

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

.navbar__link--active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.25rem;
  width: 100%;
  height: 2px;
  border-radius: 9999px;
  background-color: var(--color-primary);
}

/* Footer base for contact / legal / affiliate disclosure */
.footer {
  background-color: #020617;
  color: #e5e7eb;
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
  margin-top: var(--space-32);
}

.footer a {
  color: #e5e7eb;
}

.footer a:hover {
  color: #ffffff;
}

.footer__meta {
  margin-top: var(--space-12);
  font-size: var(--font-size-xs);
  color: #9ca3af;
}

/* ========================================================================
   7. Utility for subtle surfaces (cards in lists, sections) 
   ======================================================================== */
.surface {
  background-color: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xs);
  padding: var(--space-16);
}

.surface-muted {
  background-color: var(--color-surface-muted);
  border-radius: var(--radius-xl);
  padding: var(--space-16);
}

/* ========================================================================
   8. Misc helpers for badges, meta, etc.
   ======================================================================== */

.meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.meta span + span::before {
  content: "·";
  margin: 0 var(--space-2);
}

/* ========================================================================
   9. Responsive tweaks for typography
   ======================================================================== */

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .section,
  .py-section {
    padding-top: var(--space-24);
    padding-bottom: var(--space-24);
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}
