/* ============================================================
   Baltic Wave — public site stylesheet
   Light airy theme · pastel aurora gradients · soft depth
   ============================================================ */

:root {
  --bg: #f6f8fc;
  --bg-2: #eef2f9;
  --card: #ffffff;
  --surface: rgba(18, 28, 58, 0.045);
  --surface-2: rgba(18, 28, 58, 0.08);
  --line: rgba(18, 28, 58, 0.10);
  --text: #16203c;
  --muted: #5b6784;
  --teal: #0aa38a;
  --violet: #6d5bde;
  --blue: #3f7fe8;
  --grad: linear-gradient(115deg, #14c8ab 0%, #4f8dff 48%, #7c5cff 100%);
  --shadow-soft: 0 18px 50px rgba(23, 32, 58, 0.10);
  --shadow-card: 0 8px 30px rgba(23, 32, 58, 0.07);
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --radius: 18px;
  --header-h: 76px;
}

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

body.bw-site {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(124, 92, 255, 0.22); }

/* ---------- Aurora backdrop ---------- */
.bw-aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(124, 92, 255, 0.10), transparent 60%),
    radial-gradient(1000px 600px at -10% 20%, rgba(20, 200, 171, 0.09), transparent 60%),
    var(--bg);
}
.bw-aurora span {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.55;
  animation: bw-drift 26s ease-in-out infinite alternate;
}
.bw-aurora span:nth-child(1) { width: 46vw; height: 46vw; left: -12vw; top: 4vh; background: rgba(79, 141, 255, 0.13); }
.bw-aurora span:nth-child(2) { width: 38vw; height: 38vw; right: -10vw; top: 30vh; background: rgba(124, 92, 255, 0.11); animation-delay: -8s; }
.bw-aurora span:nth-child(3) { width: 34vw; height: 34vw; left: 30vw; bottom: -18vh; background: rgba(20, 200, 171, 0.11); animation-delay: -16s; }
@keyframes bw-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vw, -5vh, 0) scale(1.15); }
}
@media (prefers-reduced-motion: reduce) {
  .bw-aurora span { animation: none; }
}

/* ---------- Header ---------- */
.bw-header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid var(--line);
}
.bw-header-inner {
  width: min(1240px, 94%);
  margin: 0 auto;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.bw-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--text);
}
.bw-logo-mark { width: 38px; height: 38px; flex: none; }
.bw-logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.22rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: linear-gradient(100deg, #131f42 35%, #4653b8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.bw-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.bw-nav li { position: relative; }
.bw-nav a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  border-radius: 10px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.bw-nav a:hover { color: var(--text); background: var(--surface); }
.bw-nav a.active { color: var(--text); }
.bw-nav > ul > li > a.active {
  background: var(--surface);
  box-shadow: inset 0 -2px 0 0 var(--teal);
}
.bw-caret {
  width: 7px; height: 7px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.7;
}

.bw-sub {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 250px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px !important;
  display: none !important;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(23, 32, 58, 0.16);
  backdrop-filter: blur(20px);
}
.bw-nav li.has-sub:hover > .bw-sub,
.bw-nav li.has-sub:focus-within > .bw-sub,
.bw-nav li.has-sub.open > .bw-sub { display: flex !important; }
.bw-sub a { padding: 10px 14px; border-radius: 9px; }

.bw-header-actions { display: flex; align-items: center; gap: 12px; }
.bw-admin-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  border: 1px solid rgba(10, 163, 138, 0.35);
  padding: 7px 14px;
  border-radius: 999px;
  transition: background 0.2s;
}
.bw-admin-link:hover { background: rgba(10, 163, 138, 0.08); }

.bw-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
}
.bw-burger span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.bw-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.bw-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.bw-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Main / canvas (free-position block layout) ---------- */
.bw-main { min-height: 60vh; }

.bw-canvas {
  position: relative;
  width: min(1160px, 92%);
  margin: 0 auto;
  min-height: var(--h, 600px);
}
.bw-canvas .bw-block {
  position: absolute;
  left: var(--x, 0%);
  top: var(--y, 0px);
  width: var(--w, 100%);
  z-index: var(--z, 1);
}

/* ---------- Block: headings ---------- */
.bw-canvas .bw-h { font-family: var(--font-display); margin: 0; line-height: 1.12; }
.bw-canvas .bw-h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(105deg, #101c3d 25%, #4150b4 70%, #0b8f77 105%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.bw-canvas .bw-h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 700; color: var(--text); }
.bw-canvas .bw-h3 {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
}

/* ---------- Block: rich text ---------- */
.bw-canvas .bw-richtext { color: var(--muted); font-size: 1.02rem; }
.bw-canvas .bw-richtext p { margin: 0 0 1em; }
.bw-canvas .bw-richtext p:last-child { margin-bottom: 0; }
.bw-canvas .bw-richtext strong { color: var(--text); font-weight: 600; }
.bw-canvas .bw-richtext a { color: var(--teal); text-decoration: none; border-bottom: 1px solid rgba(10, 163, 138, 0.35); }
.bw-canvas .bw-richtext a:hover { border-bottom-color: var(--teal); }
.bw-canvas .bw-kicker {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--teal);
}

