/* ============================================
   Košice Guide — City Travel Portal
   Mobile-first responsive CSS
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  /* Colors */
  --primary: #8B2635;
  --primary-hover: #6B1D29;
  --secondary: #2D5A3D;
  --accent: #C8963E;
  --bg-base: #FDFBF7;
  --bg-surface: #FFFFFF;
  --bg-dark: #2C2C2C;
  --text-primary: #1A1A1A;
  --text-secondary: #6B6560;
  --text-muted: #9E978F;
  --text-inverse: #F0EBE3;
  --border-subtle: #E8E3DC;
  --border-focus: #8B2635;
  --error: #B33A3A;
  --success: #3A7D44;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Layout */
  --max-width: 1280px;
  --content-width: 1080px;
  --gutter: 24px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.06);

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

/* ---------- Focus States ---------- */
:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 3px;
}

/* ---------- Accessibility ---------- */
.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;
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (max-width: 767px) {
  .container {
    padding: 0 16px;
  }
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-base);
  border-bottom: 1px solid var(--border-subtle);
  height: 72px;
  display: flex;
  align-items: center;
  transition: height 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled {
  height: 56px;
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-links {
  display: none;
  gap: var(--space-xl);
  align-items: center;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

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

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

.btn-nav-cta {
  display: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
}

@media (min-width: 768px) {
  .btn-nav-cta {
    display: inline-flex;
  }
}

.btn-nav-cta:hover {
  background: var(--primary);
  color: white;
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }
}

.nav-toggle-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 24px;
}

.nav-toggle-icon span {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--bg-base);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--text-primary);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.mobile-menu-cta {
  color: var(--primary) !important;
  margin-top: var(--space-md);
}

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  min-height: 60vh;
  background-image: url('https://images.unsplash.com/photo-1477959858617-67f85cf4f1df?w=1920&q=80');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}

@media (min-width: 1024px) {
  .hero {
    min-height: 80vh;
    background-attachment: fixed;
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.5);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: var(--space-2xl) var(--gutter);
  max-width: 720px;
}

@media (max-width: 767px) {
  .hero-content {
    padding: 120px 16px var(--space-2xl);
  }
}

.hero-headline {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: var(--space-md);
}

@media (min-width: 768px) {
  .hero-headline {
    font-size: 48px;
  }
}

.hero-subhead {
  font-size: 18px;
  color: var(--text-inverse);
  line-height: 1.6;
  margin-bottom: var(--space-xl);
}

.hero-cta-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: flex-start;
}

@media (min-width: 480px) {
  .hero-cta-group {
    flex-direction: row;
    align-items: center;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  min-height: 44px;
  border: none;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(139,38,53,0.25);
}

.btn-primary:active {
  background: #5A1823;
  box-shadow: none;
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-ghost {
  background: transparent;
  color: white;
  border: none;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.btn-ghost:hover {
  color: var(--accent);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: rgba(139,38,53,0.06);
}

.btn-large {
  padding: 16px 40px;
  font-size: 16px;
  min-height: 48px;
}

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

@media (min-width: 768px) {
  .section {
    padding: var(--space-3xl) 0;
  }
}

@media (min-width: 1024px) {
  .section {
    padding: 80px 0;
  }
}

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

.section-dark {
  background: var(--bg-dark);
  padding: var(--space-3xl) 0;
}

@media (min-width: 768px) {
  .section-dark {
    padding: var(--space-4xl) 0;
  }
}

/* ---------- Section Headers ---------- */
.section-header {
  margin-bottom: var(--space-xl);
}

@media (min-width: 768px) {
  .section-header {
    margin-bottom: var(--space-2xl);
  }
}

.section-heading {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-sm);
}

@media (min-width: 768px) {
  .section-heading {
    font-size: 32px;
  }
}

@media (min-width: 1024px) {
  .section-heading {
    font-size: 32px;
  }
}

.section-rule {
  width: 48px;
  height: 3px;
  background: var(--primary);
}

/* ---------- Cards Grid ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }
}

@media (min-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
  }
}

/* ---------- Card Component ---------- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-image-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.card:hover .card-image {
  transform: scale(1.01);
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

.card-badge-trending {
  background: var(--primary);
  color: white;
  animation: pulse 2s infinite;
}

.card-badge-forest {
  background: var(--secondary);
  color: white;
}

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

.card-body {
  padding: var(--space-lg);
}

.card-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: var(--space-xs);
}

@media (min-width: 768px) {
  .card-title {
    font-size: 20px;
  }
}

.card-meta {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.card-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- About Section ---------- */
.about-content {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.section-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-md);
}

.about-heading {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--text-inverse);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-lg);
}

@media (min-width: 768px) {
  .about-heading {
    font-size: 36px;
  }
}

.about-body {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ---------- Newsletter Section ---------- */
.section-newsletter {
  background: var(--bg-dark);
  padding: var(--space-2xl) 0;
}

@media (min-width: 768px) {
  .section-newsletter {
    padding: var(--space-3xl) 0;
  }
}

.newsletter-content {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.newsletter-heading {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--text-inverse);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-md);
}

@media (min-width: 768px) {
  .newsletter-heading {
    font-size: 32px;
  }
}

.newsletter-body {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

@media (min-width: 480px) {
  .newsletter-form {
    flex-direction: row;
  }
}

.newsletter-input {
  flex: 1;
  height: 48px;
  padding: 0 16px;
  font-size: 16px;
  font-family: var(--font-body);
  background: white;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 48px;
}

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

.newsletter-input:focus {
  outline: none;
  border: 2px solid var(--primary);
  box-shadow: 0 0 0 3px rgba(139,38,53,0.12);
}

.newsletter-btn {
  min-height: 48px;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-dark);
  padding: var(--space-3xl) 0 var(--space-xl);
  border-top: 1px solid #3A3A3A;
}

@media (max-width: 767px) {
  .footer {
    padding: var(--space-2xl) 0;
  }
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2xl);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-heading {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text-inverse);
  margin-bottom: var(--space-md);
}

.footer-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-links a {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
  min-height: 32px;
  display: flex;
  align-items: center;
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid #3A3A3A;
}

.footer-copyright {
  font-size: 14px;
  color: var(--text-muted);
}

/* ---------- Skip Link ---------- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: var(--space-sm) var(--space-md);
  z-index: 200;
  transition: top 0.2s ease;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}