/* ============================================================
   Michal Cestuje — Stylesheet
   Palette: cream, blush, sage, terracotta, sand
   ============================================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --cream: #FFF8F2;
  --blush: #F2DDD5;
  --blush-light: #FBF0EB;
  --sage: #9DB8A0;
  --sage-light: #C8DBC9;
  --sage-dark: #6B8E6E;
  --terracotta: #C4856A;
  --terracotta-light: #E8B9A5;
  --sand: #E8D5C0;
  --navy: #2D3A3A;
  --navy-light: #4A5858;
  --white: #FFFFFF;
  --text: #3A3A3A;
  --text-light: #7A7A7A;
  --danger: #D4645C;
  --danger-light: #FCEAE8;
  --radius: 20px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --shadow: 0 4px 24px rgba(45,58,58,0.08);
  --shadow-lg: 0 8px 40px rgba(45,58,58,0.12);
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: 'Playfair Display', serif; font-weight: 600; }
a { color: var(--terracotta); text-decoration: none; }
a:hover { color: var(--sage-dark); }

/* === HEADER === */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,248,242,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(200,219,201,0.3);
  padding: 0 40px;
}
.header-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--navy);
}
.logo-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--sage), var(--sage-dark));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 18px;
}
.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 700; letter-spacing: -0.5px;
}
.logo-text span { color: var(--terracotta); }

.nav { display: flex; gap: 28px; align-items: center; }
.nav a {
  text-decoration: none; color: var(--navy-light);
  font-size: 14px; font-weight: 500; letter-spacing: 0.5px;
  text-transform: uppercase; position: relative; transition: color 0.3s;
}
.nav a:hover { color: var(--terracotta); }
.nav a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px; background: var(--terracotta);
  border-radius: 2px; transition: width 0.3s;
}
.nav a:hover::after { width: 100%; }

.stats-bar { display: flex; gap: 8px; align-items: center; }
.stat-pill {
  display: flex; align-items: center; gap: 6px;
  background: var(--blush-light); border-radius: 24px;
  padding: 6px 14px; font-size: 13px; font-weight: 500;
  color: var(--navy); transition: all 0.3s;
}
.stat-pill:hover { background: var(--blush); transform: translateY(-1px); }
.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 16px; font-weight: 700; color: var(--terracotta);
}

/* === HERO === */
.hero {
  max-width: 1400px; margin: 0 auto; padding: 48px 40px 0; text-align: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--sage-light), var(--blush-light));
  border-radius: 24px; padding: 8px 20px;
  font-size: 13px; font-weight: 500; color: var(--sage-dark);
  margin-bottom: 20px; letter-spacing: 0.5px;
}
.hero h1 {
  font-size: 48px; line-height: 1.15; color: var(--navy);
  max-width: 700px; margin: 0 auto 16px;
}
.hero h1 em {
  font-style: italic; color: var(--terracotta); position: relative;
}
.hero h1 em::after {
  content: ''; position: absolute; bottom: 2px; left: 0; right: 0;
  height: 8px; background: var(--terracotta-light); opacity: 0.4;
  border-radius: 4px; z-index: -1;
}
.hero p {
  font-size: 17px; color: var(--text-light);
  max-width: 550px; margin: 0 auto 32px; line-height: 1.7;
}

/* === FILTER TABS === */
.filter-tabs {
  display: flex; justify-content: center; gap: 8px; margin-bottom: 32px;
}
.filter-tab {
  padding: 10px 24px; border-radius: 28px;
  border: 2px solid var(--sand); background: transparent;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 500; color: var(--navy-light);
  cursor: pointer; transition: all 0.3s;
  display: flex; align-items: center; gap: 8px;
}
.filter-tab:hover { border-color: var(--sage); background: var(--sage-light); color: var(--sage-dark); }
.filter-tab.active { background: var(--sage); border-color: var(--sage); color: white; }
.filter-tab .icon { font-size: 16px; }

