/**
 * City Attractions Page v2 - szablon wzorcowy
 * URL: /atrakcje/miasto/{city}
 * Zrodlo: wzorzec/static_template/city-attractions-v2.html
 */

/* ==========================================
   CSS VARIABLES (nowe, specyficzne dla szablonu)
   --primary, --border, --radius sa dziedziczone z aplikacji
   ========================================== */
:root {
  --background: #f9fafb;
  --foreground: #1f2937;
  --card: #f3f4f6;
  --card-foreground: #1f2937;
  --primary-foreground: #f0f9ff;
  --secondary: #e5e7eb;
  --secondary-foreground: #374151;
  --muted: #e5e7eb;
  --muted-foreground: #6b7280;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.dark {
  --background: #111827;
  --foreground: #f3f4f6;
  --card: #1f2937;
  --card-foreground: #f3f4f6;
  --primary-foreground: #f0f9ff;
  --secondary: #374151;
  --secondary-foreground: #e5e7eb;
  --muted: #374151;
  --muted-foreground: #9ca3af;
  --border: #374151;
}

/* ==========================================
   CITY HERO
   ========================================== */
.city-hero {
  position: relative;
  padding: 3rem 0;
  min-height: 280px;
  display: flex;
  align-items: center;
}

.city-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.city-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.city-hero-bg .city-hero-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}

.city-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0.7));
}

.city-hero .container {
  position: relative;
  z-index: 1;
}

.city-hero-content {
  text-align: center;
  color: white;
}

.breadcrumb-light {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.breadcrumb-light a {
  color: white;
  opacity: 0.8;
  transition: opacity 0.2s;
  text-decoration: none;
}

.breadcrumb-light a:hover {
  opacity: 1;
}

.breadcrumb-light svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

.breadcrumb-light span {
  color: white;
}

.city-hero-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  background-color: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.city-hero-icon svg {
  width: 32px;
  height: 32px;
  stroke: white;
}

.city-hero h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: white;
}

@media (min-width: 768px) {
  .city-hero h1 {
    font-size: 2.5rem;
  }
}

.city-hero-subtitle {
  font-size: 1rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
  color: white;
}

/* Hero - skalowanie na szerokich ekranach */
@media (min-width: 1200px) {
  .city-hero {
    min-height: 340px;
    padding: 4rem 0;
  }
}

@media (min-width: 1600px) {
  .city-hero {
    min-height: 400px;
    padding: 5rem 0;
  }
}

@media (min-width: 1920px) {
  .city-hero {
    min-height: 440px;
  }
}

/* ==========================================
   CITY INTRO
   ========================================== */
.city-intro {
  padding: 2rem 0;
  background-color: var(--card);
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.city-intro-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.city-intro-content p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

/* ==========================================
   CITY ATTRACTIONS SECTION
   ========================================== */
.city-attractions-section {
  padding: 2rem 0 3rem;
}

.city-attractions-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .city-attractions-layout {
    grid-template-columns: 280px 1fr;
  }
}

/* ==========================================
   FILTERS SIDEBAR
   ========================================== */
.filters-sidebar {
  position: sticky;
  top: 80px;
  height: fit-content;
  background-color: var(--card);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 0.5rem;
  padding: 1.25rem;
  display: none;
}

@media (min-width: 1024px) {
  .filters-sidebar {
    display: block;
  }
}

.filters-sidebar.mobile-active {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  border-radius: 0;
  overflow-y: auto;
  padding-bottom: 100px;
}

.filters-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.5);
  z-index: 999;
}

.filters-mobile-overlay.active {
  display: block;
}

.filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.filters-header h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.filters-header h3 svg {
  width: 18px;
  height: 18px;
  color: var(--primary, #0284c7);
}

.btn-text {
  font-size: 0.75rem;
  color: var(--primary, #0284c7);
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-text:hover {
  text-decoration: underline;
}

/* Grupy filtrow */
.filter-group {
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border, #e5e7eb);
  padding-bottom: 1rem;
}

.filter-group:last-of-type {
  border-bottom: none;
}

.filter-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.5rem 0;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--foreground);
  background: none;
  border: none;
  cursor: pointer;
}

.filter-group-header:hover {
  color: var(--primary, #0284c7);
}

.filter-chevron {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.filter-group-content {
  display: none;
  padding-top: 0.75rem;
}

.filter-group-content.active {
  display: block;
}

/* Checkboxy filtrow */
.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0;
  cursor: pointer;
  font-size: 0.875rem;
}

.filter-checkbox input[type="checkbox"],
.filter-checkbox input[type="radio"] {
  display: none;
}

.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border, #e5e7eb);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.filter-checkbox input:checked + .checkbox-custom {
  background-color: var(--primary, #0284c7);
  border-color: var(--primary, #0284c7);
}

.filter-checkbox input:checked + .checkbox-custom::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.checkbox-label {
  flex: 1;
  color: var(--foreground);
}

.checkbox-count {
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

.rating-label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.star-sm {
  width: 14px;
  height: 14px;
  color: #fbbf24;
}

.filter-hidden {
  display: none;
}

.filter-show-more {
  display: block;
  width: 100%;
  padding: 0.5rem 0;
  margin-top: 0.25rem;
  background: none;
  border: none;
  color: var(--primary, #0284c7);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.filter-show-more:hover {
  text-decoration: underline;
}

.btn-filter-apply {
  width: 100%;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  background-color: var(--primary, #0284c7);
  color: var(--primary-foreground, #f0f9ff);
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-filter-apply:hover {
  opacity: 0.9;
}

.btn-filter-apply svg {
  width: 16px;
  height: 16px;
}

/* ==========================================
   RESULTS HEADER
   ========================================== */
.attractions-main {
  min-width: 0;
}

.results-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.results-count {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.results-count strong {
  color: var(--foreground);
}

.results-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sort-dropdown {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.sort-dropdown label {
  color: var(--muted-foreground);
  display: none;
}

@media (min-width: 640px) {
  .sort-dropdown label {
    display: block;
  }
}

.sort-dropdown select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 0.5rem;
  background-color: var(--card);
  color: var(--foreground);
  font-size: 0.875rem;
  cursor: pointer;
}

.view-toggle {
  display: none;
  gap: 0.25rem;
}

@media (min-width: 640px) {
  .view-toggle {
    display: flex;
  }
}

.view-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 0.5rem;
  background-color: var(--card);
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s;
}

.view-btn:hover {
  border-color: var(--primary, #0284c7);
  color: var(--primary, #0284c7);
}

.view-btn.active {
  background-color: var(--primary, #0284c7);
  border-color: var(--primary, #0284c7);
  color: white;
}

.view-btn svg {
  width: 18px;
  height: 18px;
}

.btn-filter-mobile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--card);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  cursor: pointer;
}

@media (min-width: 1024px) {
  .btn-filter-mobile {
    display: none;
  }
}

.btn-filter-mobile svg {
  width: 16px;
  height: 16px;
}

/* ==========================================
   QUICK FILTERS
   ========================================== */
.quick-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
}

.quick-filter {
  padding: 0.5rem 1rem;
  background-color: var(--card);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--foreground);
  transition: all 0.2s;
  text-decoration: none;
  cursor: pointer;
}

.quick-filter:hover {
  border-color: var(--primary, #0284c7);
  color: var(--primary, #0284c7);
}

.quick-filter.active {
  background-color: var(--primary, #0284c7);
  border-color: var(--primary, #0284c7);
  color: white;
}

/* ==========================================
   ATTRACTIONS GRID
   ========================================== */
.attractions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

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

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

/* ==========================================
   ATTRACTION CARD LARGE
   ========================================== */
.attraction-card-large {
  display: flex;
  flex-direction: column;
  background-color: var(--card);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 0.5rem;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}

.attraction-card-large:hover {
  border-color: var(--primary, #0284c7);
  box-shadow: var(--shadow-lg);
}

.attraction-card-large-image {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.attraction-card-large-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.attraction-card-large:hover .attraction-card-large-image img {
  transform: scale(1.05);
}

.attraction-card-large-content {
  padding: 1.25rem;
}

.attraction-card-large-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  color: var(--foreground);
}

.attraction-card-large-desc {
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.attraction-card-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.625rem;
  background-color: var(--primary, #0284c7);
  color: white;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.attraction-card-badge.badge-green {
  background-color: #16a34a;
}

.attraction-card-fav {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255,255,255,0.9);
  border-radius: 50%;
  color: var(--foreground);
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.attraction-card-fav:hover {
  background-color: white;
  color: #ef4444;
}

.attraction-card-fav svg {
  width: 16px;
  height: 16px;
}

/* Placeholder dla kart bez zdjecia */
.attraction-card-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e0f2fe 0%, #e5e7eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.attraction-card-placeholder svg {
  width: 48px;
  height: 48px;
  stroke: #9ca3af;
}

/* Badge typu atrakcji (z backendu) */
.attraction-card-type {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  padding: 0.25rem 0.5rem;
  background: rgba(0,0,0,0.7);
  color: white;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.attraction-card-type .type-icon {
  font-size: 0.875rem;
}

/* Rating na karcie */
.attraction-card-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

.attraction-card-rating svg {
  width: 16px;
  height: 16px;
  fill: #f59e0b;
}

/* List View */
.attractions-grid.list-view {
  grid-template-columns: 1fr;
}

.attractions-grid.list-view .attraction-card-large {
  flex-direction: row;
}

.attractions-grid.list-view .attraction-card-large-image {
  width: 260px;
  flex-shrink: 0;
  aspect-ratio: 4 / 3;
}

.attractions-grid.list-view .attraction-card-large-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 640px) {
  .attractions-grid.list-view .attraction-card-large {
    flex-direction: column;
  }

  .attractions-grid.list-view .attraction-card-large-image {
    width: 100%;
    aspect-ratio: 16 / 10;
  }
}

/* ==========================================
   PAGINATION
   ========================================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 2rem;
}

.pagination-btn,
.pagination-page {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 0.5rem;
  background-color: var(--card);
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  text-decoration: none;
}

.pagination-btn:hover:not(:disabled):not(.disabled),
.pagination-page:hover {
  border-color: var(--primary, #0284c7);
  color: var(--primary, #0284c7);
}

.pagination-btn:disabled,
.pagination-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-page.active {
  background-color: var(--primary, #0284c7);
  border-color: var(--primary, #0284c7);
  color: white;
}

.pagination-btn svg {
  width: 18px;
  height: 18px;
}

.pagination-dots {
  padding: 0 0.5rem;
  color: var(--muted-foreground);
}

/* ==========================================
   NEARBY CITIES
   ========================================== */
.nearby-cities {
  padding: 3rem 0;
  background-color: var(--card);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.cities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

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

@media (min-width: 1024px) {
  .cities-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.city-card-small {
  display: flex;
  flex-direction: column;
  background-color: var(--background);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 0.5rem;
  overflow: hidden;
  transition: border-color 0.2s;
  text-decoration: none;
  color: inherit;
}

.city-card-small:hover {
  border-color: var(--primary, #0284c7);
}

.city-card-small .city-card-image {
  aspect-ratio: 4/3;
  overflow: hidden;
}

.city-card-small .city-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.city-card-small:hover .city-card-image img {
  transform: scale(1.05);
}

.city-card-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e0f2fe 0%, #e5e7eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.city-card-placeholder svg {
  width: 32px;
  height: 32px;
  stroke: #9ca3af;
}

.city-card-info {
  padding: 0.75rem;
  text-align: center;
}

.city-card-info h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.city-card-info span {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* ==========================================
   SEO CONTENT
   ========================================== */
.seo-content {
  padding: 3rem 0;
}

.seo-content-box {
  max-width: 900px;
  margin: 0 auto;
}

.seo-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.seo-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--foreground);
}

.seo-content p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.seo-content ul,
.seo-content ol {
  margin: 1em 0;
  padding-left: 2em;
}

.seo-content ul {
  list-style-type: disc;
}

.seo-content ol {
  list-style-type: decimal;
}

.seo-content li {
  margin: 0.5em 0;
  display: list-item;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

/* ==========================================
   EMPTY STATE
   ========================================== */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  background-color: var(--card);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 0.5rem;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state h2 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}

.empty-state p {
  color: var(--muted-foreground);
  margin: 0 0 1.5rem;
}

/* ==========================================
   UTILITIES
   ========================================== */
.hidden {
  display: none !important;
}
