/* =========================================================
   FUNDACJA JAGIELLOŃSKA — site stylesheet
   Palette: deep institutional navy + burgundy + gold accent
   Type: Cormorant Garamond (display) + Source Sans 3 (body)
   Corners: consistent 10px radius
   ========================================================= */

:root {
  --navy-900: #131c30;
  --navy-800: #1b2740;
  --navy-700: #243354;
  --navy-100: #e7ebf3;
  --burgundy: #6e1e2a;
  --burgundy-dark: #571722;
  --gold: #c9a227;
  --gold-soft: #e6cf7f;
  --cream: #f7f4ec;
  --paper: #fffdf8;
  --ink: #26292f;
  --muted: #5d6470;
  --line: #e3ddcd;
  --radius: 10px;
  --shadow-soft: 0 10px 30px rgba(19, 28, 48, 0.10);
  --shadow-card: 0 6px 18px rgba(19, 28, 48, 0.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-size: 1.0625rem;
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4, .display-serif {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  color: var(--navy-800);
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); }

p { margin-bottom: 1rem; }
a { color: var(--burgundy); }
a:hover { color: var(--burgundy-dark); }

img { max-width: 100%; height: auto; display: block; }

/* ---------- Language visibility (PL default) ---------- */
body.lang-en [data-lang="pl"],
body.lang-pl [data-lang="en"] { display: none !important; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
}
.topbar a { color: var(--gold-soft); text-decoration: none; }
.topbar a:hover { color: #fff; }

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 2px 14px rgba(19, 28, 48, 0.06);
}
.navbar-brand img { height: 58px; width: auto; }
.brand-caption {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.05rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.navbar .nav-link {
  color: var(--navy-800);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  padding: 0.55rem 0.9rem !important;
  border-radius: var(--radius);
  transition: background 0.2s ease, color 0.2s ease;
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
  background: var(--navy-100);
  color: var(--burgundy);
}
.lang-switch { display: flex; align-items: center; gap: 0; }
.lang-switch .btn {
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid var(--navy-800);
  border-radius: 0;
  padding: 0.3rem 0.75rem;
  line-height: 1.4;
}
.lang-switch .btn:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.lang-switch .btn:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.lang-switch .btn.active {
  background: var(--navy-800);
  color: #fff;
}
.lang-switch .btn:not(.active) {
  background: transparent;
  color: var(--navy-800);
}

/* ---------- Buttons ---------- */
.btn-gold {
  background: var(--gold);
  color: var(--navy-900);
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  padding: 0.7rem 1.6rem;
  transition: background 0.2s ease, transform 0.15s ease;
  box-shadow: 0 4px 12px rgba(201, 162, 39, 0.35);
}
.btn-gold:hover { background: #b8921f; color: var(--navy-900); transform: translateY(-1px); }
.btn-outline-gold {
  border: 2px solid var(--gold);
  color: var(--gold-soft);
  background: transparent;
  font-weight: 700;
  border-radius: var(--radius);
  padding: 0.7rem 1.6rem;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn-outline-gold:hover { background: var(--gold); color: var(--navy-900); }
.btn-navy {
  background: var(--navy-800);
  color: #fff;
  font-weight: 700;
  border-radius: var(--radius);
  padding: 0.7rem 1.6rem;
  border: none;
}
.btn-navy:hover { background: var(--navy-900); color: var(--gold-soft); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--navy-900);
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 35%;
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg, rgba(19, 28, 48, 0.88) 0%, rgba(19, 28, 48, 0.72) 45%, rgba(19, 28, 48, 0.45) 100%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 2; padding: 6.5rem 0 7rem; max-width: 780px; }
.hero-kicker {
  display: inline-block;
  color: var(--gold-soft);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-weight: 700;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(230, 207, 127, 0.6);
  padding-bottom: 0.4rem;
  margin-bottom: 1.4rem;
}
.hero h1, .hero .hero-title {
  color: #fff;
  margin-bottom: 1.2rem;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}
.hero .lead { color: rgba(255, 255, 255, 0.92); font-size: 1.2rem; }
.hero-accent { color: var(--gold-soft); font-style: italic; }

/* Page hero (interior pages) */
.page-hero {
  position: relative;
  overflow: hidden;
  background: var(--navy-800);
  color: #fff;
}
.page-hero .hero-content { padding: 4rem 0 4.2rem; max-width: 900px; }
.page-hero h1 { color: #fff; }
.page-hero .lead { color: rgba(255, 255, 255, 0.88); }

/* ---------- Sections ---------- */
.section { padding: 4.2rem 0; }
.section-tight { padding: 3rem 0; }
.section-cream { background: var(--cream); }
.section-paper { background: var(--paper); }
.section-navy { background: var(--navy-800); color: rgba(255, 255, 255, 0.9); }
.section-navy h1, .section-navy h2, .section-navy h3 { color: #fff; }
.section-navy a { color: var(--gold-soft); }

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--burgundy);
  margin-bottom: 0.7rem;
}
.section-navy .eyebrow { color: var(--gold-soft); }

.gold-rule {
  width: 64px; height: 4px;
  background: var(--gold);
  border-radius: 2px;
  margin: 0 0 1.4rem;
}
.center .gold-rule { margin-left: auto; margin-right: auto; }

/* ---------- Cards ---------- */
.card-jag {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1.8rem;
  height: auto;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-jag:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.card-jag h3 { margin-bottom: 0.7rem; }
.card-jag .card-icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  background: var(--navy-100);
  color: var(--navy-800);
  margin-bottom: 1rem;
  flex-shrink: 0;
}
.card-jag .card-icon svg { width: 26px; height: 26px; }
.card-link {
  font-weight: 700;
  text-decoration: none;
  color: var(--burgundy);
}
.card-link::after { content: "\203A"; margin-left: 0.35rem; }
.card-link:hover::after { margin-left: 0.55rem; }

/* fact list */
.fact-list { list-style: none; padding: 0; margin: 0; }
.fact-list li {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--line);
}
.fact-list li:last-child { border-bottom: none; }
.fact-list .fact-label { font-weight: 700; color: var(--navy-800); min-width: 9.5rem; }

/* ---------- Stat / fact band ---------- */
.fact-band { background: var(--navy-900); color: #fff; }
.fact-band .fact-item { text-align: center; padding: 1.2rem 0.8rem; }
.fact-band .fact-value {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--gold-soft);
  line-height: 1.1;
}
.fact-band .fact-name { font-size: 0.92rem; color: rgba(255, 255, 255, 0.8); letter-spacing: 0.04em; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: "";
  position: absolute;
  left: 0.45rem; top: 0.4rem; bottom: 0.4rem;
  width: 2px;
  background: var(--line);
}
.timeline-item { position: relative; padding-bottom: 1.8rem; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -2rem; top: 0.45rem;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 2px var(--gold);
}
.timeline-year {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--burgundy);
}

/* ---------- Quote ---------- */
.quote-block {
  border-left: 4px solid var(--gold);
  background: #fff;
  padding: 1.6rem 2rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-card);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  font-style: italic;
  color: var(--navy-800);
}

