/* ==========================================================================
   Fundacja Instytut Reform — custom stylesheet
   ========================================================================== */
:root {
  --primary: #0B2545;
  --primary-soft: #13315C;
  --accent: #0081FC;
  --gold: #C9A227;
  --light-bg: #F4F7FB;
  --ink: #343a40;
  --muted: #6c757d;
  --muted-2: #495057;
  --radius: 12px;
  --shadow-sm: 0 2px 10px rgba(11, 37, 69, 0.07);
  --shadow-md: 0 10px 30px rgba(11, 37, 69, 0.10);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Manrope', 'Segoe UI', Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  font-size: 1rem;
  line-height: 1.7;
}

h1, h2, h3, h4, h5, .font-display {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  color: var(--primary);
  line-height: 1.25;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: #0063c4; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--primary);
  padding: 10px 18px;
  z-index: 2000;
  font-weight: 700;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

.container { max-width: 1180px; }

/* ---------- Top bar ---------- */
.top-bar {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.83rem;
  padding: 6px 0;
}
.top-bar a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.top-bar a:hover { color: #fff; }
.top-bar .divider { opacity: 0.35; margin: 0 10px; }

/* ---------- Navigation ---------- */
.site-nav {
  background: #fff;
  box-shadow: var(--shadow-sm);
  padding: 10px 0;
}
.navbar-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.navbar-brand img { height: 34px; width: auto; }
.site-nav .navbar-toggler { border: 1px solid rgba(11, 37, 69, 0.25); flex-shrink: 0; }
.site-nav .navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.45); }

.site-nav .nav-link {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 14px;
  border-radius: 8px;
}
.site-nav .nav-link:hover { color: var(--accent); background: var(--light-bg); }
.site-nav .nav-link.active { color: var(--accent); }

.lang-switch {
  display: inline-flex;
  border: 1px solid rgba(11, 37, 69, 0.2);
  border-radius: 999px;
  overflow: hidden;
  margin-left: 8px;
}
.lang-switch .lang-btn {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 5px 14px;
  cursor: pointer;
}
.lang-switch .lang-btn[aria-pressed="true"] {
  background: var(--primary);
  color: #fff;
}

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  color: #fff;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(100deg, rgba(11, 37, 69, 0.93) 15%, rgba(11, 37, 69, 0.72) 60%, rgba(11, 37, 69, 0.45) 100%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 130px 0 90px;
  max-width: 760px;
}
.hero .eyebrow {
  display: inline-block;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 16px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  margin-bottom: 20px;
}
.hero p.lead { color: rgba(255, 255, 255, 0.92); font-size: clamp(1.02rem, 1.6vw, 1.2rem); max-width: 620px; }
.hero .btn-row { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }

.hero-stats {
  position: relative;
  z-index: 2;
  background: rgba(4, 20, 40, 0.55);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(3px);
}
.hero-stats .stat { padding: 22px 10px; text-align: center; }
.hero-stats .stat .num {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  color: #fff;
  display: block;
}
.hero-stats .stat .num span { color: var(--gold); }
.hero-stats .stat .lbl { color: rgba(255, 255, 255, 0.78); font-size: 0.88rem; font-weight: 600; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative;
  color: #fff;
  overflow: hidden;
}
.page-hero .hero-media img { object-position: center 40%; }
.page-hero .hero-overlay { background: linear-gradient(100deg, rgba(11, 37, 69, 0.92) 20%, rgba(11, 37, 69, 0.62) 100%); }
.page-hero .hero-content { padding: 88px 0 76px; max-width: 860px; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 2.9rem); margin-bottom: 14px; }
.page-hero p { color: rgba(255, 255, 255, 0.9); font-size: clamp(1rem, 1.5vw, 1.12rem); margin: 0; }

