/* Stichting Polandia - site-specific overrides na top of RAOS template */

/* Logo - wymuś rozsądną wysokość w nagłówku */
.nav_header .logo {
  width: auto;
  max-height: 56px;
  max-width: 180px;
  object-fit: contain;
}
.offcanvas-body .logo {
  max-height: 64px;
  max-width: 180px;
  width: auto;
  object-fit: contain;
}
footer .logo {
  max-height: 80px;
  width: auto;
  object-fit: contain;
}

/* Switcher języka - kompaktowy okrąg z flagą (sama flaga, bez tekstu) */
.nav_header .lang-switcher a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0 !important;
  margin: 0 4px;
  border-radius: 999px;
  transition: transform .2s, box-shadow .2s;
  border: 2px solid transparent;
}
.nav_header .lang-switcher a:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.nav_header .lang-switcher svg {
  display: block;
}

/* Menu nawigacji - mniejsze odstępy żeby wszystko zmieściło się w 1 linii */
@media (min-width: 992px) {
  .nav_header .rdn_nav ul.list-unstyled li > a {
    padding: 8px 10px !important;
    font-size: 14.5px;
    white-space: nowrap;
  }
  .nav_header .rdn_nav .col-lg-9 {
    gap: 4px !important;
  }
  .nav_header .rdn_nav .rdn_btn {
    padding: 8px 18px !important;
    font-size: 14px !important;
    white-space: nowrap;
  }
}

/* Banner about/stats - 16:9 i pełnia szerokości z object-fit cover */
.img_with_video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* === SPONSORZY / PARTNERZY === */

/* Siatka logo partnerów — odstęp w pionie jak w poziomie (gutter Bootstrapa 1.5rem) */
[data-cms="sponsors-grid"] { row-gap: var(--bs-gutter-x, 1.5rem); }

/* Pojedynczy slot logo partnera */
.sponsor-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px 24px;
  height: 110px;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.sponsor-tile:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,.07);
  transform: translateY(-2px);
  border-color: #d1d5db;
}
.sponsor-tile img {
  max-height: 70px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  filter: grayscale(0%);
  transition: filter .2s, opacity .2s;
}
.sponsor-tile a {
  display: block;
  width: 100%;
  height: 100%;
  display: flex; align-items: center; justify-content: center;
}

/* Stan pusty: pokazuje że można dodać */
.sponsors-empty {
  background: #f9fafb;
  border: 2px dashed #e5e7eb;
  border-radius: 14px;
  padding: 32px;
  text-align: center;
  color: #6b7280;
}
.sponsors-empty a {
  font-weight: 600;
}

/* Naprawa nagłówka sekcji partnerów */
section .partners-heading {
  letter-spacing: .15em;
  font-size: 14px;
  text-transform: uppercase;
  color: #6b7280;
  font-weight: 600;
  margin-bottom: 30px;
}

/* Sekcja "co robimy" — wszystkie 4 kafelki tej samej wysokości */
#services .row.g-4 > [class*="col-"] {
  display: flex;
}
#services .services_col {
  width: 100%;
  height: 100%;
  align-items: flex-start;
  min-height: 110px;
}
#services .services_col .services_col_content {
  flex: 1;
}
#services .services_col h3 {
  margin-bottom: 6px;
}
#services .services_col p {
  margin-bottom: 0;
}

/* Drobne — zdjęcia eventów w slider/list */
.event_one_box img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

/* Stable layout dla obrazów team */
.team_col img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  width: 100%;
}

/* Stats banner */
.img_with_video {
  display: block;
  margin: 0 auto;
}

/* Subtelnie - footer logo monochrom */
footer .logo {
  filter: grayscale(40%);
  opacity: 0.85;
}