/* ---------- Statutory purpose grid ---------- */
.purpose-card {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  height: auto;
}
.purpose-card .letter {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--gold);
  line-height: 1;
}

/* ---------- Donation box ---------- */
.donation-box {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-900));
  color: #fff;
  border-radius: var(--radius);
  padding: 2.4rem;
  box-shadow: var(--shadow-soft);
}
.donation-box h2, .donation-box h3 { color: #fff; }
.account-number {
  font-family: "Source Sans 3", monospace, monospace;
  font-size: clamp(1.05rem, 2.4vw, 1.45rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.08);
  border: 1px dashed rgba(230, 207, 127, 0.6);
  border-radius: var(--radius);
  padding: 0.9rem 1.2rem;
  color: var(--gold-soft);
  word-break: break-all;
}

/* ---------- Gallery figure captions ---------- */
.figure-caption {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.6rem;
}

/* ---------- Forms ---------- */
.form-control, .form-select {
  border-radius: var(--radius);
  border: 1px solid #d5d0c0;
  padding: 0.7rem 0.9rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 0.2rem rgba(201, 162, 39, 0.18);
}
.form-label { font-weight: 600; color: var(--navy-800); }
#formStatus p { margin: 0; padding: 0.8rem 1rem; border-radius: var(--radius); }
#formStatus .ok { background: #e6f4e8; color: #1e5c2c; border: 1px solid #bfe3c6; }
#formStatus .err { background: #fbe9e9; color: #7c1f1f; border: 1px solid #f0c4c4; }

/* ---------- Info cards (contact) ---------- */
.info-card {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1.6rem;
  margin-bottom: 1.5rem;
  height: auto;
}
.info-card h3 { font-size: 1.3rem; margin-bottom: 0.8rem; }
.info-card p, .info-card li { margin-bottom: 0.4rem; }
.info-card ul { padding-left: 1.1rem; }

/* ---------- Map ---------- */
.map-frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--line);
  line-height: 0;
}
.map-frame iframe { width: 100%; height: 380px; border: 0; display: block; }
@media (max-width: 767.98px) { .map-frame iframe { height: 300px; } }

