/* ==========================================================================
   MAZOWIECKA FUNDACJA NAUKOWA — stylesheet
   Palette: deep navy ink, ochre gold accent, warm paper background
   ========================================================================== */

:root {
  --ink: #14283c;
  --ink-soft: #1f3d59;
  --accent: #b7862c;
  --accent-dark: #96691c;
  --paper: #faf8f4;
  --paper-2: #f1ede4;
  --text: #2a3642;
  --muted: #5d6b78;
  --line: #e4ddd0;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(20, 40, 60, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Source Sans 3', 'Segoe UI', Arial, sans-serif;
  color: var(--text);
  background: var(--paper);
  font-size: 1.0625rem;
  line-height: 1.7;
}

h1, h2, h3, h4, h5 {
  font-family: 'Lora', Georgia, serif;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.25;
}

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

a { color: var(--accent-dark); }
a:hover { color: var(--accent); }

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

.section-kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  margin-bottom: 1rem;
}

.lead-text {
  font-size: 1.125rem;
  color: var(--muted);
}

.container-narrow {
  max-width: 880px;
}

/* ---------------------------------- Header -------------------------------- */

.site-header {
  background: var(--ink);
  border-bottom: 1px solid rgba(243, 239, 230, 0.15);
  position: sticky;
  top: 0;
  z-index: 1030;
}

.navbar-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.navbar-brand img {
  height: 52px;
  width: auto;
  flex-shrink: 0;
}

.site-header .nav-link {
  color: rgba(243, 239, 230, 0.85);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.5rem 0.9rem !important;
  border-radius: 8px;
}

.site-header .nav-link:hover {
  color: #e5b95c;
  background: rgba(255, 255, 255, 0.08);
}

.site-header .nav-link.active {
  color: var(--accent-dark);
}

.lang-switch {
  display: inline-flex;
  border: 2px solid rgba(243, 239, 230, 0.6);
  border-radius: 999px;
  overflow: hidden;
  margin-left: 0.75rem;
  flex-shrink: 0;
}

.lang-switch button {
  background: transparent;
  border: 0;
  color: rgba(243, 239, 230, 0.9);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
  line-height: 1.4;
}

.lang-switch button[aria-pressed="true"] {
  background: var(--accent);
  color: #ffffff;
}

.navbar-toggler {
  border: 2px solid rgba(243, 239, 230, 0.6);
  flex-shrink: 0;
}

.navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(183, 134, 44, 0.4); }

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28243, 239, 230, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

@media (max-width: 991.98px) {
  .site-header .navbar-collapse {
    border-top: 1px solid var(--line);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
  }
  .navbar-brand img { height: 46px; width: auto; }
}

/* ----------------------------------- Hero --------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(183, 134, 44, 0.18), transparent 60%),
    linear-gradient(160deg, #0e1e2e 0%, #14283c 55%, #1f3d59 100%);
  color: #f3efe6;
  padding: clamp(4rem, 9vw, 7.5rem) 0 clamp(4rem, 8vw, 6.5rem);
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.25;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

/* Partners & awards strip */
.partners-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2rem 3.5rem;
  margin-top: 2.5rem;
}