/* === EVENT CARDS (lista upcoming/past) === */
.event-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  cursor: pointer;
  transition: transform .25s, box-shadow .25s;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid #eef0f4;
}
.event-card:hover, .event-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,.08);
  border-color: #ddd;
  outline: none;
}
.event-card:focus-visible { outline: 2px solid #c41e3a; outline-offset: 2px; }
.event-card-img {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #f3f4f6;
}
.event-card-img img {
  width: 100%; height: 100%; object-fit: contain;
  transition: transform .35s;
}
.event-card:hover .event-card-img img { transform: scale(1.05); }
.event-card-body {
  padding: 18px 22px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.event-card-meta {
  font-size: 13px; color: #c41e3a; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em; margin: 0 0 8px;
}
.event-card-title {
  font-size: 19px; font-weight: 700; margin: 0 0 8px;
  line-height: 1.3; color: #1a1f36;
}
.event-card-lead {
  color: #555; font-size: 14.5px; margin: 0 0 14px;
  flex: 1;
}
.event-card-more {
  color: #c41e3a; font-weight: 600; font-size: 14px;
  align-self: flex-start;
}

/* === MODAL EVENT DETAIL === */
.event-modal-backdrop {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; justify-content: center;
  overflow-y: auto; padding: 4vh 16px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.event-modal-backdrop.is-open {
  opacity: 1; pointer-events: auto;
}
.event-modal {
  background: #fff;
  border-radius: 18px;
  max-width: 880px;
  width: 100%;
  position: relative;
  overflow: hidden;
  transform: translateY(20px) scale(.97);
  transition: transform .25s;
  box-shadow: 0 30px 60px rgba(0,0,0,.3);
}
.event-modal-backdrop.is-open .event-modal { transform: translateY(0) scale(1); }
.event-modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  border: none;
  font-size: 24px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 8px rgba(0,0,0,.15);
  transition: transform .15s;
  color: #1a1f36;
}
.event-modal-close:hover { transform: scale(1.1); background: #fff; }
.event-modal-hero {
  width: 100%;
  aspect-ratio: 16/9;
  background: #1a1f36;
  overflow: hidden;
}
.event-modal-hero img { width: 100%; height: 100%; object-fit: contain; display: block; }
.event-modal-body { padding: 32px 36px 36px; }
.event-modal-meta {
  font-size: 13px; color: #c41e3a; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em; margin: 0 0 8px;
}
.event-modal-body h2 {
  font-size: 28px; font-weight: 700; margin: 0 0 12px;
  letter-spacing: -.01em; color: #1a1f36;
}
.event-modal-lead {
  font-size: 17px; color: #1a1f36; font-weight: 600;
  margin: 0 0 16px;
}
.event-modal-desc {
  font-size: 15.5px; color: #3c4257; line-height: 1.7;
  white-space: pre-wrap;
}
.event-modal-gallery-title, .event-modal-sponsors-title {
  font-size: 14px; font-weight: 600; color: #6b7280;
  text-transform: uppercase; letter-spacing: .08em;
  margin-top: 28px; margin-bottom: 14px;
}
.event-modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.event-modal-gallery a {
  display: block;
  aspect-ratio: 1/1;
  overflow: hidden;
  border-radius: 10px;
  background: #f3f4f6;
  transition: transform .2s;
}
.event-modal-gallery a:hover { transform: scale(1.03); }
.event-modal-gallery img {
  width: 100%; height: 100%; object-fit: contain; display: block;
}

@media (max-width: 600px) {
  .event-modal-body { padding: 22px 22px 26px; }
  .event-modal-body h2 { font-size: 22px; }
  .event-modal-close { top: 10px; right: 10px; }
}

/* === Language switcher — flaga + kod (2026-06) === */
.lang-switch, .lang-switch-mobile { display:inline-flex; align-items:center; gap:13px; }
.lang-switch-mobile { gap:18px; padding:12px 0 4px; }
.lang-opt { display:inline-flex; align-items:center; gap:6px; text-decoration:none; font-size:13px; font-weight:600; color:#8a8f98; letter-spacing:.4px; transition:color .15s ease; }
.lang-opt .flag { width:22px; height:15px; border-radius:3px; box-shadow:0 0 0 1px rgba(0,0,0,.12); display:block; flex-shrink:0; }
.lang-opt:hover { color:#1a1a1a; }
.lang-opt.active { color:var(--rdn-primary,#d6203a); cursor:default; }
.lang-opt.active .flag { box-shadow:0 0 0 1.6px var(--rdn-primary,#d6203a); }

/* === Pusta sekcja wydarzeń — ładny kafelek (2026-06) === */
.events-empty { width:100%; text-align:center; padding:48px 26px; background:#fff; border:1px solid #ececf2; border-radius:18px; box-shadow:0 8px 28px rgba(0,0,0,.05); }
.events-empty-ic { font-size:46px; line-height:1; color:var(--rdn-primary,#d6203a); display:block; margin-bottom:14px; opacity:.9; }
.events-empty-txt { font-size:16px; color:#555; max-width:400px; margin:0 auto 20px; line-height:1.55; }
.events-empty-btn { display:inline-flex; align-items:center; gap:9px; background:#1877f2; color:#fff !important; text-decoration:none; padding:11px 22px; border-radius:999px; font-weight:600; font-size:14px; transition:transform .15s ease, box-shadow .15s ease; }
.events-empty-btn:hover { transform:translateY(-1px); box-shadow:0 8px 20px rgba(24,119,242,.35); }

/* === Kategorie wydarzeń: filtry + plakietka na karcie (2026-09) === */
.ev-chips { display:flex; flex-wrap:wrap; justify-content:center; gap:10px; margin:0; }
.ev-chip {
  display:inline-flex; align-items:center; gap:8px;
  border:1px solid #e3e6ec; background:#fff; color:#41485c;
  font-size:14px; font-weight:600; line-height:1;
  padding:11px 18px; border-radius:999px; cursor:pointer;
  transition:border-color .15s ease, color .15s ease, background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.ev-chip:hover { border-color:#c9ccd4; color:#1a1f36; transform:translateY(-1px); }
.ev-chip:focus-visible { outline:2px solid var(--rdn-primary,#c41e3a); outline-offset:2px; }
.ev-chip.is-active {
  background:var(--rdn-primary,#c41e3a); border-color:var(--rdn-primary,#c41e3a); color:#fff;
  box-shadow:0 6px 16px rgba(196,30,58,.25);
}
.ev-chip-n {
  font-size:12px; font-weight:700; min-width:20px; text-align:center;
  padding:2px 6px; border-radius:999px; background:#f1f2f6; color:#6b7280;
}
.ev-chip.is-active .ev-chip-n { background:rgba(255,255,255,.22); color:#fff; }

.event-card-cat {
  display:inline-block; align-self:flex-start; margin:0 0 9px;
  font-size:11px; font-weight:700; letter-spacing:.05em; text-transform:uppercase;
  padding:4px 10px; border-radius:999px; background:#f1f2f6; color:#5b6172;
}
.event-card-cat[data-cat="family"]    { background:#eaf3ff; color:#1d4ed8; }
.event-card-cat[data-cat="adults"]    { background:#f5ecff; color:#7c3aed; }
.event-card-cat[data-cat="community"] { background:#e8f7ee; color:#15803d; }
.event-card-cat[data-cat="occasion"]  { background:#fff2e3; color:#b45309; }

@media (max-width: 575px) {
  .ev-chips { gap:8px; }
  .ev-chip { font-size:13px; padding:9px 14px; }
}

/* Pionowe zdjęcia / plakaty wydarzeń — całość na rozmytym tle (klasa nadawana w cms-renderer.js) */
.ev-portrait { position: relative; overflow: hidden; background-color: #171823; }
.ev-portrait::before {
  content: ""; position: absolute; inset: -30px; z-index: 0;
  background: var(--ev-bg) center / cover no-repeat;
  filter: blur(22px) brightness(.7);
}
.ev-portrait > img { position: relative; z-index: 1; object-fit: contain !important; }
.event_one_box.ev-portrait .event_one_link { z-index: 2; }

/* Telefon: mniejsze odstępy między sekcjami (na desktopie bez zmian) — prośba Oskara 23.11.2026.
   Bootstrap motywu: 12 = 96px, 8 = 64px; py-home (hero) = 150px. */
@media (max-width: 767.98px) {
  .py-12 { padding-top: 56px !important; padding-bottom: 56px !important; }
  .pt-12 { padding-top: 56px !important; }
  .pb-12 { padding-bottom: 56px !important; }
  .mb-12 { margin-bottom: 40px !important; }
  .pt-8  { padding-top: 40px !important; }
  .py-home { padding-top: 96px; padding-bottom: 40px; }  /* menu na telefonie kończy się ok. 122px */
}

/* Telefon, strona Wydarzenia (23.11.2026): filtr kategorii w jednym poziomym rzędzie z przewijaniem
   zamiast wąskiej kolumny na środku; mniejsze luki hero → filtr → „Nadchodzące wydarzenia”. */
@media (max-width: 767.98px) {
  .ev-chips {
    flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto;
    margin: 0; padding: 4px 0 10px;  /* wyrównane do kart wydarzeń */
    scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
            mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
  .ev-chips::-webkit-scrollbar { display: none; }
  .ev-chip { flex: 0 0 auto; white-space: nowrap; scroll-snap-align: start; }
  section:has(> .container > [data-cms="events-filter"]) { padding-top: 8px !important; }
  section:has(> .container > [data-cms="events-filter"]) + section { padding-top: 24px !important; }
  #events > .container > .row.mb-6 { margin-bottom: 24px !important; }
}

/* Strona główna — „Czytaj więcej” w O nas: przycisk tylko na telefonie */
.about-toggle { display: none; }

/* Telefon, strona główna (23.11.2026, nagranie reklamy): liczniki w jednym rzędzie 3 kolumn,
   akapit pod nimi zwykłym tekstem, O nas skrócone do 1 akapitu + „Czytaj więcej”, mniejsza luka O nas → wydarzenia. */
@media (max-width: 767.98px) {
  .stat_content { margin-top: -56px; margin-left: 0 !important; margin-right: 0 !important; padding: 22px 12px !important; }
  .stats_row { --bs-gutter-x: 8px; }
  .stats_row > .col-md-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
  .stats_row > .col-md-4 .fs-1 { font-size: 1.9rem !important; }
  .stats_row > .col-md-4 .fs-3 { font-size: 1.15rem !important; }
  .stats_row > .col-md-4 .text-uppercase { font-size: 11px; letter-spacing: .04em; margin-bottom: 0; }
  .stats_row > .col-lg-6 .fs-4 { font-size: 15px !important; line-height: 1.5 !important; margin-top: 14px !important; margin-bottom: 0; }
  .about-more:not(.is-open) { display: none; }
  .about-toggle {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 0;
    background: none; border: 0; font-weight: 600; color: var(--rdn-primary, #c41e3a);
  }
  #about { padding-bottom: 40px !important; }
  #about + #events, #about ~ section#events { padding-top: 40px !important; }
}