/* ---------- Breadcrumbs ---------- */
.breadcrumb { font-size: 0.9rem; margin: 0; }
.breadcrumb a { color: var(--gold-soft); text-decoration: none; }
.breadcrumb-item.active { color: rgba(255, 255, 255, 0.75); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.82);
  padding: 3.5rem 0 2.5rem;
  font-size: 0.95rem;
  border-top: 3px solid var(--gold-soft);
}

/* Wider horizontal gutter between footer columns on desktop so the
   long email address never runs into the Legal column */
@media (min-width: 992px) {
  .site-footer .row {
    --bs-gutter-x: 3.5rem;
  }
}
.site-footer .footer-brand-logo {
  width: 200px;
  max-width: 100%;
  height: auto;
  display: block;
  background: #ffffff;
  padding: 0.55rem 0.85rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  box-sizing: border-box;
}
.site-footer h3 {
  color: var(--gold-soft);
  font-size: 1.15rem;
  margin-bottom: 1rem;
  font-family: "Source Sans 3", Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.site-footer a { color: rgba(255, 255, 255, 0.82); text-decoration: none; overflow-wrap: anywhere; word-break: break-word; transition: color 0.2s ease; }
.site-footer a:hover { color: var(--gold-soft); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin-top: 2.2rem;
  padding-top: 1.6rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  align-items: center;
  text-align: center;
  letter-spacing: 0.02em;
}
.footer-bottom a:hover {
  color: var(--gold-soft);
  opacity: 1 !important;
}
.footer-krs { color: rgba(255, 255, 255, 0.65); font-size: 0.88rem; }

/* ---------- Utilities ---------- */
.mw-720 { max-width: 720px; }
.mw-860 { max-width: 860px; }
.center { text-align: center; }
.center .mw-720, .center .mw-860 { margin-left: auto; margin-right: auto; }
.rounded-jag { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); }
.text-gold { color: var(--gold); }
.text-burgundy { color: var(--burgundy); }
.lead-lg { font-size: 1.18rem; }

.focus-outline:focus-visible,
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* Partner logo strips */
.logo-strip img {
  max-height: 90px;
  width: auto;
  margin: 0.6rem;
  display: inline-block;
}

/* Fix Bootstrap nav collapse on mobile so toggle stays clickable */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-top: 0.6rem;
    box-shadow: var(--shadow-card);
  }
  .navbar-brand img { height: 46px; }
}