/* ---------- Buttons ---------- */
.btn { border-radius: var(--radius); font-weight: 700; padding: 12px 26px; transition: all 0.2s ease; }
.btn-gold { background: var(--gold); color: var(--primary); border: 1px solid var(--gold); }
.btn-gold:hover { background: #b3901f; color: #fff; border-color: #b3901f; }
.btn-outline-light { border: 1.5px solid rgba(255, 255, 255, 0.75); color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--primary); }
.btn-primary { background: var(--accent); border-color: var(--accent); }
.btn-primary:hover { background: #0063c4; border-color: #0063c4; }
.btn-outline-primary { color: var(--accent); border-color: var(--accent); border-width: 1.5px; }
.btn-outline-primary:hover { background: var(--accent); border-color: var(--accent); }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section.tight { padding: 52px 0; }
.section.tinted { background: var(--light-bg); }
.section-head { max-width: 720px; margin: 0 auto 42px; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 12px; }
.section-head p { color: var(--muted-2); margin: 0; }
.kicker {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  display: block;
  margin-bottom: 10px;
}
.section-head .kicker { margin-bottom: 12px; }

/* ---------- Cards ---------- */
.card {
  border: 1px solid rgba(11, 37, 69, 0.09);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card .card-body { padding: 26px; }
.card h3, .card h4 { font-size: 1.22rem; }
.card p { color: var(--muted-2); font-size: 0.95rem; }

.icon-chip {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: rgba(0, 129, 252, 0.1);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  flex-shrink: 0;
}
.icon-chip svg { width: 24px; height: 24px; }
.icon-chip.gold { background: rgba(201, 162, 39, 0.14); color: var(--gold); }
.icon-chip.navy { background: rgba(11, 37, 69, 0.08); color: var(--primary); }

/* ---------- Pillar blocks ---------- */
.pillar { display: flex; gap: 22px; align-items: flex-start; }
.pillar .pillar-num {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 2.6rem;
  color: var(--gold);
  line-height: 1;
}

/* ---------- Publication / event / news lists ---------- */
.pub-item {
  border-left: 3px solid var(--gold);
  background: #fff;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  height: 100%;
}
.pub-item .pub-date { color: var(--muted); font-size: 0.84rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.pub-item h3 { font-size: 1.1rem; margin: 6px 0 8px; }
.pub-item p { color: var(--muted-2); font-size: 0.93rem; margin: 0; }

.event-item { display: flex; gap: 20px; align-items: flex-start; }
.event-date {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  text-align: center;
  padding: 10px 14px;
  min-width: 74px;
  flex-shrink: 0;
}
.event-date .d { font-family: 'DM Serif Display', Georgia, serif; font-size: 1.5rem; display: block; line-height: 1.1; }
.event-date .m { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold); font-weight: 700; }
.event-item h3 { font-size: 1.08rem; margin-bottom: 4px; }
.event-item .event-type { color: var(--accent); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.07em; }

.news-row { display: flex; gap: 18px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid rgba(11, 37, 69, 0.08); }
.news-row:last-child { border-bottom: 0; }
.news-row .n-date { color: var(--muted); font-size: 0.85rem; white-space: nowrap; font-weight: 600; }
.news-row h3 { font-size: 1.05rem; margin: 0; }

/* ---------- Mission banner ---------- */
.mission-banner {
  position: relative;
  color: #fff;
  overflow: hidden;
  border-radius: var(--radius);
}
.mission-banner .hero-media img { object-position: center 60%; }
.mission-banner .hero-overlay { background: linear-gradient(100deg, rgba(11, 37, 69, 0.94), rgba(11, 37, 69, 0.72)); }
.mission-banner .hero-content { padding: 64px 44px; max-width: 100%; }

/* ---------- CTA banner ---------- */
.cta-banner {
  position: relative;
  color: #fff;
  overflow: hidden;
  border-radius: var(--radius);
}
.cta-banner .hero-overlay { background: linear-gradient(100deg, rgba(11, 37, 69, 0.93), rgba(11, 37, 69, 0.66)); }
.cta-banner .hero-content { padding: 58px 40px; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 34px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: rgba(11, 37, 69, 0.15);
}
.timeline-item { position: relative; padding-bottom: 34px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -33px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--gold);
}
.timeline-item .t-date { color: var(--accent); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.07em; }
.timeline-item h3 { font-size: 1.15rem; margin: 4px 0 6px; }
.timeline-item p { color: var(--muted-2); font-size: 0.95rem; margin: 0; }

/* ---------- Stat blocks ---------- */
.stat-card { text-align: center; padding: 28px 16px; }
.stat-card .num {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(2rem, 3.4vw, 2.7rem);
  color: var(--primary);
}
.stat-card .num span { color: var(--gold); }
.stat-card .lbl { color: var(--muted-2); font-weight: 600; font-size: 0.92rem; }

/* ---------- Team cards ---------- */
.team-card { text-align: center; padding: 30px 22px; height: auto; }
.team-card .avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--gold);
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.team-card h3 { font-size: 1.15rem; }
.team-card .role { color: var(--accent); font-weight: 700; font-size: 0.88rem; }

