/* raha.ch — modern minimal blog styles */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url("../fonts/fraunces-500-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/inter-400-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --white: #ffffff;
  --beige-50: #fbf9f4;
  --beige-100: #f5f0e4;
  --beige-200: #ece3ce;
  --beige-300: #ddd0af;
  --green-700: #1f4d38;
  --green-600: #2d6a4b;
  --green-500: #3f8361;
  --green-100: #e5f0e7;
  --green-050: #f0f6f1;
  --ink-900: #292722;
  --ink-700: #4d493f;
  --ink-500: #7a755f;
  --border: #e6ddc7;
  --shadow: 0 1px 2px rgba(41, 39, 34, 0.04), 0 8px 24px rgba(41, 39, 34, 0.06);
  --shadow-hover: 0 4px 10px rgba(41, 39, 34, 0.06), 0 16px 32px rgba(41, 39, 34, 0.1);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --container: 1180px;
  --font-head: "Fraunces", "Iowan Old Style", "Palatino Linotype", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink-900);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--ink-900);
  line-height: 1.2;
  margin: 0 0 0.5em;
}
/* No Cyrillic/CJK glyphs in the serif heading face -- fall back to the body sans-serif */
:lang(ru) h1, :lang(ru) h2, :lang(ru) h3,
:lang(zh) h1, :lang(zh) h2, :lang(zh) h3,
:lang(ko) h1, :lang(ko) h2, :lang(ko) h3,
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3 {
  font-family: var(--font-body);
}

h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 500; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }
h3 { font-size: 1.15rem; }

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

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 72px;
  position: relative;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.brand {
  display: flex;
  align-items: center;
  white-space: nowrap;
}
.brand img {
  height: 52px;
  width: auto;
  display: block;
}
.slogan {
  font-size: 0.9rem;
  color: var(--ink-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.main-nav {
  display: none;
  position: absolute;
  top: 72px;
  right: 0;
  min-width: 240px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover);
  padding: 10px;
  z-index: 50;
}
.main-nav.open { display: block; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.main-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-700);
  transition: background 0.15s ease, color 0.15s ease;
}
.main-nav a:hover { background: var(--beige-100); color: var(--ink-900); }

.nav-toggle {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink-900);
  margin: 5px 0;
  border-radius: 2px;
}

.lang-dropdown { position: relative; }
.lang-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--beige-100);
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-700);
  cursor: pointer;
  white-space: nowrap;
}
.lang-dropdown-toggle:hover { background: var(--beige-200); }
.lang-dropdown-menu {
  display: none;
  list-style: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover);
  margin: 0;
  padding: 6px;
  z-index: 50;
}
.lang-dropdown-menu.open { display: block; }
.lang-dropdown-menu a {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--ink-700);
}
.lang-dropdown-menu a:hover { background: var(--beige-100); color: var(--ink-900); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--beige-50);
  border-top: 1px solid var(--border);
  margin-top: 96px;
  padding: 48px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
}
.footer-col .brand { display: block; margin-bottom: 8px; }
.footer-col p { color: var(--ink-700); font-size: 0.9rem; }
.footer-col h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-700);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { color: var(--ink-700); font-size: 0.9rem; }
.footer-col a:hover { color: var(--green-600); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.footer-bottom > span { color: var(--ink-500); font-size: 0.8rem; }
.footer-bottom .lang-switch {
  display: flex;
  gap: 2px;
  background: var(--beige-100);
  border-radius: 999px;
  padding: 3px;
}
.footer-bottom .lang-switch a {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ink-500);
}
.footer-bottom .lang-switch a.active { background: var(--green-600); color: var(--white); }
.footer-bottom .lang-switch a:not(.active):hover { color: var(--ink-900); }

/* ---------- Hero ---------- */

.hero { padding: 56px 0 32px; }
.hero .subtitle {
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink-900);
  max-width: 680px;
  margin: 14px 0 24px;
  line-height: 1.4;
}
.hero h3.lead-text {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--ink-700);
  max-width: 680px;
  line-height: 1.6;
  margin: 0 0 24px;
}
article h1 {
  font-family: var(--font-body);
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
}
.hero h2.subtitle {
  font-size: 1.65rem;
}
article h3 {
  font-size: 1.5rem;
}
.hero .meta {
  color: var(--ink-500);
  font-size: 0.85rem;
  margin-top: 14px;
}

/* ---------- Blocks & breadcrumbs ---------- */

main { padding-bottom: 24px; }

.breadcrumbs {
  padding: 22px 0 0;
  font-size: 0.82rem;
  color: var(--ink-500);
}
.breadcrumbs a:hover { color: var(--green-600); }

.block { padding: 28px 0; }

