/* ============================================================
   Валенсия · 27–29 августа — общие стили сайта
   Mobile-first, тёплая «семейная» палитра, кириллические шрифты
   ============================================================ */

:root {
  --cream: #faf6ee;
  --paper: #ffffff;
  --ink: #2c2a24;
  --muted: #6f675a;
  --line: #e8e0d2;
  --accent: #c45a24;      /* валенсийский терракотовый */
  --accent-soft: #f6e3d3;
  --green: #3d7a5e;       /* парк Турия, пляж */
  --green-soft: #e2efe7;
  --gold: #a97f2f;        /* отель, дворец */
  --gold-soft: #f3ead2;
  --blue: #3a6ea5;
  --blue-soft: #e3ecf6;
  --shadow: 0 2px 10px rgba(44, 42, 36, 0.08);
  --shadow-lg: 0 8px 28px rgba(44, 42, 36, 0.12);
  --radius: 14px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-serif: Georgia, "Times New Roman", "PT Serif", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #a04a1c; }

h1, h2, h3, h4 { font-family: var(--font-serif); line-height: 1.25; margin: 0 0 0.5em; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 238, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--accent); }
.brand-flag { font-size: 1.3rem; }
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.95rem;
}
.site-nav a:hover { background: var(--accent-soft); color: var(--accent); }

/* ---------- Герой (главная) ---------- */
.hero {
  padding: 56px 0 40px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2rem, 6vw, 3.4rem);
  margin-bottom: 0.3em;
}
.hero .hero-sub {
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 24px;
}
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.95rem;
  box-shadow: var(--shadow);
}

/* ---------- Секции ---------- */
.section { padding: 44px 0; scroll-margin-top: 70px; }
.section-alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0.25em;
}
.section-title .emoji { font-size: 1.4em; }
.section-lead { color: var(--muted); max-width: 720px; margin-bottom: 28px; }

/* ---------- Карточки ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); color: var(--ink); }
.card-img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.2rem; }
.card-body .card-tag { font-size: 0.82rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.card-body p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.card-more { margin-top: auto; padding-top: 8px; font-weight: 700; color: var(--accent); font-size: 0.95rem; }

/* ---------- Карта ---------- */
.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  position: relative;
}
#map { height: 540px; width: 100%; }
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  font-size: 0.9rem;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
}
.legend-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.dot-hotel { background: var(--gold); }
.dot-museum { background: var(--blue); }
.dot-food { background: var(--accent); }
.dot-sight { background: var(--green); }
.dot-parking { background: #7a5aa6; }

.leaflet-popup-content { font-family: var(--font-body); }
.leaflet-popup-content .popup-title { font-weight: 700; margin-bottom: 2px; }
.leaflet-popup-content .popup-meta { color: var(--muted); font-size: 0.88rem; margin-bottom: 6px; }
.popup-link { font-size: 0.9rem; font-weight: 700; }

/* Маркеры карты (цветные булавки с эмодзи) */
.marker-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.marker-emoji { transform: rotate(45deg); font-size: 15px; line-height: 1; }
.marker-hotel { background: var(--gold); }
.marker-museum { background: var(--blue); }
.marker-food { background: var(--accent); }
.marker-sight { background: var(--green); }
.marker-parking { background: #7a5aa6; }

/* ---------- Программа (таймлайн) ---------- */
.timeline { display: flex; flex-direction: column; gap: 26px; }
.day {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.day-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--line);
}
.day-head .day-date { font-family: var(--font-serif); font-size: 1.15rem; font-weight: 700; color: var(--accent); }
.day-head .day-name { color: var(--muted); font-size: 0.95rem; }
.day-body { padding: 6px 20px 16px; }
.event { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.event:last-child { border-bottom: none; }
.event-time {
  min-width: 86px;
  font-weight: 700;
  color: var(--green);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}
.event-text { flex: 1; }
.event-text b { font-weight: 700; }
.event-text .event-note { color: var(--muted); font-size: 0.92rem; }
.event-text a { font-weight: 600; }

/* ---------- Парковка ---------- */
.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table.garages { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 620px; }
table.garages th, table.garages td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.garages th { background: var(--gold-soft); font-family: var(--font-serif); font-size: 1rem; }
table.garages tr:last-child td { border-bottom: none; }
.price { font-weight: 700; color: var(--green); white-space: nowrap; }
.star { color: var(--gold); }
.warn { color: var(--accent); font-weight: 600; }

/* ---------- Инфо-блоки ---------- */
.info-box {
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 18px 0;
  border-left: 5px solid;
  font-size: 0.97rem;
}
.info-box p { margin: 0 0 8px; }
.info-box p:last-child { margin-bottom: 0; }
.info-note { background: var(--blue-soft); border-color: var(--blue); }
.info-tip { background: var(--green-soft); border-color: var(--green); }
.info-warn { background: var(--accent-soft); border-color: var(--accent); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.15s ease;
}
.btn:hover { background: #a04a1c; color: #fff; }
.btn-ghost { background: transparent; color: var(--accent); border: 2px solid var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent); }

/* ---------- Страницы мест (sub-pages) ---------- */
.page-hero {
  padding: 40px 0 8px;
  text-align: center;
}
.page-hero h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); margin-bottom: 0.2em; }
.page-hero .kicker { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; margin-bottom: 6px; }
.breadcrumbs { font-size: 0.88rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }

.figure {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin: 18px 0;
}
.figure img { width: 100%; }
.figure figcaption { padding: 10px 16px; font-size: 0.85rem; color: var(--muted); border-top: 1px solid var(--line); }
.figures-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }

/* Мета-список (адрес, часы, телефон…) */
.meta-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.meta-list li { display: flex; gap: 12px; align-items: flex-start; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow); }
.meta-list .meta-emoji { font-size: 1.2rem; line-height: 1.4; }
.meta-list .meta-label { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; }
.meta-list .meta-value { font-size: 0.98rem; }

/* Двухколоночный контент страниц мест */
.split { display: grid; grid-template-columns: 1fr; gap: 26px; margin: 26px 0; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }
.split .aside { display: flex; flex-direction: column; gap: 16px; }

.back-map { text-align: center; margin: 26px 0 8px; }

/* ---------- Футер ---------- */
.site-footer {
  background: #2e2b25;
  color: #d9d2c4;
  padding: 40px 0 30px;
  margin-top: 40px;
  font-size: 0.92rem;
}
.site-footer a { color: #f0c9a8; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 22px; margin-bottom: 22px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.2fr 1fr; } }
.footer-title { font-family: var(--font-serif); font-size: 1.15rem; color: #fff; margin-bottom: 6px; }
.footer-nav-title { font-weight: 700; color: #fff; margin: 0 0 8px; }
.footer-nav { display: flex; flex-direction: column; gap: 6px; }
.credits { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 14px; }
.credits summary { cursor: pointer; font-weight: 700; color: #f0c9a8; }
.credits-list { margin: 12px 0 8px; padding-left: 20px; display: grid; gap: 6px; }
.credits-note { margin: 8px 0 0; font-size: 0.85rem; color: #b7ae9e; }

/* ---------- Прочее ---------- */
.text-center { text-align: center; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.muted { color: var(--muted); }
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

@media (max-width: 640px) {
  #map { height: 420px; }
  .event { flex-direction: column; gap: 4px; }
  .event-time { min-width: 0; }
  .hero { padding: 36px 0 26px; }
}