/* === MAP === */
.map-section {
  max-width: 1400px; margin: 0 auto; padding: 0 40px 48px;
}
.map-container {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 24px; position: relative; overflow: hidden;
}
.map-legend {
  display: flex; gap: 20px; margin-bottom: 16px; font-size: 13px; color: var(--text-light);
}
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; }
.legend-dot.visited { background: var(--sage); }
.legend-dot.content { background: #E8A87C; }
.legend-dot.planned { background: var(--terracotta-light); border: 2px dashed var(--terracotta); box-sizing: border-box; }
.legend-dot.unvisited { background: #E8E2DC; }

/* Leaflet custom tooltip */
.map-tooltip {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 13px !important;
  border-radius: 12px !important;
  padding: 10px 14px !important;
  border: none !important;
  box-shadow: var(--shadow) !important;
  max-width: 260px;
}
.map-tooltip strong { font-family: 'Playfair Display', serif; font-size: 15px; }
.map-tooltip em { color: var(--text-light); font-size: 12px; }

/* Place markers on map */
.place-marker-container { background: none !important; border: none !important; }
.map-place-marker {
  width: 28px; height: 28px;
  background: var(--white);
  border: 2px solid var(--terracotta);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform 0.2s;
}
.map-place-marker:hover { transform: scale(1.2); }

/* === CONTENT SECTIONS === */
.content-section {
  max-width: 1400px; margin: 0 auto; padding: 0 40px 64px;
}
.section-header {
  display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 28px;
}
.section-header h2 { font-size: 32px; color: var(--navy); }

/* === COUNTRY CARDS === */
.country-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px;
}
.country-card {
  background: var(--white); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  cursor: pointer; transition: all 0.4s; text-decoration: none; color: inherit; display: block;
}
.country-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); color: inherit; }
.card-image {
  width: 100%; aspect-ratio: 4/3; object-fit: contain; display: block;
  background: #111;
}
.card-image-placeholder {
  width: 100%; aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.card-image-placeholder::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 60px; background: linear-gradient(transparent, var(--white));
}
.card-body { padding: 20px 24px 24px; }
.card-body h3 { font-size: 22px; color: var(--navy); margin-bottom: 8px; }
.card-body p { font-size: 14px; color: var(--text-light); line-height: 1.6; margin-bottom: 14px; }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.card-tag {
  font-size: 11px; font-weight: 500;
  padding: 4px 10px; border-radius: 12px;
  background: var(--blush-light); color: var(--terracotta);
}
.card-tag.green { background: var(--sage-light); color: var(--sage-dark); }

/* === ROUTE CARDS === */
.routes-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 24px;
}
.route-card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px;
  cursor: pointer; transition: all 0.4s;
  border-left: 4px solid var(--terracotta);
  text-decoration: none; color: inherit; display: block;
}
.route-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: inherit; }
.route-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.route-badge {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1px; padding: 4px 12px; border-radius: 12px;
}
.route-badge.completed { background: var(--sage-light); color: var(--sage-dark); }
.route-badge.planned { background: var(--terracotta-light); color: #8B5A42; }
.route-card h3 { font-size: 22px; color: var(--navy); margin-bottom: 8px; }
.route-card p { font-size: 14px; color: var(--text-light); line-height: 1.6; margin-bottom: 14px; }
.route-stops { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.route-stop {
  background: var(--blush-light); padding: 4px 10px; border-radius: 10px;
  color: var(--navy-light); font-weight: 500;
}
.route-arrow { color: var(--sand); font-weight: 300; }
.route-meta { display: flex; gap: 16px; margin-top: 14px; font-size: 12px; color: var(--text-light); }
.route-meta span { display: flex; align-items: center; gap: 4px; }

/* === PLACE CARDS === */
.places-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px;
}
.place-card {
  background: var(--white); border-radius: var(--radius-sm);
  overflow: hidden; box-shadow: var(--shadow);
  transition: all 0.3s; text-decoration: none; color: inherit; display: block;
}
.place-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: inherit; }
.place-card-img {
  width: 100%; aspect-ratio: 4/3; object-fit: contain; display: block;
  background: #111;
}
.place-card-img.placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--blush-light), var(--sage-light));
  font-size: 36px;
}
.place-card-body { padding: 14px 18px 18px; }
.place-cat {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--sage-dark);
}
.place-card-body h3 { font-size: 17px; color: var(--navy); margin: 4px 0 6px; }
.place-card-body p { font-size: 13px; color: var(--text-light); line-height: 1.5; }