/* ---------- Block: buttons ---------- */
.bw-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.96rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: #ffffff;
  background: var(--grad);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(79, 141, 255, 0.35);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}
.bw-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(124, 92, 255, 0.4); filter: brightness(1.05); }
.bw-btn .bw-btn-arrow { transition: transform 0.2s; }
.bw-btn:hover .bw-btn-arrow { transform: translateX(4px); }
.bw-btn-outline {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
.bw-btn-outline:hover { background: var(--card); box-shadow: var(--shadow-soft); border-color: rgba(18, 28, 58, 0.22); }

/* ---------- Block: video ---------- */
.bw-video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0c1222;
  border: 1px solid var(--line);
  box-shadow: 0 30px 70px rgba(23, 32, 58, 0.22);
}
.bw-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Block: image ---------- */
.bw-canvas .bw-image img { display: block; width: 100%; height: auto; border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.bw-canvas .bw-image figure { margin: 0; }
.bw-canvas .bw-image figcaption { margin-top: 10px; font-size: 0.86rem; color: var(--muted); text-align: center; }

/* ---------- Block: quote ---------- */
.bw-quote {
  margin: 0;
  padding: 30px 34px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.bw-quote::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--grad);
}
.bw-quote p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
}
.bw-quote cite { display: block; margin-top: 14px; font-style: normal; font-size: 0.86rem; color: var(--muted); letter-spacing: 0.06em; }

/* ---------- Block: divider ---------- */
.bw-divider {
  border: 0;
  height: 2px;
  margin: 8px 0;
  background: var(--grad);
  opacity: 0.55;
  border-radius: 2px;
}

/* ---------- Block: countdown ---------- */
.bw-countdown { text-align: center; }
.bw-countdown-label {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.bw-countdown-units { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.bw-countdown-unit {
  min-width: 92px;
  padding: 18px 10px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
}
.bw-countdown-unit b {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.bw-countdown-unit span { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.bw-countdown-tuned {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Block: cards (html helper class) ---------- */
.bw-card {
  height: 100%;
  padding: 28px 30px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.bw-card:hover { transform: translateY(-5px); border-color: rgba(124, 92, 255, 0.45); box-shadow: var(--shadow-soft); }
.bw-card-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  border: 1px solid rgba(10, 163, 138, 0.3);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 14px;
}
.bw-card h3 { margin: 0 0 10px; font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--text); }
.bw-card p { margin: 0 0 16px; color: var(--muted); font-size: 0.94rem; }
.bw-card-link { color: var(--teal); text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.bw-card-link:hover { text-decoration: underline; }

/* ---------- Block: gallery ---------- */
.bw-album { margin-bottom: 44px; }
.bw-album-title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--text); margin: 0 0 6px; }
.bw-album-desc { color: var(--muted); margin: 0 0 18px; font-size: 0.95rem; }
.bw-album-empty { color: var(--muted); font-style: italic; }
.bw-gallery {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), 1fr);
  gap: 14px;
}
.bw-gallery-item {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  position: relative;
}
.bw-gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s;
}
.bw-gallery-item:hover img { transform: scale(1.06); }
.bw-gallery-item::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(16, 25, 50, 0.45));
  opacity: 0;
  transition: opacity 0.3s;
}
.bw-gallery-item:hover::after { opacity: 1; }

/* ---------- Block: video list ---------- */
.bw-videolist { display: grid; grid-template-columns: repeat(var(--cols, 2), 1fr); gap: 26px; }
.bw-videocard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.bw-videocard:hover { transform: translateY(-4px); border-color: rgba(124, 92, 255, 0.4); box-shadow: var(--shadow-soft); }
.bw-videocard .bw-video-frame { border-radius: 0; border: 0; box-shadow: none; }
.bw-videocard-body { padding: 18px 22px 22px; }
.bw-videocard-body h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 1.06rem; font-weight: 700; color: var(--text); }
.bw-videocard-body p { margin: 0; font-size: 0.88rem; color: var(--muted); }

/* ---------- Block: media list ---------- */
.bw-medialist { list-style: none; margin: 0; padding: 0; }
.bw-medialist li {
  padding: 20px 24px;
  margin-bottom: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.25s, transform 0.25s;
}
.bw-medialist li:hover { border-color: rgba(10, 163, 138, 0.4); transform: translateX(4px); }
.bw-medialist a { color: var(--text) !important; font-weight: 600; border: 0 !important; font-size: 1rem; }
.bw-medialist a:hover { color: var(--teal) !important; }
.bw-medialist span { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); }