/* ---------- Card grid (listing pages) ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.card {
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.card img { aspect-ratio: 5/4; object-fit: cover; width: 100%; }
.card-body { padding: 20px 22px 24px; }
.card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card:hover h3 { color: var(--green-600); }
.card-body p { color: var(--ink-700); font-size: 0.94rem; }

.badge-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
}
.badge-list li,
.badge-list a {
  background: var(--beige-100);
  color: var(--ink-700);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.85rem;
  font-weight: 500;
}
.badge-list a:hover { background: var(--green-100); color: var(--green-700); }

/* ---------- Article layout with sidebar ---------- */

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  align-items: start;
}
.article-layout > article,
.article-layout > .sidebar { min-width: 0; }

article img { border-radius: var(--radius-lg); }
article > img,
article > .hero + img { margin-bottom: 8px; }

.meta { color: var(--ink-500); font-size: 0.85rem; }
.article-description { color: var(--ink-700); }

.sidebar {
  position: sticky;
  top: 96px;
  background: var(--beige-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
}
.sidebar-list { display: flex; flex-direction: column; }
.sidebar-card {
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.sidebar-card:first-child { border-top: none; padding-top: 0; }
.sidebar-card:last-child { padding-bottom: 0; }

.accordion-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--ink-900);
}
.accordion-title { font-size: 1.1rem; font-weight: 600; line-height: 1.4; }
.accordion-toggle:hover .accordion-title { color: var(--green-600); }
.accordion-icon { position: relative; width: 18px; height: 18px; flex-shrink: 0; }
.accordion-icon::before,
.accordion-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--green-600);
  transform: translate(-50%, -50%);
}
.accordion-icon::before { width: 14px; height: 2px; }
.accordion-icon::after { width: 2px; height: 14px; transition: transform 0.2s ease; }
.accordion-toggle[aria-expanded="true"] .accordion-icon::after { transform: translate(-50%, -50%) scaleY(0); }

.accordion-panel {
  padding: 12px 0 2px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-700);
}
.accordion-panel p { margin: 0 0 10px; }
.accordion-readmore { font-weight: 600; color: var(--green-600); white-space: nowrap; }
.accordion-readmore:hover { text-decoration: underline; }

/* ---------- Festival blocks (embedded in article) ---------- */

.festival-block {
  padding: 32px 0;
  scroll-margin-top: 96px;
}
.festival-block:first-child { padding-top: 8px; }

.festival-block > h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.1rem; margin-bottom: 16px; }

.festival-media img {
  aspect-ratio: 5/4;
  object-fit: cover;
  width: 100%;
  margin-bottom: 20px;
}

.festival-description { color: var(--ink-700); margin-bottom: 24px; }

.festival-media { display: block; position: relative; }
.festival-media img { transition: transform 0.2s ease; }
.festival-media:hover img { transform: scale(1.015); }

table.facts {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-bottom: 24px;
}
table.facts th, table.facts td { text-align: left; padding: 4px 0; }
table.facts th {
  width: 1%;
  white-space: nowrap;
  padding-right: 20px;
  color: var(--ink-500);
  font-weight: 500;
}
table.facts td { color: var(--ink-900); font-weight: 500; }
table.facts td.stars { color: var(--green-600); letter-spacing: 1px; }

.table-scroll { overflow-x: auto; max-width: 100%; margin-bottom: 24px; }
table.compare-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 0.88rem;
}
table.compare-table tr { border-top: 1px solid var(--border); }
table.compare-table tr:first-child { border-top: none; }
table.compare-table th, table.compare-table td { text-align: left; padding: 8px 12px; white-space: nowrap; }
table.compare-table th:first-child, table.compare-table td:first-child { padding-left: 0; }
table.compare-table tr:first-child th {
  color: var(--ink-900);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
}
table.compare-table tr:not(:first-child) th { color: var(--ink-500); font-weight: 500; white-space: normal; }
table.compare-table td.stars { color: var(--green-600); letter-spacing: 1px; }

.article-map {
  height: 320px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--beige-50);
}
.map-pin {
  position: relative;
  width: 26px;
  height: 26px;
  background: var(--green-600);
  border: 2px solid var(--white);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(41, 39, 34, 0.3);
}
.map-pin::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 6px;
  width: 8px;
  height: 8px;
  background: var(--white);
  border-radius: 50%;
}

.why-visit-summary {
  line-height: 1.6;
  color: var(--ink-700);
  margin: 0 0 8px;
}
.why-visit-table {
  width: 100%;
  border-collapse: collapse;
}
.why-visit-table td {
  border: none;
  background: none;
  padding: 10px 0;
  line-height: 1.6;
  color: var(--ink-700);
  font-weight: 400;
}

.festival-sources {
  font-size: 0.82rem;
  color: var(--ink-500);
  margin: 0;
}
.festival-sources .source-label { font-weight: 600; color: var(--ink-700); margin-right: 4px; }
.festival-sources a { color: var(--green-600); word-break: break-word; }
.festival-sources a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; }
}

@media (max-width: 720px) {
  .site-header .container { height: 64px; }
  .main-nav { top: 64px; left: 24px; right: 24px; min-width: 0; }
  .slogan { display: none; }
  .hero { padding: 36px 0 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .card-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