/* === DETAIL PAGES === */
.detail-hero {
  position: relative; height: 360px; overflow: hidden;
  background: linear-gradient(135deg, var(--sage-light), var(--blush));
  display: flex; align-items: flex-end;
}
.detail-hero img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.detail-hero-overlay {
  position: relative; z-index: 1; width: 100%;
  padding: 40px; background: linear-gradient(transparent, rgba(45,58,58,0.7));
  color: white;
}
.detail-hero h1 { font-size: 42px; color: white; text-shadow: 0 2px 12px rgba(0,0,0,0.3); }
.detail-content {
  max-width: 900px; margin: 0 auto; padding: 40px;
}
.detail-content p { font-size: 16px; line-height: 1.8; margin-bottom: 20px; }

.photo-gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px; margin: 32px 0;
}
.photo-gallery img {
  width: 100%; height: 180px; object-fit: cover;
  border-radius: var(--radius-xs); cursor: pointer;
  transition: transform 0.3s;
}
.photo-gallery img:hover { transform: scale(1.03); }
.photo-caption { font-size: 12px; color: var(--text-light); margin-top: 4px; text-align: center; }

.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; margin-bottom: 24px;
}

/* === EMPTY STATE === */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-light); font-size: 16px;
  grid-column: 1 / -1;
}
.empty-state a { color: var(--terracotta); font-weight: 500; }

/* === MODAL === */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(45,58,58,0.5);
  backdrop-filter: blur(8px);
  z-index: 300; display: flex; align-items: center; justify-content: center;
  padding: 40px; opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.modal-overlay.visible { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--white); border-radius: var(--radius);
  max-width: 640px; width: 100%; max-height: 80vh; overflow-y: auto;
  box-shadow: 0 24px 80px rgba(45,58,58,0.2);
  transform: translateY(20px) scale(0.97); transition: transform 0.3s;
  padding: 32px;
}
.modal-overlay.visible .modal { transform: translateY(0) scale(1); }

/* === FOOTER === */
.footer {
  background: var(--navy); color: rgba(255,255,255,0.7);
  padding: 48px 40px; text-align: center;
}
.footer-inner { max-width: 1400px; margin: 0 auto; }
.footer h3 { color: white; font-size: 24px; margin-bottom: 8px; font-family: 'Playfair Display', serif; }
.footer p { font-size: 14px; max-width: 500px; margin: 0 auto 24px; line-height: 1.7; }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 24px; }
.footer-links a { color: rgba(255,255,255,0.5); text-decoration: none; font-size: 13px; transition: color 0.3s; }
.footer-links a:hover { color: var(--sage-light); }
.footer-copy { font-size: 12px; color: rgba(255,255,255,0.3); }

/* === INFO SECTIONS (country page) === */
.info-section { display: flex; gap: 28px; align-items: flex-start; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .header { padding: 0 16px; }
  .header-inner { height: 60px; }
  .nav { display: none; }
  .hero { padding: 32px 20px 0; }
  .hero h1 { font-size: 32px; }
  .map-section, .content-section { padding-left: 16px; padding-right: 16px; }
  .map-container { padding: 12px; }
  .country-cards { grid-template-columns: 1fr; }
  .routes-cards { grid-template-columns: 1fr; }
  .places-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .stats-bar { gap: 4px; }
  .stat-pill { padding: 4px 8px; font-size: 11px; }
  .stat-num { font-size: 13px; }
  .filter-tabs { flex-wrap: wrap; gap: 6px; padding: 0 16px; }
  .filter-tab { padding: 8px 16px; font-size: 13px; }
  .detail-hero { height: 260px; }
  .detail-content { padding: 24px 16px; }
  .info-section { flex-direction: column; align-items: center; text-align: center; }
  .info-section .info-text { text-align: left; }
}
