/* ─── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:      #d4a368;
  --bg-dark: #be9058;
  --text:    #1A1209;
  --font: 'Montserrat', system-ui, -apple-system, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
}

/* ─── Page Container ─────────────────────────────────────────── */
.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 52px 64px 72px;
}

/* ─── Edit Toolbar ───────────────────────────────────────────── */
.edit-bar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 10px 20px;
  align-items: center;
  gap: 10px;
  font-family: var(--font);
}

.edit-bar.active {
  display: flex;
}

.edit-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.4);
  margin-right: auto;
}

.eb-btn {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  padding: 6px 14px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.eb-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.eb-btn.primary {
  background: var(--bg-dark);
}

.eb-btn.primary:hover {
  background: #a07840;
}

.eb-btn.exit {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.6);
}

.logo-upload-label {
  cursor: pointer;
}

.logo-upload-label input[type="file"] {
  display: none;
}

/* ─── Header ─────────────────────────────────────────────────── */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 88px;
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  padding-top: 4px;
}

/* Logo */
.logo-area {
  flex-shrink: 0;
}

.logo-text {
  font-size: 4.2rem;
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  user-select: none;
}

.logo-img {
  display: none;
  max-height: 110px;
  max-width: 220px;
  object-fit: contain;
}

/* Edit trigger — hidden from public; activates via ?edit in URL */
.edit-trigger {
  display: none;
}

/* Language switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: var(--text);
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  padding: 0;
  opacity: 0.55;
  transition: opacity 0.15s ease;
}

.lang-btn:hover {
  opacity: 1;
}

.lang-btn.active {
  opacity: 1;
  font-weight: 700;
}

/* ─── Hero Section ───────────────────────────────────────────── */
.hero-section {
  margin-bottom: 64px;
}

.headline {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.04;
  text-transform: uppercase;
  letter-spacing: -0.015em;
  margin-bottom: 28px;
  max-width: 700px;
}

.subheadline {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 36px;
  max-width: 560px;
}