.partners-strip img {
  height: 64px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

@media (max-width: 576px) {
  .partners-strip img { height: 48px; max-width: 160px; }
}

.hero h1 {
  color: #ffffff;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
}

.hero .accent-word {
  color: #e5b95c;
  font-style: italic;
}

.hero p {
  color: rgba(243, 239, 230, 0.88);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 46rem;
  margin-left: auto;
  margin-right: auto;
}

.hero .hero-fact {
  display: inline-block;
  border: 1px solid rgba(229, 185, 92, 0.55);
  border-radius: 999px;
  padding: 0.4rem 1.1rem;
  font-size: 0.92rem;
  color: #e5b95c;
  background: rgba(229, 185, 92, 0.08);
}

/* ---------------------------------- Buttons ------------------------------- */

.btn-gold {
  background: var(--accent);
  border: 2px solid var(--accent);
  color: #ffffff;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.65rem 1.7rem;
}

.btn-gold:hover, .btn-gold:focus {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #ffffff;
}

.btn-outline-ink {
  border: 2px solid currentColor;
  color: inherit;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.65rem 1.7rem;
}

.btn-outline-ink:hover, .btn-outline-ink:focus {
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
}

.btn-outline-ink.on-light {
  color: var(--ink);
}

.btn-outline-ink.on-light:hover {
  background: var(--ink);
  color: #ffffff;
}

/* ---------------------------------- Sections ------------------------------ */

.page-section {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.page-section.alt {
  background: var(--paper-2);
}

.section-head {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-head .lead-text { margin-left: auto; margin-right: auto; }

/* Info cards — natural height, never stretched */

.info-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  height: auto;
}

.info-card h3, .info-card h4 { font-size: 1.2rem; margin-bottom: 0.75rem; }

.info-card .card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(183, 134, 44, 0.12);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.info-card .card-icon svg { width: 24px; height: 24px; }

.info-card ul {
  padding-left: 1.1rem;
  margin-bottom: 0;
}

.info-card li { margin-bottom: 0.4rem; }

/* Fact table (About page) */

.fact-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.fact-table th, .fact-table td {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.fact-table tr:last-child th, .fact-table tr:last-child td { border-bottom: 0; }

.fact-table th {
  background: var(--paper-2);
  color: var(--ink);
  font-weight: 700;
  width: 40%;
}

/* Statutory purposes list */

.purpose-list { counter-reset: purpose; list-style: none; padding-left: 0; }

.purpose-list li {
  counter-increment: purpose;
  position: relative;
  padding: 1.1rem 1.25rem 1.1rem 3.4rem;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 0.85rem;
}

.purpose-list li::before {
  content: counter(purpose);
  position: absolute;
  left: 1.1rem;
  top: 1.15rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--ink);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Scholarship steps timeline */

.steps {
  list-style: none;
  padding-left: 0;
  position: relative;
}

.steps::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line);
}

.steps li {
  position: relative;
  padding: 0 0 1.6rem 3rem;
}

.steps li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 4px solid var(--accent);
}

.steps h4 { font-size: 1.1rem; margin-bottom: 0.35rem; }

/* Activity blocks — varied, not uniform cards */

.activity-block {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.activity-block.featured {
  border-left: 6px solid var(--accent);
}

/* Quote / note block */

.note-block {
  background: var(--paper-2);
  border-left: 5px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  color: var(--ink-soft);
}

/* Contact page */

.contact-form-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}

.contact-form-card label { font-weight: 600; color: var(--ink); }

.form-control, .form-select {
  border-radius: 8px;
  border-color: #cfd4d9;
  padding: 0.65rem 0.9rem;
}

.form-control:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(183, 134, 44, 0.2);
}

.contact-side-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.contact-side-card h3 { font-size: 1.15rem; }

.contact-detail {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.9rem;
}

.contact-detail:last-child { margin-bottom: 0; }

.contact-detail svg {
  width: 20px;
  height: 20px;
  color: var(--accent-dark);
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.contact-map {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  line-height: 0;
}

.contact-map iframe {
  width: 100%;
  height: 360px;
  border: 0;
  display: block;
}

@media (max-width: 575.98px) {
  .contact-map iframe { height: 260px; }
}

/* ---------------------------------- Footer -------------------------------- */

.site-footer {
  background: var(--ink);
  color: rgba(243, 239, 230, 0.85);
  padding: clamp(2.5rem, 5vw, 4rem) 0 2rem;
  margin-top: auto;
}

.site-footer h4 {
  color: #ffffff;
  font-size: 1.02rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
  font-family: 'Source Sans 3', Arial, sans-serif;
  font-weight: 700;
}

.site-footer .footer-divider {
  border-top: 1px solid rgba(243, 239, 230, 0.18);
}

.site-footer a {
  color: rgba(243, 239, 230, 0.85);
  text-decoration: none;
}

.site-footer a:hover { color: #e5b95c; }

.site-footer ul { list-style: none; padding-left: 0; }

.site-footer li { margin-bottom: 0.55rem; }

.site-footer .footer-brand img { height: 56px; width: auto; }

.site-footer .reg-lines { font-size: 0.92rem; line-height: 1.8; }

.footer-bottom {
  font-size: 0.9rem;
}

.footer-bottom a {
  display: block;
  margin-top: 0.4rem;
  opacity: 0.5;
  font-weight: 300;
}

/* Compact hero for subpages */

.hero.compact {
  padding: clamp(3rem, 6vw, 4.5rem) 0;
}

.hero.compact h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.form-success {
  color: #2e7d32;
  font-weight: 600;
}

.form-error {
  color: #c0392b;
  font-weight: 600;
}

/* Utility */

.mt-fix { margin-top: 0.5rem; }

.text-ink { color: var(--ink); }

.badge-fact {
  display: inline-block;
  background: rgba(183, 134, 44, 0.12);
  color: var(--accent-dark);
  border-radius: 999px;
  padding: 0.25rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0 0.35rem 0.5rem 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #ffffff;
  padding: 0.6rem 1rem;
  z-index: 2000;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}
