/* dkl24.pl - warstwa responsywna (telefon / tablet), wersja robocza 2026-11 */

/* Hamburger (wstawiany przez JS w layoucie) i menu mobilne - na komputerze ukryte */
.rwd_menu { display: none; }
#navigation_mobile { display: none; }

/* =========================  TABLET  901 - 1060 px (i baza dla mniejszych)  ========================= */
@media screen and (max-width: 1060px) {
  html { overflow-x: hidden; }
  body { overflow-x: clip; }
  body { min-width: 0 !important; display: block !important; padding: 0 !important; width: auto !important; }
  header, header .stripe, .reklama, .main_body, footer, .footer_frame,
  body > nav, .main_body > div, body > nav > div,
  .all_tags_box, #navigation_stopka {
    width: auto !important; max-width: 100% !important; box-sizing: border-box;
  }
  .main_body, body > nav { float: none !important; }
  header .stripe, .reklama, .main_body > div, body > nav > div, footer { padding-left: 12px; padding-right: 12px; }
  .left_column { width: 66% !important; box-sizing: border-box; }
  .right_column { width: 32% !important; box-sizing: border-box; }
  .left_column *, .right_column * { max-width: 100%; box-sizing: border-box; }
  img { max-width: 100%; height: auto; }
  .banner_box_frame, .banner_box { width: auto !important; max-width: 100% !important; height: auto !important; }
  .reklama_top { width: 74% !important; }
  .reklama_top_right { width: 24% !important; }
  #navigation_1 ul, #navigation_2 ul, #navigation_1, #navigation_2 { width: auto !important; }
  .div_scroller, .simply-scroll, .simply-scroll-clip { overflow: hidden !important; width: auto !important; max-width: 100% !important; }
  .simply-scroll-list, .simply-scroll-list li { max-width: none !important; }
  .simply-scroll-clip, .simply-scroll { height: 100px !important; }
}