/* ─── Info Block (date / where / entry) ──────────────────────── */
.info-block {
  display: flex;
  gap: 52px;
  padding-top: 18px;
  border-top: 1px solid var(--text);
  flex-wrap: wrap;
  width: fit-content; /* line ends at the last column, not full page width */
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-label {
  font-size: 12px; /* +30% from original 9px */
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.55;
}

.info-value {
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

/* ─── Body Section ───────────────────────────────────────────── */
.body-section {
  max-width: 660px;
  margin-bottom: 36px;
}

.body-section p {
  font-size: 15px;
  line-height: 1.72;
  margin-bottom: 20px;
}

.body-section p:last-child {
  margin-bottom: 0;
}

/* ─── Organizers Section ─────────────────────────────────────── */
.org-section {
  max-width: 660px;
  margin-bottom: 64px;
}

.org-section p {
  font-size: 15px;
  line-height: 1.72;
  margin-bottom: 16px;
}

.org-section p:last-child {
  margin-bottom: 0;
}

/* Inline hyperlinks within content */
.text-link {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.15s ease;
}

.text-link:hover {
  opacity: 0.6;
}

/* ─── Partners Section ───────────────────────────────────────── */
.partners-section {
  display: flex;
  align-items: flex-start;
  gap: 48px;
  margin-bottom: 52px;
  padding-top: 24px;
  border-top: 1px solid rgba(26, 18, 9, 0.22);
}

/* ── Left column: "supported by" + Visegrad logo ── */
.partners-left {
  flex-shrink: 0;
  width: 130px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.supported-label {
  font-size: 10px;
  font-style: italic;
  opacity: 0.55;
  line-height: 1.3;
}

/* Visegrad Fund logo — linked, no bullet */
.visegrad-wrap {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.18s ease;
}

.visegrad-wrap:hover { opacity: 0.65; }

.visegrad-logo {
  height: 88px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
}

/* Fallback text when logo file is missing */
.visegrad-text { display: none; }
.visegrad-wrap.no-logo .visegrad-logo { display: none; }
.visegrad-wrap.no-logo .visegrad-text {
  display: block;
  font-weight: 700;
  font-size: 13px;
}

/* ── Right column: logo grid ── */
.partners-logos {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 4px;
}

.logos-row {
  display: flex;
  align-items: flex-end; /* baseline alignment looks cleaner for mixed logo sizes */
  gap: 36px;
  flex-wrap: wrap;
  row-gap: 16px;
}

/* Each partner item has a fixed-height image slot for proportional display */
.partner-item {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.35;
  text-transform: uppercase;
  opacity: 0.8;
  display: flex;
  align-items: center;
}

.partner-item img {
  height: 34px;     /* uniform height — width scales naturally per aspect ratio */
  width: auto;
  max-width: 120px;
  object-fit: contain;
  display: block;
}

/* BOO logo is visually very heavy — reduce to match other logos optically */
.partner-item--boo img {
  height: 18px;
}

/* NFI logo has fine detail — increase so it reads at the same visual weight */
.partner-item--nfi img {
  height: 44px;
}

/* Clickable partner logo wrapper */
.partner-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  transition: opacity 0.18s ease;
}

.partner-link:hover { opacity: 0.5; }

/* Text label: hidden when image loads, visible when it fails */
.partner-item span {
  display: none;
}

.partner-item.no-img img {
  display: none;
}

.partner-item.no-img span {
  display: block;
}

/* ─── Footer ─────────────────────────────────────────────────── */
.site-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links {
  display: flex;
  gap: 22px;
  align-items: center;
}

.footer-link {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.15s ease;
}

.footer-link:hover {
  opacity: 0.6;
}

.footer-link.accent {
  font-weight: 700;
}

.footer-email {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.email-link {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
  transition: opacity 0.15s ease;
}

.email-link:hover {
  opacity: 0.6;
}

/* ─── Edit Mode ──────────────────────────────────────────────── */
body.edit-mode .page {
  padding-top: 92px;
}

body.edit-mode [data-key] {
  outline: 1px dashed rgba(26, 18, 9, 0.4);
  border-radius: 2px;
  cursor: text;
  transition: outline 0.1s ease, background 0.1s ease;
}

body.edit-mode [data-key]:hover {
  outline: 1px dashed rgba(26, 18, 9, 0.7);
}

body.edit-mode [data-key]:focus {
  outline: 2px solid var(--text);
  background: rgba(26, 18, 9, 0.06);
  border-radius: 3px;
}

body.edit-mode [data-key] a {
  pointer-events: none;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 820px) {
  .page {
    padding: 36px 28px 56px;
  }

  .site-header {
    margin-bottom: 56px;
  }

  .logo-text {
    font-size: 3rem;
  }

  .headline {
    font-size: 2.2rem;
  }

  .subheadline {
    font-size: 1.2rem;
  }

  .info-block {
    gap: 32px;
  }

  .info-value {
    font-size: 1.4rem;
  }

  .partners-section {
    flex-direction: column;
    gap: 28px;
  }

  /* Keep supported-by / visegrad stacked vertically on mobile */
  .partners-left {
    width: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .logos-row {
    gap: 20px;
    row-gap: 18px;
  }

  .partner-item img {
    height: 26px;
    max-width: 90px;
  }

  .partner-item--nfi img  { height: 34px; }
  .partner-item--boo img  { height: 15px; }

  .visegrad-logo {
    height: 56px;
  }
}

@media (max-width: 480px) {
  .page {
    padding: 28px 20px 48px;
  }

  .logo-text {
    font-size: 2.4rem;
  }

  .headline {
    font-size: 1.8rem;
  }

  .subheadline {
    font-size: 1rem;
  }

  .info-block {
    gap: 20px;
  }

  .info-value {
    font-size: 1.3rem;
  }

  .logos-row {
    gap: 14px;
    row-gap: 16px;
  }

  .partner-item img {
    height: 22px;
    max-width: 80px;
  }

  .partner-item--nfi img { height: 30px; }
  .partner-item--boo img { height: 13px; }

  .visegrad-logo { height: 44px; }

  .footer-links {
    flex-wrap: wrap;
    gap: 14px;
  }
}
