/*
Theme Name: Healing Waters
Theme URI: https://healingwaters.example
Author: Atrium
Description: Trilingual (CZ/EN/PL) theme for the Healing Waters project, supported by Visegrad Fund. Includes the home page and Events, Photo, Audio and Video page templates.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: healing-waters
*/

:root {
  --hw-teal: #1d4e5f;
  --hw-teal-dark: #17404f;
  --hw-ink: #17313d;
  --hw-row: #5f9aa8;
  --hw-serif: 'Cormorant Garamond', Georgia, serif;
}

* { box-sizing: border-box; }

body.hw {
  margin: 0;
  background: #fff;
  color: var(--hw-ink);
  font-family: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

.hw-wrap { max-width: 1150px; margin: 0 auto; padding: 56px 24px 72px; }
.hw-wrap--wide { max-width: 1200px; padding: 56px 24px; }

/* Visegrad mark */
.hw-mark {
  border: 2px solid var(--hw-ink);
  color: var(--hw-ink);
  padding: 14px 22px;
  display: inline-block;
  text-align: left;
  line-height: 1.2;
  text-decoration: none;
}
.hw-mark--light { border-color: #fff; color: #fff; }
.hw-mark .hw-mark-dots { display: block; font-size: 10px; }
.hw-mark .hw-mark-name { font-family: var(--hw-serif); font-size: 22px; font-weight: 600; }
.hw-mark .hw-mark-name span { margin-right: 8px; }

/* Hero */
.hw-hero {
  position: relative;
  min-height: 78vh;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px 120px;
}
.hw-hero h1 {
  font-family: var(--hw-serif);
  color: #fff;
  font-size: clamp(44px, 8vw, 84px);
  font-weight: 500;
  margin: 0;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}
.hw-nav { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; margin-top: 90px; }
.hw-nav a {
  font-family: var(--hw-serif);
  color: #fff;
  background: rgba(29, 78, 95, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.9);
  padding: 8px 34px;
  font-size: 22px;
  letter-spacing: 2px;
  text-decoration: none;
  transition: background 0.2s ease;
}
.hw-nav a:hover { background: rgba(29, 78, 95, 1); }
.hw-hero-foot {
  position: absolute;
  bottom: 24px; left: 24px; right: 24px;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.hw-hero-foot p { font-family: var(--hw-serif); color: #fff; font-size: 22px; margin: 0; }

/* Subpage banner */
.hw-banner {
  position: relative;
  height: 340px;
  background-size: cover;
  background-position: center;
  display: flex; align-items: center; justify-content: center;
}
.hw-banner .hw-mark { position: absolute; top: 20px; left: 24px; }
.hw-banner h1 {
  font-family: var(--hw-serif);
  color: #fff;
  font-size: clamp(44px, 8vw, 80px);
  font-weight: 500;
  margin: 0;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}

/* Three column text */
.hw-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 36px; }
.hw-cols > div + div { border-left: 1px solid #9fb6bd; padding-left: 36px; }
.hw-cols h2 { font-family: var(--hw-serif); font-size: 52px; font-weight: 500; margin: 0 0 18px; }
.hw-cols p { font-size: 14px; line-height: 1.55; text-align: justify; }
.hw-center { text-align: center; }
.hw-right { text-align: right; }

/* Bands */
.hw-band { background: var(--hw-teal); color: #fff; padding: 34px 24px; }
.hw-band--dark { background: var(--hw-teal-dark); padding: 28px 24px; }
.hw-band-grid {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px;
}
.hw-band-grid p { font-family: var(--hw-serif); font-size: 20px; text-align: center; margin: 0; }
.hw-band-grid > *:not(:first-child) { border-left: 1px solid rgba(255, 255, 255, 0.35); padding-left: 24px; }
.hw-support { max-width: 1000px; margin: 0 auto; display: flex; align-items: center; gap: 32px; flex-wrap: wrap; justify-content: center; }
.hw-support div { font-family: var(--hw-serif); font-size: 21px; line-height: 1.5; }
.hw-support p { margin: 0; }

.hw-strip { width: 100%; height: 220px; object-fit: cover; display: block; }
.hw-strip--short { height: 180px; }

/* Creators */
.hw-creators { max-width: 1100px; margin: 0 auto; padding: 64px 24px; text-align: center; }
.hw-creators h2 { font-family: var(--hw-serif); font-size: clamp(34px, 6vw, 64px); font-weight: 500; margin: 0; }
.hw-creators .hw-credits { margin-top: 36px; font-size: 15px; line-height: 1.7; text-align: left; }

/* Partners */
.hw-partners { text-align: center; padding: 64px 24px; }
.hw-partners h2 { font-family: var(--hw-serif); font-size: 34px; font-weight: 600; margin: 0 0 32px; }
.hw-partners h3 { font-family: var(--hw-serif); font-size: 30px; font-weight: 600; margin: 56px 0 32px; }
.hw-partner-grid {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; align-items: start;
}
.hw-partner-grid img { max-width: 160px; height: auto; margin: 0 auto 16px; display: block; }
.hw-partner-grid .hw-atrium-logo { width: 132px; height: 132px; object-fit: contain; margin-bottom: 10px; }
.hw-partner-grid .hw-arteweda-logo { width: 150px; height: 132px; object-fit: contain; margin-bottom: 10px; }
.hw-partner-name { font-family: var(--hw-serif); font-size: 22px; margin: 0 0 4px; }
.hw-partner-role { font-size: 15px; margin: 0; }
.hw-logo-circle {
  width: 110px; height: 110px; margin: 0 auto 16px;
  border: 2px solid var(--hw-ink); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--hw-serif); font-size: 15px; letter-spacing: 2px;
}
.hw-logo-text { font-family: var(--hw-serif); font-size: 26px; font-weight: 600; margin: 24px 0 40px; }
.hw-partner-grid a.hw-logo-text { color: var(--hw-ink); text-decoration: underline; display: inline-block; }

/* Footer */
.hw-footer { background: var(--hw-teal); color: #fff; padding: 36px 24px 24px; }
.hw-footer a { color: #fff; }
.hw-footer .hw-band-grid { text-align: center; }
.hw-footer h2 { font-family: var(--hw-serif); font-size: 22px; margin: 0 0 10px; font-weight: 500; }
.hw-footer p { font-size: 13px; margin: 0 0 4px; }
.hw-footer-meta { text-align: center; margin-top: 28px; font-size: 13px; }
.hw-footer-credit { text-align: right; font-size: 12px; margin: 16px 0 0; opacity: 0.8; }

/* Events table */
.hw-table { display: grid; grid-template-columns: 1fr 1.6fr 1.6fr; border: 2px solid var(--hw-ink); }
.hw-table > div {
  font-family: var(--hw-serif);
  text-align: center;
  padding: 22px 12px;
  border-right: 2px solid var(--hw-ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.hw-table .hw-th { font-size: clamp(17px, 2.4vw, 26px); font-weight: 600; padding: 18px 10px; }
.hw-table .hw-td { border-top: 2px solid var(--hw-ink); font-size: clamp(15px, 2vw, 22px); }
.hw-table .hw-td--alt { background: var(--hw-row); }
.hw-table .hw-td--name { font-size: clamp(17px, 2.4vw, 26px); font-weight: 600; }
.hw-table .hw-td--name small { font-size: clamp(14px, 1.8vw, 19px); font-weight: 500; }

/* Two column subpage layout */
.hw-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 48px; }
.hw-two p { font-size: 19px; line-height: 1.6; }
.hw-sub-h2 { font-family: var(--hw-serif); font-size: 26px; font-weight: 600; margin: 0 0 28px; }

/* Audio */
.hw-tracks { display: flex; flex-direction: column; gap: 24px; }
.hw-track {
  border: 2px solid var(--hw-ink);
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.hw-track span { font-family: var(--hw-serif); font-size: clamp(22px, 3vw, 30px); font-weight: 600; color: var(--hw-teal-dark); }
.hw-track audio { max-width: 220px; }

/* Video / gallery */
.hw-video-thumb { position: relative; margin-top: 28px; }
.hw-video-thumb img { width: 100%; display: block; }
.hw-video-thumb span {
  font-family: var(--hw-serif); position: absolute; top: 16px; left: 24px;
  color: #fff; font-size: 28px; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}
.hw-gallery { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 190px; gap: 12px; }
.hw-gallery-item { position: relative; grid-column: span 4; grid-row: span 2; overflow: hidden; border: 0; padding: 0; background: var(--hw-ink); cursor: zoom-in; }
.hw-gallery-item--1, .hw-gallery-item--5 { grid-column: span 8; }
.hw-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 500ms ease; }
.hw-gallery-item:hover img, .hw-gallery-item:focus-visible img { transform: scale(1.035); }
.hw-gallery-item > span { position: absolute; inset: auto 0 0; display: flex; align-items: baseline; gap: 12px; padding: 38px 18px 16px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.72)); font-family: var(--hw-serif); font-size: 19px; text-align: left; }
.hw-gallery-item > span strong { font-family: monospace; font-size: 11px; font-weight: 500; opacity: .75; }
.hw-gallery-item:focus-visible { outline: 3px solid var(--hw-teal); outline-offset: 3px; }
.hw-lightbox { position: fixed; inset: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; border: 0; padding: 48px 20px 24px; background: rgba(5,18,23,.96); color: #fff; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center; }
.hw-lightbox[open] { display: grid; }
.hw-lightbox::backdrop { background: rgba(5,18,23,.96); }
.hw-lightbox figure { grid-column: 2; margin: 0; min-width: 0; }
.hw-lightbox figure img { display: block; width: 100%; height: min(76vh, 850px); object-fit: contain; }
.hw-lightbox figcaption { display: flex; justify-content: center; gap: 16px; margin-top: 14px; font-family: var(--hw-serif); font-size: 20px; }
.hw-lightbox figcaption span:first-child { opacity: .6; font-family: monospace; font-size: 12px; }
.hw-lightbox button { border: 0; background: transparent; color: #fff; font-size: 44px; cursor: pointer; }
.hw-lightbox-close { position: absolute; top: 14px; right: 20px; }
.hw-lightbox-prev { grid-column: 1; }
.hw-lightbox-next { grid-column: 3; }

@media (max-width: 640px) {
  .hw-cols > div + div { border-left: 0; padding-left: 0; }
  .hw-band-grid > *:not(:first-child) { border-left: 0; padding-left: 0; }
  .hw-table { grid-template-columns: 1fr; }
  .hw-gallery { grid-template-columns: 1fr; grid-auto-rows: 260px; }
  .hw-gallery-item, .hw-gallery-item--1, .hw-gallery-item--5 { grid-column: 1; grid-row: span 1; }
  .hw-lightbox { grid-template-columns: 44px minmax(0, 1fr) 44px; padding-inline: 4px; }
  .hw-lightbox figure img { height: 70vh; }
}