/* ---------- Block: contact form ---------- */
.bw-contact {
  padding: 34px 36px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.bw-contact h3 { margin: 0 0 20px; font-family: var(--font-display); font-size: 1.4rem; color: var(--text); }
.bw-contact-form label { display: block; font-size: 0.84rem; font-weight: 600; color: var(--muted); margin-bottom: 16px; }
.bw-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bw-contact-form input,
.bw-contact-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: #ffffff;
  border: 1px solid rgba(18, 28, 58, 0.16);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}
.bw-contact-form input:focus,
.bw-contact-form textarea:focus {
  border-color: rgba(10, 163, 138, 0.6);
  box-shadow: 0 0 0 3px rgba(10, 163, 138, 0.12);
}

/* ---------- Lightbox ---------- */
.bw-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(12, 17, 32, 0.9);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  padding: 4vh 4vw;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.bw-lightbox.open { opacity: 1; pointer-events: auto; }
.bw-lightbox img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: 12px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.5);
}
.bw-lightbox-caption { color: #c8d0e4; font-size: 0.9rem; }
.bw-lightbox-close {
  position: absolute;
  top: 20px; right: 26px;
  background: none;
  border: 0;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}
.bw-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 48px; height: 48px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background 0.2s;
}
.bw-lightbox-nav:hover { background: rgba(255, 255, 255, 0.24); }
.bw-lightbox-prev { left: 22px; }
.bw-lightbox-next { right: 22px; }

/* ---------- Flash + edit FAB ---------- */
.flash {
  width: min(1160px, 92%);
  margin: 18px auto 0;
  padding: 13px 18px;
  border-radius: 12px;
  font-size: 0.92rem;
  border: 1px solid;
}
.flash-success { background: rgba(10, 163, 138, 0.08); border-color: rgba(10, 163, 138, 0.35); color: #077a67; }
.flash-error   { background: rgba(214, 69, 93, 0.07); border-color: rgba(214, 69, 93, 0.35); color: #b23349; }
.flash-warning { background: rgba(185, 127, 15, 0.08); border-color: rgba(185, 127, 15, 0.35); color: #93650a; }

.bw-edit-fab {
  position: fixed;
  right: 26px; bottom: 26px;
  z-index: 70;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--grad);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: 0 14px 40px rgba(124, 92, 255, 0.4);
  transition: transform 0.2s;
}
.bw-edit-fab:hover { transform: translateY(-2px) scale(1.03); }

/* ---------- Footer ---------- */
.bw-footer {
  margin-top: 110px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, var(--bg-2));
}
.bw-footer-inner {
  width: min(1240px, 94%);
  margin: 0 auto;
  padding: 54px 0 34px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
.bw-footer-brand p { color: var(--muted); font-size: 0.9rem; margin: 12px 0 0; max-width: 340px; }
.bw-footer-links, .bw-footer-social { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.bw-footer-links a, .bw-footer-social a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.bw-footer-links a:hover, .bw-footer-social a:hover { color: var(--teal); }
.bw-footer-bottom {
  border-top: 1px solid var(--line);
  padding: 20px 0;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(91, 103, 132, 0.8);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  /* backdrop-filter would turn the header into the containing block for the
     fixed nav panel — disable it and use a solid background instead. */
  .bw-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.98);
  }
  .bw-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: rgba(255, 255, 255, 0.99);
    padding: 28px 7vw;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    z-index: 55;
  }
  .bw-nav.open { transform: translateX(0); }
  .bw-nav ul { flex-direction: column; gap: 2px; }
  .bw-nav a { font-size: 1.12rem; padding: 13px 10px; }
  .bw-sub {
    position: static;
    display: flex !important;
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0 0 6px 18px !important;
  }
  .bw-sub a { font-size: 0.98rem; color: var(--muted); }
  .bw-burger { display: flex; }
}

@media (max-width: 820px) {
  /* Free-positioned blocks stack vertically on small screens. */
  .bw-canvas {
    min-height: auto !important;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 36px 6vw 20px;
  }
  .bw-canvas .bw-block {
    position: static !important;
    width: 100% !important;
  }
  .bw-canvas .bw-block[class] { left: auto; top: auto; }
  .bw-gallery { grid-template-columns: repeat(2, 1fr) !important; }
  .bw-videolist { grid-template-columns: 1fr !important; }
  .bw-field-row { grid-template-columns: 1fr; gap: 0; }
  .bw-footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .bw-canvas .bw-h { text-align: center !important; }
  .bw-canvas .bw-richtext { text-align: left !important; }
  .bw-canvas .bw-button > div { text-align: center !important; }
}
@media (max-width: 480px) {
  .bw-gallery { grid-template-columns: 1fr !important; }
}