/* =========================  TELEFON i TABLET w pionie  do 900 px  ========================= */
@media screen and (max-width: 900px) {
  body { font-size: 16px; line-height: 1.45; text-align: left !important; }

  /* główne kontenery: jedna kolumna */
  header, header .stripe, header .row, .reklama, .main_body, .main_body > div,
  .left_column, .right_column, article, .sliderNews, .slider_news_all,
  .show_newest, .newest, .article_category_all, .reklama_700, .div_scroller,
  .reklama_top, .reklama_top_right, .reklama_315, .article_category_component_header,
  .article_category_component_header > div, .article_category_component_header .title,
  #articlesPage, .article_in_category,
  .newest_na_drogach, .newest_ogloszenia, .newest_sport, .newest_kultura,
  .najnowsze_komentarze, .najczesciej_komentowane, .najnowsze_artykuly, .polecamy,
  .all_tags_box, #navigation_stopka, footer, .footer_frame, body > nav, body > nav > div {
    float: none !important; width: auto !important; max-width: 100% !important;
    margin-left: 0 !important; margin-right: 0 !important; box-sizing: border-box;
    height: auto !important; left: auto !important;
  }
  .main_body > div, .reklama, header .stripe, body > nav > div, footer { padding-left: 12px !important; padding-right: 12px !important; }
  .right_column div, .right_column ul, .right_column li, .left_column div:not(.sn-box):not(.sn-slice) { height: auto !important; }
  .right_column > div, .left_column > div, article > div { display: flow-root; }

  /* ---------- nagłówek: przypięty do góry ekranu, logo po lewej, ☰ po prawej ---------- */
  header { position: sticky !important; top: 0; z-index: 1000; background: #fff !important; box-shadow: 0 1px 6px rgba(0,0,0,.12); margin: 0 !important; padding: 0 !important; }
  header .stripe { position: relative !important; padding-top: 0 !important; padding-bottom: 0 !important; margin: 0 !important; height: 56px !important; }
  header .stripe .row { margin: 0 !important; }
  header .stripe .row + .row { height: 0 !important; padding: 0 !important; }
  header .stripe .row:first-child { padding: 0 56px 0 0 !important; height: 56px !important; display: flex !important; align-items: center; }
  header .logo { width: auto !important; float: none !important; margin: 0 !important; }
  header .logo a { display: block; width: 156px; height: 35px; background: url(images/logo-dkl24-2026.png) left center / contain no-repeat; }
  header .logo img { display: none !important; }
  header .search_box { display: none !important; }
  .rwd_menu {
    display: block !important; width: 44px !important; height: 44px !important;
    background: transparent !important; border: 0 !important; cursor: pointer; position: absolute !important;
    top: 6px !important; right: 4px !important; margin: 0 !important; opacity: 1 !important; float: none !important; z-index: 1001;
  }
  .rwd_menu::before {
    content: ""; position: absolute; left: 10px; right: 10px; top: 13px; height: 3px; background: #111;
    box-shadow: 0 8px 0 #111, 0 16px 0 #111; border-radius: 2px;
  }
  header .stripe nav { width: auto !important; height: auto !important; position: static !important; }

  /* górne menu serwisowe (LOGOWANIE, OGŁOSZENIA...) - na telefonie ukryte, jak na projekcie */
  #navigation_1 { display: none !important; }

  /* menu po kliknięciu ☰: białe tło, czarne pogrubione pozycje */
  header nav #navigation_mobile {
    position: absolute !important; top: 56px !important; right: 0 !important; left: 0 !important;
    width: auto !important; max-width: none !important; z-index: 1000; background: #fff !important;
    box-shadow: 0 10px 20px rgba(0,0,0,.18); border-top: 1px solid #e3e6ea; padding: 0 !important; height: auto !important;
    max-height: calc(100vh - 56px); overflow-y: auto;
  }
  #navigation_mobile .top, #navigation_mobile .bottom, #navigation_mobile li.ul_top, #navigation_mobile li.menu_top,
  #navigation_mobile li.menu_bottom, #navigation_mobile li.ul_bottom, #navigation_mobile span.l, #navigation_mobile span.r { display: none !important; }
  #navigation_mobile ul { list-style: none; margin: 0 !important; padding: 0 !important; width: auto !important; background: none !important; }
  #navigation_mobile li { float: none !important; width: auto !important; border-bottom: 1px solid #ececec; background: none !important; height: auto !important; }
  #navigation_mobile li:last-of-type { border-bottom: 0; }
  #navigation_mobile li a, #navigation_mobile li a span.t {
    display: block !important; padding: 14px 16px !important; color: #111 !important; font-size: 17px !important; font-weight: 700 !important;
    text-transform: none; height: auto !important; background: none !important; line-height: 1.25 !important;
  }
  #navigation_mobile li a span.t { padding: 0 !important; }

  /* menu kategorii pod nagłówkiem = to samo co w ☰ -> na telefonie ukryte */
  body > nav { display: none !important; }

  /* ---------- reklamy ---------- */
  /* flex z align-items: stretch - każdy baner dostaje pełną szerokość ekranu (przy "center" banery
     z treścią o szerokości procentowej zwijały się do zera i znikały) */
  .reklama { display: flex !important; flex-direction: column; align-items: stretch; margin: 0 0 10px !important;
             background: #f2f2f2; padding-top: 6px !important; padding-bottom: 2px !important; }
  .reklama::before { content: "REKLAMY"; order: -1; font-size: 10px; letter-spacing: .06em; color: #777; margin: 0 0 4px; text-align: left; }
  .reklama > div, .reklama_top, .reklama_top_right { display: block !important; float: none !important; width: auto !important; text-align: center; margin: 0 0 10px !important; }
  .reklama_top_right { order: 3; }
  .banner_box a { display: inline-block; max-width: 100%; }
  .banner_box { display: block !important; }
  .banner_box_frame, .banner_box { width: 100% !important; max-width: 100% !important; height: auto !important; padding: 0 !important; margin: 0 auto !important; overflow: visible !important; }
  .banner_box img, .banner_box object, .banner_box embed, .banner_box iframe { max-width: 100% !important; height: auto !important; display: block; margin: 0 auto; }
  .reklama_700, .reklama_315 { margin: 14px 0 !important; text-align: center; }
  .reklama_700 .title, .reklama_315 .title { display: none; }
  .reklama_700::before, .reklama_315::before { content: "REKLAMA"; display: block; font-size: 10px; letter-spacing: .06em; color: #777; margin: 0 0 4px; text-align: left; }

  /* ---------- obrazy i treść ---------- */
  .main_body img { max-width: 100% !important; height: auto !important; }
  .main_body iframe, .main_body video, .main_body embed, .main_body object { max-width: 100% !important; }
  .main_body table { display: block; max-width: 100%; overflow-x: auto; }

  /* ---------- slider na górze: zdjęcie z tytułem na dole ---------- */
  .sliderNews { margin: 0 -12px 8px !important; max-width: none !important; width: auto !important; }
  .slider_news_all_title { display: none !important; }
  .slider-wrapper1 { width: 100% !important; height: auto !important; }
  #slider1.snSlider {
    width: 100% !important; height: auto !important; aspect-ratio: 3 / 2; position: relative !important;
    background-size: 100% 100% !important; background-position: 0 0 !important; overflow: hidden;
  }
  .snSlider > a > img, .snSlider .sn-directionNav { display: none !important; }
  /* paski/kafelki animacji: skrypt liczy pozycje tła w pikselach dla obrazka w naturalnym rozmiarze,
     więc obrazek w każdym kafelku skalujemy do rozmiaru slidera (pełna szerokość ekranu, proporcja 3:2) */
  .snSlider .sn-slice, .snSlider .sn-box { background-size: 100vw calc(100vw * 2 / 3) !important; }
  .snSlider .sn-imageLink { position: absolute !important; inset: 0; width: auto !important; height: auto !important; z-index: 5; }
  .snSlider .sn-caption {
    position: absolute !important; left: 0 !important; right: 0 !important; bottom: 0 !important; top: auto !important;
    width: auto !important; height: auto !important; padding: 28px 12px 10px !important; box-sizing: border-box; opacity: 1 !important;
    background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,.8) 40%) !important; z-index: 6; pointer-events: none;
  }
  .snSlider .sn-caption p { float: none !important; width: auto !important; margin: 0 !important; height: auto !important; padding: 0 !important; }
  .snSlider .sn-caption .html-top { font-size: 18px !important; line-height: 1.25 !important; height: auto !important; color: #fff !important; }
  .snSlider .sn-caption .html-top * { color: #fff !important; }
  .snSlider .sn-caption .html-text { display: none !important; }
  .snSlider .sn-controlNav { display: none !important; }

  /* ---------- wyróżniony artykuł na stronach kategorii (Sport, Kultura...) ----------
     na komputerze opis stoi obok zdjęcia (position:absolute; left:375px !important),
     na telefonie: zdjęcie na całą szerokość, ciemny opis pod nim */
  .main_body .left_column .first_news, .main_body .left_column .first_news_box,
  .main_body .left_column .first_news_box_img, .main_body .left_column .first_news_box_content {
    float: none !important; position: static !important; left: auto !important; top: auto !important;
    width: auto !important; max-width: 100% !important; height: auto !important; max-height: none !important;
    margin: 0 !important; box-sizing: border-box;
  }
  .main_body .left_column .first_news { margin: 0 -12px 8px !important; max-width: none !important; border: 0 !important; padding: 0 !important; }
  .main_body .left_column .first_news_box_img img { width: 100% !important; height: auto !important; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
  .main_body .left_column .first_news_box_content { padding: 12px 12px 14px !important; }
  .main_body .left_column .first_news_box_content .title { font-size: 20px !important; line-height: 1.25 !important; min-height: 0 !important; margin-bottom: 6px !important; }
  .main_body .left_column .first_news_box_content .date { font-size: 13px !important; }
  .main_body .left_column .first_news_box_content .content { font-size: 15px !important; line-height: 1.45 !important; margin-top: 6px !important; }
  .left_column .second_news { clear: both; }

  /* ---------- listy z miniaturą (boks pod sliderem i lista kategorii) ---------- */
  .second_news { float: none !important; width: auto !important; margin: 0 !important; }
  .left_column .second_news_box { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid #e3e6ea; float: none !important; width: auto !important; margin: 0 !important; }
  .left_column .second_news_box_content_image, .left_column .second_news_box_content { float: none !important; width: auto !important; flex: 1 1 auto; margin: 0 !important; }
  .left_column .second_news_box .content, .left_column .second_news_box .bottom_box { display: none !important; }

  .article_in_category { display: flex !important; gap: 10px; padding: 12px 0 !important; border-bottom: 1px solid #e3e6ea; margin: 0 !important; }
  .article_in_category .photo, .left_column .second_news_box .photo {
    flex: 0 0 110px; width: 110px !important; height: auto !important; float: none !important; margin: 0 !important;
    padding: 0 !important; border: 0 !important; background: none !important;
  }
  .article_in_category .photo img, .left_column .second_news_box .photo img {
    width: 110px !important; height: 74px !important; object-fit: cover; display: block; border: 0 !important; padding: 0 !important; margin: 0 !important;
  }
  .article_in_category .text_image, .article_in_category .text { float: none !important; width: auto !important; flex: 1 1 auto; margin: 0 !important; padding: 0 !important; }
  .article_in_category .title, .article_in_category .title a, .left_column .second_news_box .title a { font-size: 16px !important; line-height: 1.3 !important; }
  .article_in_category .content, .article_in_category .category, .article_in_category .comments { display: none !important; }
  .article_in_category .date { font-size: 13px !important; color: #666; margin-top: 4px; }
  .article_in_category .content div, .article_in_category .content strong { font-weight: normal !important; text-align: left !important; display: inline; }
  .article_in_category .category, .article_in_category .comments { font-size: 12px !important; display: inline-block; margin-right: 10px; }

  /* paginacja */
  .sublinks_pages { display: flex !important; flex-wrap: wrap; justify-content: center; gap: 6px; width: auto !important; float: none !important; margin: 14px 0 !important; height: auto !important; }
  .sublinks_pages .page_counter { flex: 0 0 100%; text-align: center; }
  .sublinks_pages span, .sublinks_pages a { float: none !important; margin: 0 !important; }
  .sublinks_pages > span:not(.page_counter) { min-width: 40px; min-height: 40px; display: inline-flex !important; align-items: center; justify-content: center; }

  /* nagłówki sekcji */
  .article_category_component_header .title, .right_column h2, .right_column h3, .right_column .title, .most_box_title {
    font-size: 18px !important; height: auto !important; line-height: 1.3 !important; padding-top: 6px !important; width: auto !important;
  }

  /* ---------- prawa kolumna pod treścią ---------- */
  .right_column { margin-top: 16px !important; }
  .right_column li, .right_column li a { font-size: 15px !important; line-height: 1.35 !important; }
  .right_column li { padding: 6px 0 !important; float: none !important; width: auto !important; }
  .right_column .first_news, .right_column .first_news_box, .right_column .first_news_box_img, .right_column .first_news_box_content,
  .right_column .second_news, .right_column .second_news_box, .right_column .second_news_box_content_image, .right_column .article_box {
    float: none !important; width: auto !important; margin-left: 0 !important; margin-right: 0 !important;
  }
  .right_column .first_news_box_img { text-align: center; }
  .najnowsze_komentarze li, .najnowsze_komentarze li a { font-size: 15px !important; font-style: normal; }

  /* wszystkie boksy prawej kolumny (także warianty z sufiksem _K na stronie artykułu) */
  .right_column > div, .right_column > div > div, .right_column ul, .right_column .comment_in_box, .right_column .most_box {
    float: none !important; width: auto !important; max-width: 100% !important; margin-left: 0 !important; margin-right: 0 !important;
  }
  .right_column .comment_in_box { padding: 6px 0; border-bottom: 1px solid #eef0f2; font-size: 14px; }
  .right_column .most_box { display: flex; gap: 10px; padding: 8px 0; }
  .right_column .most_box .photo { flex: 0 0 90px; width: 90px !important; float: none !important; }
  .right_column .most_box .photo img { width: 90px !important; height: 60px !important; object-fit: cover; }
  .right_column .most_box .most_text_img { float: none !important; width: auto !important; flex: 1 1 auto; }

  /* pager: ikony strzałek w naturalnym rozmiarze */
  .sublinks_pages img { width: auto !important; max-height: 20px !important; }

  /* ---------- komentarze: jedna kolumna, dolna paginacja pod listą ---------- */
  .comments .comment { float: none !important; width: auto !important; max-width: 100% !important; box-sizing: border-box; }
  .comments .sublinks_pages { clear: both; }
  .comments .comment .ip { word-break: break-all; }

  /* ---------- tagi, stopka ---------- */
  .tagcloud { width: auto !important; }
  #navigation_stopka ul { width: auto !important; position: static !important; }
  #navigation_stopka li { float: none !important; width: auto !important; height: auto !important; }
  #navigation_stopka li a { display: block; padding: 8px 0 !important; font-size: 14px !important; }
  footer, .footer_frame { height: auto !important; }

  /* ---------- pasek cookies ---------- */
  #cookies_accepted { width: auto !important; left: 0 !important; right: 0 !important; margin: 0 !important; height: auto !important; background: rgba(40,40,40,.95) !important; }
  #cookies_accepted .cookies_info { width: auto !important; display: flex; align-items: center; gap: 8px; padding: 8px 12px !important; box-sizing: border-box; }
  #cookies_accepted .cookies_accepted_text { float: none !important; width: auto !important; flex: 1 1 auto; padding: 0 !important; }
  #cookies_accepted .cookies_accepted_text, #cookies_accepted .cookies_accepted_text * { white-space: normal !important; font-size: 13px !important; text-align: left !important; line-height: 1.35 !important; }
  #cookies_accepted .close_cookies_info { float: none !important; width: 32px !important; flex: 0 0 32px; text-align: center; }

  /* ---------- strona artykułu ---------- */
  article h1, h1.addStyle { font-size: 24px !important; line-height: 1.25 !important; height: auto !important; }
  .article_all, .article_body, .article_photo_all, .article_photo, .article_category_photo, .tags_relations, .comment_add, .comment_form_line {
    float: none !important; width: auto !important; max-width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; height: auto !important;
  }
  .article_body { font-size: 17px; line-height: 1.6 !important; }
  .article_body * { font-size: inherit !important; line-height: inherit !important; text-align: left !important; }
  .article_body img { display: block; margin: 12px auto !important; }
  .article_photo img, .article_category_photo img { width: 100% !important; height: auto !important; }
  .article_icons { text-align: right; }
  .article_created_at { text-align: left !important; font-size: 13px; color: #666; margin: 6px 0; }
  .comment_add input[type=text], .comment_add textarea, .comment_name_input input { width: 100% !important; box-sizing: border-box; font-size: 16px !important; }
}


/* ---------- v10: banery ----------
   Pierwszy baner jest teraz wstawiany przez serwer od razu w HTML (dkl24BannerRenderer),
   a <img> ma atrybuty width/height - przeglądarka sama rezerwuje miejsce o właściwych
   proporcjach, zanim obrazek się wczyta, więc treść pod spodem nie skacze.
   Tu tylko drobiazgi: */
@media (max-width: 1060px) {
  /* na tablecie desktopowy display:table-cell + width:auto dawał ramkę o szerokości 0 */
  .banner_box { display: block !important; }
  .banner_box_frame { width: 100% !important; }
  /* link inline-block stał na linii bazowej i dokładał ~6 px pod banerem */
  .banner_box > a { vertical-align: top; }
}

/* ---------- v11: strona Kontakt ----------
   Desktop: .content_tpl ma sztywne 700 px, dane kontaktowe (275 px) i formularz (253 px)
   stoją obok siebie na floatach, mapa ma szerokość w px - na telefonie formularz
   lądował poza ekranem. Tu wszystko jedno pod drugim, na pełną szerokość. */
@media (max-width: 1060px) {
  .content_tpl { width: auto !important; max-width: 100%; float: none !important; }
}
@media (max-width: 900px) {
  .content_tpl > .contact_data_text,
  .contact_form,
  .contact_bottom_gmap,
  .content_tpl .admin_form,
  .content_tpl .admin_form_captcha {
    float: none !important; width: auto !important; max-width: 100%; box-sizing: border-box;
  }
  .contact_form { margin-top: 20px; }
  .contact_form .contact_data input,
  .contact_form .contact_data select,
  .contact_form .contact_data textarea,
  .contact_form .contact_data_captcha input {
    width: 100% !important; max-width: 100%; box-sizing: border-box; font-size: 16px; /* 16px: iOS nie robi zoomu */
  }
  .contact_acction_map { height: auto !important; }
  /* ogólna reguła .left_column div {height:auto} zerowała mapę */
  #mapka { width: 100% !important; height: 300px !important; margin-left: 0 !important; }
  .content_tpl img, .content_tpl table, .content_tpl iframe { max-width: 100% !important; height: auto; }
  .content_tpl .admin_form { overflow-wrap: anywhere; }
}

