html, body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: "Open Sans", Helvetica, Arial, sans-serif;
}

/* ====== Layout container ====== */
.site-header .container {
  max-width: 100%;
  min-height: 20px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== TOP IMAGE ===== */
.top-image-wrapper {
  width: 100%;
  padding: 20px 0;
  display: flex;
  justify-content: center;
}

.top-image-wrapper .moduletable,
.top-image-wrapper .moduletable > *,
.top-image-wrapper .custom,
.top-image-wrapper .custom > *,
.top-image-wrapper p {
  margin: 0;
  padding: 0;
  width: 100%;                
  display: flex;
  justify-content: center;     /* centruj zawartość wrappera */
}

/* obraz */
.top-image-wrapper img {
  display: block;
  margin: 0 auto;              /* backup centrowania */
  max-width: 30%;
  height: auto;
}

/* ====== Header top ====== */
.header-top {
  background: #fff;
  padding: 10px 0;
}

/* ====== Blue bar with search ====== */
.header-bar {
  background: #0b4d6b;
  padding: 20px 0;
}

.header-bar__inner {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-bar__spacer {
  flex: 1 1 auto;
}

.header-bar__search {
  flex: 0 0 auto;
}

/* ====== White bar with logo + menu ====== */
.header-menu {
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding: 0px 4%;
}

@media (min-width: 1550px) {
  .header-menu {
    padding: 0px 10%;
  }
}


.header-menu__inner {
  display: flex;
  align-items: center;
  justify-content: space-between; /* <-- logo lewo, menu prawo */
  gap: 1.5em;
  padding: 0.9em 0;
  font-family: "Open Sans", Helvetica, sans-serif;
  font-size: 1em; /* <-- sterowanie w em */
}

/* ====== BRAND / LOGO ========== */
.brand {
  flex: 0 0 auto;
}

/* moduł w pozycji logo potrafi wstrzyknąć wrappery — normalizujemy */
.brand .moduletable,
.brand .moduletable > * {
  margin: 0;
  padding: 0;
}

.brand a {
  display: inline-flex;      /* trzyma logo “w linii” i ułatwia wyrównanie */
  align-items: center;
}

.brand img {
  height: 4em;             
  width: auto;
  display: block;
}


/* ====== MENU (desktop) ====== */
.main-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end; /* <-- menu po PRAWEJ */
  min-width: 0;
  font-family: "Open Sans", Helvetica, sans-serif;
  font-size: 20px;
}

/* Normalize module wrappers */
.main-nav .moduletable,
.main-nav .moduletable > * {
  width: auto; /* <-- było 100%, to rozwala układ i centrowanie */
}

/* ====== CORE Joomla menu styling (fallback) ====== */
.main-nav ul.mod-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.4em;
  align-items: center;
  justify-content: flex-end;
}

.main-nav ul.mod-menu > li > a,
.main-nav ul.mod-menu > li > span {
  display: inline-block;      /* było: block */
  padding: 1em 1.2em;
  text-decoration: none;
  font-weight: 600;
  color: #0b4d6b;

  max-width: 170px;           /* <<< TU ustawiasz moment zawijania */
  white-space: normal;        /* było: nowrap */
  overflow-wrap: anywhere;    /* awaryjne łamanie */
  text-align: center;
  line-height: 1.2;

  font-size: 1em;
  font-family: "Open Sans", Helvetica, sans-serif;
}


.main-nav ul.mod-menu > li > a:hover {
  text-decoration: underline;
}

/* ====== MaxiMenu CK (if present) ====== */
.main-nav .maximenuck {
  display: flex;
  justify-content: flex-end; /* <-- było center */
  align-items: center;
  width: auto;
  font-size: 18px;
}

