/*
 * ══════════════════════════════════════════════════════════════════
 * RWS INICJATYWA — MAIN.CSS
 * Wspólne style, layout, komponenty — niezależne od motywu
 * ══════════════════════════════════════════════════════════════════
 */

:root {
  --topnav-height: 68px;
  --transition-fast: 0.2s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

/* ─── TOP NAV ─────────────────────────────────────────────────────── */
#topnav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--topnav-height);
  display: flex;
  align-items: center;
}

.nav-logo {
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
}

.topnav-link {
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 500;
  padding: 0.35rem 0.1rem;
  white-space: nowrap;
  position: relative;
}

.topnav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  transition: width var(--transition-fast);
}

.topnav-link:hover::after,
.topnav-link.active::after {
  width: 100%;
}

.topnav-cta {
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 600;
  padding: 0.45rem 1.25rem;
  border-radius: 6px;
  white-space: nowrap;
  transition: opacity var(--transition-fast), transform 0.15s;
}

.topnav-cta:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.nav-toggler {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: none;
  font-size: 1.5rem;
}

#mobile-menu {
  display: none;
  position: absolute;
  top: var(--topnav-height);
  left: 0;
  right: 0;
  z-index: 999;
  padding: 1rem 1.5rem 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

#mobile-menu.open {
  display: block;
}

.mobile-link {
  display: block;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.65rem 0;
}

/* ─── SECTIONS ────────────────────────────────────────────────────── */
section,
footer {
  scroll-margin-top: calc(var(--topnav-height) + 12px);
}

.hero {
  width: 100%;
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero > .container-xl {
  width: 100%;
}

.content-section {
  padding: 5rem 0;
}

/* ─── CONTENT BLOCKS (sticky headers) ─────────────────────────────── */
.rws-block {
  margin-bottom: 1.25rem;
  border-radius: 14px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
  background: #fff;
}

.rws-block-header {
  position: sticky;
  top: var(--topnav-height);
  z-index: 20;
  margin: 0;
  padding: 1.25rem 1.5rem;
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  font-weight: 700;
  line-height: 1.3;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.rws-block-body {
  padding: 0 1.5rem 1.75rem;
  line-height: 1.8;
  border-radius: 0 0 14px 14px;
}

.rws-block-body > p {
  opacity: 0.85;
  margin-bottom: 1rem;
}

.rws-block-body > p:last-child {
  margin-bottom: 0;
}

.rws-block[id],
article[id] {
  scroll-margin-top: calc(var(--topnav-height) + 12px);
}

/* ─── STATS ───────────────────────────────────────────────────────── */
.stat-number {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
}

/* ─── TEAM ────────────────────────────────────────────────────────── */
.team-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.25rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.team-card:first-of-type {
  border-top: none;
  padding-top: 0;
}

.team-avatar {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: #ddd;
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.team-name {
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
}

.team-bio {
  font-size: 0.9rem;
  line-height: 1.7;
  opacity: 0.8;
  margin: 0;
}

.eul-support {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.75rem;
  padding: 1.25rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.03);
}

.eul-support img {
  width: 72px;
  height: auto;
  flex-shrink: 0;
}

.eul-support p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.8;
}

/* ─── RESOURCE LINKS ──────────────────────────────────────────────── */
.resource-link {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  padding: 1.15rem 1.25rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: transform 0.15s, box-shadow 0.2s;
  margin-bottom: 0.75rem;
}

.resource-link:last-child {
  margin-bottom: 0;
}

.resource-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  color: inherit;
}

.resource-link .icon-blob {
  margin-bottom: 0;
  flex-shrink: 0;
}

.resource-link h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.resource-link p {
  font-size: 0.85rem;
  opacity: 0.65;
  line-height: 1.55;
  margin: 0;
}

/* ─── SCROLL ANIMATIONS ───────────────────────────────────────────── */
/* Widoczne domyślnie — ukrywane tylko gdy JS dodaje klasę .js na <html> */
.fade-in {
  opacity: 1;
  transform: none;
}

html.js .fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

html.js .fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ─── FOOTER ──────────────────────────────────────────────────────── */
.footer-divider {
  margin: 2.5rem 0 1.25rem;
  opacity: 0.15;
}

.footer-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  opacity: 0.5;
}

.footer-copy {
  font-size: 0.78rem;
  opacity: 0.4;
  text-align: center;
  margin: 0;
}

.designed-by {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.7rem;
  opacity: 0.55;
}

.designed-by a {
  display: inline-flex;
  line-height: 0;
}

.designed-by img {
  height: 22px;
  width: auto;
  transition: opacity 0.2s ease;
}

.designed-by a:hover img {
  opacity: 0.85;
}

/* ─── RESPONSIVE ──────────────────────────────────────────────────── */
@media (max-width: 991px) {
  .nav-toggler {
    display: block;
  }

  #nav-links-desktop {
    display: none !important;
  }

  .content-section {
    padding: 3rem 0;
  }

  .hero {
    min-height: 75vh;
  }
}

@media (max-width: 767px) {
  .content-section {
    padding: 2.5rem 0;
  }

  .team-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .eul-support {
    flex-direction: column;
    text-align: center;
  }

  .rws-block-header {
    padding: 1.1rem 1.15rem;
  }

  .rws-block-body {
    padding: 0 1.15rem 1.4rem;
  }
}