/* ---------- Accordion ---------- */
.accordion-item { border-radius: var(--radius) !important; overflow: hidden; border: 1px solid rgba(11, 37, 69, 0.09); margin-bottom: 14px; }
.accordion-button { font-weight: 700; color: var(--primary); font-size: 1.05rem; }
.accordion-button:not(.collapsed) { background: var(--light-bg); color: var(--primary); box-shadow: none; }
.accordion-button:focus { box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.35); }
.accordion-body { color: var(--muted-2); }

/* ---------- Project cards ---------- */
.project-card .tag {
  display: inline-block;
  background: rgba(0, 129, 252, 0.1);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.project-card .dates { color: var(--muted); font-size: 0.85rem; font-weight: 600; }

/* ---------- Contact ---------- */
.contact-info-card { padding: 26px; height: auto; }
.contact-info-card h3 { font-size: 1.15rem; margin-bottom: 14px; }
.contact-info-card ul { list-style: none; padding: 0; margin: 0; }
.contact-info-card li { display: flex; gap: 12px; margin-bottom: 12px; color: var(--muted-2); font-size: 0.95rem; }
.contact-info-card li:last-child { margin-bottom: 0; }
.contact-info-card .ci-label { font-weight: 700; color: var(--primary); display: block; font-size: 0.85rem; }

.form-card { padding: 32px; }
.form-card .form-label { font-weight: 700; color: var(--primary); font-size: 0.9rem; }
.form-control, .form-select {
  border-radius: 10px;
  border: 1px solid rgba(11, 37, 69, 0.2);
  padding: 11px 14px;
}
.form-control:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 129, 252, 0.15); }
.form-note { color: var(--muted); font-size: 0.83rem; }

.map-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid rgba(11, 37, 69, 0.09); }
.map-wrap iframe { display: block; width: 100%; border: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary); color: rgba(255, 255, 255, 0.82); padding: 60px 0 0; }
.site-footer h4 { color: #fff; font-size: 1.05rem; margin-bottom: 18px; }
.site-footer a { color: rgba(255, 255, 255, 0.82); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: 9px; font-size: 0.93rem; }
.site-footer .logo-white { filter: brightness(0) invert(1); height: 32px; width: auto; margin-bottom: 16px; }
.footer-bottom {
  margin-top: 44px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 18px 0;
  font-size: 0.86rem;
}
.footer-bottom a { opacity: 0.5; font-weight: 300; }

/* ---------- Forms status ---------- */
#formStatus { font-weight: 600; }
#formStatus.text-success { color: #1c7d3d; }
#formStatus.text-danger { color: #b02a37; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .hero-content { padding: 92px 0 60px; }
  .page-hero .hero-content { padding: 66px 0 56px; }
  .site-footer { text-align: left; }
}
@media (max-width: 575.98px) {
  .top-bar .hide-sm { display: none; }
  .section { padding: 52px 0; }
  .mission-banner .hero-content, .cta-banner .hero-content { padding: 40px 24px; }
  .form-card { padding: 24px 20px; }
  .hero .btn-row .btn { width: 100%; text-align: center; }
}