/* Jeśli MaxiMenu CK generuje <ul> w środku, to też wyrównaj */
.main-nav .maximenuck ul {
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.4em;
  align-items: center;
  justify-content: flex-end;
}
/* ===== DJ Slider full width (desktop + mobile) ===== */
.slider-fullwidth,
.slider-fullwidth .dj-slideshow,
.slider-fullwidth .dj-slideshow-fullwidth,
.slider-fullwidth .dj-slider-wrapper {
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
}

/* Jeśli DJ-Slider siedzi w środku kontenera i łapie ograniczenia,
   to ten trik robi pełną szerokość ekranu bez poziomego scrolla */
.slider-fullwidth {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow: hidden; /* ważne na mobile */
}

/* Obrazki/slajdy responsywnie */
.slider-fullwidth img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== Content width jak menu (responsywne) ===== */
.site-main > .container {
  padding-top: 3%;
  padding-left: 20%;
  padding-right: 20%;
  max-width: 100%;
}

/* tablet */
@media (max-width: 1200px) {
  .site-main > .container {
    padding-top: 1%;
    padding-left: 8%;
    padding-right: 8%;
  }
}

/* mobile */
@media (max-width: 992px) {
  .site-main > .container {
    padding-top: 4px;
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Tytuł artykułu – wyśrodkowanie (Joomla 5) */
.com-content-article .page-header,
.com-content-article .page-header h1 {
  text-align: center !important;
}

.com-content-article .page-header h1 {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  font-weight: 500;
  color: #0b4d6b;
  padding-bottom: 25px;
}


/* ====== Mobile behaviour ====== */
@media (max-width: 992px) {
  .header-bar {
    padding: 0.6em 0;
  }

  .header-menu__inner {
    gap: 0.8em;
    padding: 0.7em 0;
    flex-wrap: wrap; /* <-- żeby search/ikonki nie wyjeżdżały */
    font-size: 1em;
  }

  .brand img {
    height: 3.2em;
  }

  .main-nav {
    width: 100%;
    justify-content: flex-end;
  }

  /* Mobile Menu CK bar */
  .mobilemenuck-bar {
    display: block;
  }

  /* Fallback for core menu: vertical list on mobile */
  .main-nav ul.mod-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .main-nav ul.mod-menu > li > a,
  .main-nav ul.mod-menu > li > span {
    padding: 0.9em 0.8em;
    border-top: 1px solid rgba(0,0,0,0.08);
  }
}

/* Optional: hide Mobile Menu CK bar on desktop if it shows */
@media (min-width: 993px) {
  .mobilemenuck-bar {
    display: none;
  }
}

/* ===== Mobile tweaks ===== */
@media (max-width: 992px) {
  .slider-fullwidth {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
  }

  /* Jeśli slider ma stałą wysokość i wygląda źle na mobile,
     to ustaw minimalną wysokość (opcjonalnie) */
  .slider-fullwidth .dj-slideshow,
  .slider-fullwidth .dj-slideshow-fullwidth {
    min-height: 220px;
  }
}

/* Sekcja tylko na Home pod sliderem */
.home-section {
  padding: 32px 0;
}

/* szerokość jak menu */
.home-section__inner {
  padding-left: 25%;
  padding-right: 25%;
  margin-bottom: 75px;
  display: grid;
  grid-template-columns: 1fr 1fr; /* obraz | treść */
  gap: 24px;
  align-items: start;
}

.home-media img {
  width: 70%;
  height: 40%;
  display: block;
}

/* tablet */
@media (max-width: 1200px) {
  .home-section__inner {
    padding-left: 14%;
    padding-right: 14%;
  }
}

/* mobile */
@media (max-width: 992px) {
  .home-section__inner {
    padding-left: 16px;
    padding-right: 16px;
    grid-template-columns: 1fr;
  }
  .brand .moduletable,
  .brand .moduletable > * {
    margin: 0;
    padding: 0;
  }
}

.video-frame {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
}

.video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain; /* nie ucina, dopasowuje */
}
/* TOP IMAGE: nie rób flexa na <p>, bo robi wielki box łapiący klik */
.top-image-wrapper p {
	display: block !important;
}

/* wrappery nie mają przechwytywać klików */
.top-image-wrapper .custom,
.top-image-wrapper .custom > *,
.top-image-wrapper p {
	pointer-events: none;
}

/* ale sam obraz / link ma być klikalny */
.top-image-wrapper a,
.top-image-wrapper img {
	pointer-events: auto;
}

/* ===== FOOTER ===== */
.site-footer {
	width: 100%;
	font-family: "Open Sans", Helvetica, Arial, sans-serif;
  padding-top: 50px;
}

/* górny pasek */
.site-footer__top {
	background: #003e6b;
	color: #fff;
}

.site-footer__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 16px 20px;

	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.footer-left {
  max-width: 25%;          
	white-space: normal;  
	word-wrap: break-word;
	overflow-wrap: break-word;
	font-size: 12px;
	line-height: 1.5;
}

.footer-left a {
	color: #ffcc66;
	text-decoration: none;
}

.footer-left a:hover {
	text-decoration: underline;
}

.footer-right img {
	width: 36px;
	height: 36px;
	display: block;
}

/* dolny pasek */
.site-footer__bottom {
	background: #ffffff;
	color: #666;
	font-size: 13px;
	text-align: center;
	padding: 8px 16px;
	border-top: 1px solid rgba(0,0,0,0.08);
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
	.site-footer__inner {
    max-width: 100%;
		flex-direction: column;
		align-items: flex-start;
	}

	.footer-right {
		margin-top: 10px;
	}
  
}

/* ===== FOOTER: mobile fix ===== */
@media (max-width: 768px) {
  .site-footer__top {
    padding: 10px 0;                 /* trochę oddechu */
  }

  .site-footer__inner {
    padding: 14px 16px;
    flex-direction: column;
    align-items: stretch;            /* zamiast flex-start */
    gap: 12px;
  }

  .footer-left {
    max-width: 100% !important;      /* <-- kluczowe, usuwa wąski słupek */
    width: 100%;
    font-size: 8px;                 /* czytelniej na telefonie */
    line-height: 1.55;
  }

  .footer-right {
    margin-top: 6px;
    display: flex;
    justify-content: flex-start;     /* albo center, jeśli wolisz */
  }

  .footer-right img {
    width: 40px;                     /* minimalnie większa ikona */
    height: 40px;
  }

  .site-footer__bottom {
    font-size: 8px;
    padding: 10px 16px;
  }
}

/* ===== FIX: centrowanie KAŻDEGO rzędu menu (MaxiMenu CK) ===== */
@media (max-width: 2400px) {

  /* zabij legacy left-align z MaxiMenu */
  div[id^="maximenuck"] {
    text-align: center !important;
  }

  /* UL = flex container */
  .main-nav ul.maximenuck {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  /* KAŻDE LI MUSI BYĆ NEUTRALNE */
  .main-nav ul.maximenuck > li {
    position: static !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* LINKI – identyczna szerokość wizualna */
  .main-nav ul.maximenuck > li > a,
  .main-nav ul.maximenuck > li > span {
    display: block;
    padding: 12px 18px;
    text-align: center;
    white-space: nowrap;
  }

  /* AKTYWNY ELEMENT NIE MOŻE ROZSUWAĆ UKŁADU */
  .main-nav ul.maximenuck > li.active {
    margin: 0 !important;
  }
}

@media (max-width: 1400px) {

  /* kontener headera */
  .header-menu__inner {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* logo */
  .header-menu__inner .brand {
    order: 1;
    margin-bottom: 20px;
    text-align: center;
  }

  .header-menu__inner .brand img {
    max-width: 220px;
    height: auto;
  }

  /* menu */
  .header-menu__inner .main-nav {
    order: 2;
    width: 100%;
    justify-content: center !important;
  }

  /* UL MaxiMenu */
  .header-menu__inner .main-nav .maximenuck > ul {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
  }

  /* elementy menu */
  .header-menu__inner .main-nav .maximenuck > ul > li {
    float: none !important;
    text-align: center;
  }
}

@media (max-width: 1800px) {
  .main-nav .maximenuck {
    font-size: 16px;
  }
}

@media (max-width: 1500px) {
  .main-nav .maximenuck {
    font-size: 12px;
  }
}

@media (max-width: 920px) {
  .main-nav .maximenuck {
    font-size: 12px;
  }
}

/* domyślnie */
.home-media img {
  max-width: 100%;
  height: auto;
}

/* do 990px */
@media (max-width: 990px) {
  .home-media {
    display: flex;
    justify-content: center;
  }

  .home-media img {
    max-width: 50%;   /* zmniejszenie obrazu */
  }
}


@media (max-width: 600px) {
  .home-media img {
    max-width: 30%;
  }
}
/* ================= SEKCJA NAD NEWSAMI =================

/* ===== NEWS HEADER ===== */
.news-header {
  margin: 40px auto 16px auto;   /* auto = centrowanie jak slider */
  display: flex;
  flex-direction: column;
  align-items: flex-start;       /* LEWA krawędź */

  width: 100%;                  /* bierze szerokość kontenera */
  max-width: 1320px;            /* <<< TU MUSI BYĆ TO SAMO co slider */
  padding: 0 15px;              /* jeśli container ma padding */
}


.news-header__line {
  width: 100%;
  height: 7px;
  background-color: #0b4d6b;
  margin-bottom: 15px;
}

.news-header__title {
  margin: 0 0 50px 0;
  font-size: 1.6rem;
  font-weight: 600;
  color: #0b4d6b;
}


/* =================================================== */


/* ================= NEWS (JEDYNA WERSJA) ================= */

.news-slider{
  position: relative;
  margin: 1rem 0;
  overflow: visible; /* strzałki mogą wystawać */
}

/* Swiper ma UCINAĆ slajdy (żeby te poza widokiem były schowane) */
.newsSwiper{
  position: relative;
  overflow: hidden;
}

/* NIE używamy gap – spacing robi Swiper (spaceBetween) */
.newsSwiper .swiper-wrapper{
  gap: 0 !important;
}

/* KARTA */
.news-card{
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  height: 90%;
  display: flex;
  flex-direction: column;
}

/* DESKTOP: miejsce na obraz (wysokość 180px, szerokość = karta) */
.news-thumb{
  display: block;
  height: 180px;      /* “180” z Twojego 230x180 */
  overflow: hidden;
}

.news-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* STRZAŁKI – POZA Swiperem */
.news-arrow{
  width: 60px;
  height: 60px;
  border-radius: 1000px;
  background: #0b4d6b;
  border: 1px solid rgba(0,0,0,.18);
  box-shadow: 0 4px 12px rgba(0,0,0,.12);

  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;

  cursor: pointer;
  pointer-events: auto;
}

.news-arrow-prev{ left: -96px; }
.news-arrow-next{ right: -96px; }

.news-arrow::after{
  display: block;
  text-align: center;
  font-size: 18px;
  line-height: 44px;
  color: #df5600;
  content: "›";
}
.news-arrow:hover,
.news-arrow:focus-visible{
  background: #df5600;
  border-color: #df5600(11, 77, 107, .85);
  box-shadow: 0 4px 12px rgba(11, 77, 107, .28);
}

.news-arrow:hover::after,
.news-arrow:focus-visible::after{
  color: #0b4d6b;
}
.news-arrow-prev::after{ content: "‹"; }


/* ODSUNIĘCIE TEKSTU OD GÓRY I LEWEJ KRAWĘDZI */
.news-body {
  padding: 18px 18px 20px 18px; /* góra | prawo | dół | lewo */
}

/* Mobile / <1100px – trochę ciaśniej, ale nadal czytelnie */
@media (max-width: 1099px) {
  .news-body {
    padding: 16px 16px 18px 16px;
  }
}
/* READ MORE jako przycisk */
.news-btn,
.news-btn:visited{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: #0b4d6b;
  color: #ffffff;
  text-decoration: none;

  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.08);

  /* lekki cień */
  box-shadow: 3px 3px 10px rgba(0,0,0,.18);

  transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.news-btn:hover,
.news-btn:focus-visible{
  background: #df5600;
  color: #ffffff;
  text-decoration: none;

  /* cień w innym rogu */
  box-shadow: -3px 3px 10px rgba(0,0,0,.18);
}

/* ===== <1100px: karty NIE rozciągają się na całą szerokość ===== */
@media (max-width: 1099px) {

  /* slajd ma stałą szerokość jak desktop */
  .newsSwiper.swiper-vertical .swiper-slide {
    width: 420px !important;   /* <<< KLUCZ */
    max-width: 100%;
  }

  /* wyśrodkowanie slajdów w osi poziomej */
  .newsSwiper.swiper-vertical .swiper-wrapper {
    align-items: center;
  }

  /* sam swiper nie rozciąga kart */
  .newsSwiper {
    display: flex;
    justify-content: center;
  }
}
/* ===== LINKI: bez fioletu i bez podkreślenia, hover = tylko inny kolor ===== */
.news-slider a,
.news-slider a:visited {
  color: #0b4d6b;           /* wybierz swój kolor bazowy */
  text-decoration: none;
}

.news-slider a:hover,
.news-slider a:focus {
  color: #df5600;           /* hover = tylko zmiana koloru */
  text-decoration: none;
}

/* LINK-STYLE tylko dla przycisku Read more */
.news-slider a.news-btn,
.news-slider a.news-btn:visited{
  color: #ffffff;        /* kolor bazowy tekstu */
  text-decoration: none;
}

.news-slider a.news-btn:hover,
.news-slider a.news-btn:focus-visible{
  color: #ffffff;        /* hover = zmiana koloru tekstu */
  text-decoration: none;
}

@media (max-width: 1099px) {

  /* Swiper: miejsce na strzałki nad kartami */
  .newsSwiper {
    position: relative;
    padding-top: 64px;
    display: flex;
    justify-content: center;
  }

  /* 3 karty widoczne (window) */
  .newsSwiper.swiper-vertical{
    --news-gap: 12px;
    --news-slide-h: 370px;   /* większe, bo obraz + tekst */
    height: calc((3 * var(--news-slide-h)) + (2 * var(--news-gap))) !important;
    overflow: hidden !important;
  }

  .newsSwiper.swiper-vertical .swiper-wrapper{
    height: 100% !important;
    align-items: center;
  }

  .newsSwiper.swiper-vertical .swiper-slide{
    height: var(--news-slide-h) !important;
    width: 420px !important;
    max-width: 100%;
  }

  /* STRZAŁKI NAD BLOKIEM (wyśrodkowane) */
  .news-arrow{
    width: 60px;
    height: 60px;
    top: -70px;
    z-index: 9999;

    left: 50% !important;          /* wspólny środek */
    transform: translateX(-50%);    /* centrowanie bazowe */
  }

  .news-arrow::after{ line-height: 40px; }

  /* odstęp między przyciskami */
  .news-arrow-prev{ left: calc(50% - 44px) !important; }
  .news-arrow-next{ left: calc(50% + 44px) !important; }


  /* OBRAZ: tylko 10% mniejszy niż desktop (180 -> 162) */
  .news-thumb{
    height: 180px;
  }

  /* tekst: odstępy */
  .news-body{
    padding: 16px 16px 18px 16px;
    gap: 8px;
  }

  .news-title{ font-size: 1rem; }
  .news-btn{ padding: 12px 20px; }

  .news-intro{
    -webkit-line-clamp: 2;
  }

  .news-header__title {
    margin: 0 0 100px 0;
    font-size: 1.6rem;
    font-weight: 600;
    color: #0b4d6b;
  }

}
/* ------------------------------- */
