/* GŁÓWNE, NADRZĘDNE WYMUSZENIE CZCIONKI DLA SMARTFONÓW */
@media screen and (max-width: 768px) {
    /* Wymuszamy, aby każdy tekst w dziale galerii na telefonie miał 16 pikseli */
    .galeria #content,
    .galeria #content p,
    .galeria #content div,
    .galeria p,
    .galeria div,


  #content p {
    font-size: 16px !important;
    line-height: 1.6 !important;
    color: #333 !important;
    -webkit-text-size-adjust: none !important;
    text-size-adjust: none !important;
}

/* NOWA REGUŁA: Obniża tylko pierwszy akapit wewnątrz #content */
#content p:first-of-type {
    margin-top: 80px !important;
}
}


html { overflow-y: scroll; }

body {
  padding: 0px;
  margin: 0px;
  font-family: Verdana, sans-serif;
  font-size: 14px;
  color: rgb(64, 75, 53);
  background-color: #ffffff;
  position: relative;
}

figcaption {
  text-align: center;
  font-style: italic;
  font-size: 0.9em;
  color: #555555;
  margin-top: 8px;
  display: block;
}

.centered {
  display: block !important;
  text-align: center;
  margin: 1.5em auto;
  width: 100%;
}
.centered img {
  display: inline-block !important;
  max-width: 100%;
  height: auto;
}

ul li { margin-top: 1em; margin-bottom: 1em; }
img { border: 0px; margin: 0px; }
br { clear: both; }
.clear { display: none; border: none; background: transparent; }

/* GŁÓWNY KONTENER STRONY */
div.root {
  position: relative;
  width: 794px !important;
  max-width: 794px !important;
  margin-left: auto;
  margin-right: auto;
    --color-boxshadow: rgb(144, 145, 114); /* Dawny oliwkowy */
    --color-halo: rgb(79, 127, 183);       /* Dawny niebieski */
}

div.main {
  position: relative;
  top: -1em;
}

/* BANER U GÓRY W WITRYNIE */
div.banner {
  padding-top: 8px;
  padding-bottom: 16px;
  width: 794px !important;
  max-width: 794px !important;
  overflow: hidden !important;
}
div.banner img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
}




/* PRZYWRÓCENIE KULTOWEGO, DRZEWIASTEGO MENU BOCZNEGO - PEŁNA KOREKTA */
#menu, #menu.en {
  position: absolute !important;
  padding-top: 1em;
  left: 8px !important;
  width: 182px !important;
  white-space: normal !important;

  /* Układ Flexbox usuwający ukryte błędy pozycjonowania */
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
}

/* Wyrównanie głównych pozycji menu do lewej */
#menu div.item {
  display: block !important;
  margin-left: 0px !important;
  padding-left: 0px !important;
  text-align: left !important;
}

/* PRZYWRÓCENIE WCIĘCIA DLA PODMENU */
/* Ta reguła odsuwa całe sekcje podmenu w prawo, zachowując strukturę drzewiastą */
#menu div.children-container {
  display: block !important;
  margin-top: 1em !important;
  margin-bottom: 1em !important;
  margin-right: 0px !important;
  margin-left: 14px !important; /* Tutaj regulujesz głębokość wcięcia podmenu (np. 14px lub 1em) */
}

/* Zabezpieczenie elementów wewnątrz podmenu przed uciekaniem w prawo */
#menu div.children-container div.item {
  margin-left: 0px !important;
  padding-left: 0px !important;
}






#menu a, #menu.en a {
  text-decoration: none;
  color: rgb(64, 75, 53);
}
#menu b, #menu.en b {
  display: inline !important;
  font-weight: bold;
  color: rgb(64, 75, 53);
}

.avail { color: #007d00; }
.avail.sold { color: #b50000; }
.avail.orderable { color: #3946B9; }

/* ORYGINALNA RAMA TREŚCI (ZABEZPIECZONA I CZYSTA) */
div#content {
  position: absolute !important;
  left: 201px !important;
  width: 593px !important;
  max-width: 593px !important;
  text-align: justify;
  line-height: 150%;
  box-sizing: border-box !important;

}
div.root.galeria & { top: 16px; }
#content a { text-decoration: none; color: rgb(73, 122, 1); }
#content a:hover { color: #000000; }

div.galeriahome a, div.instrhome a, .thumbnail-cell a { color: rgb(64, 75, 53); }
div.galeriahome a:hover, div.instrhome a:hover, .thumbnail-cell a:hover { color: #000000; }
div.galeriahome, div.instrhome, .thumbnail-cell { color: rgb(64, 75, 53); }

td.thumbnail-cell { width: 33.33%; padding: 0px; }
div.thumbnail-cell { padding: 1ex; text-align: center; }
#content p, #content h1, #content h2, #content h3, #content h4, #content h5, #content h6 {
  margin-bottom: 1em;
  margin-right: 14px;
}

div.minimenu { font-size: 80%; margin-bottom: 1em; }
div.minimenu span.separator { margin-left: 1em; margin-right: 1em; }

div#copyright-notice p {
  text-align: center;
  color: rgb(78,78,78);
  font-weight: bold;
  font-size: 75%;
}
p.centered { text-align: center; }

#content img {
  max-width: 100%;
  height: auto;
}

div.root.galeria #content {
  margin-top: 20px;
  margin-left: 15px;
  margin-right: 15px;
}

div.item { margin-top: 0.5ex; }
div.item.first { margin-top: 0px; }

div.children-container {
  margin-top: 1em;
  margin-bottom: 1em;
  margin-left: 0px !important;
  margin-right: 0px;
}


.flr { float: right; margin-left: 2em; margin-bottom: 1em; margin-top: 1.1ex; }
.fll { float: left; margin-right: 2em; margin-bottom: 1em; margin-top: 1.1ex; }
table.thumbnails-table { width: 100%; }

/* STRZAŁKI NAWIGACJI W GALERII */
div.gallery-nav {
  margin: 0px 0px 15px 0px !important;
  padding: 0px !important;
  width: 100% !important;
}
div.gallery-nav div.inner {
  font-weight: bold;
  font-size: 16px;
  font-family: monospace;
  text-align: left !important;
}


/* ZMNIEJSZENIE I STYLIZACJA NAGŁÓWKÓW */
#content h1 {
    font-size: 20px !important;    /* Rozmiar czcionki dla głównego tytułu strony */
    font-weight: bold !important;  /* Pogrubienie */
    color: rgb(64, 75, 53) !important; /* Twój ciemnozielony kolor ink */
    margin-top: 16px !important;    /* Mały odstęp od góry baneru */
    margin-bottom: 20px !important; /* Ładny odstęp od tekstu poniżej */
}



#content h2 {
    font-size: 16px !important;    /* Rozdziały (modele szybowców) będą nieco mniejsze od H1 */
    font-weight: bold !important;
    color: rgb(64, 75, 53) !important;
    margin-top: 25px !important;   /* Odstęp od poprzedniego bloku tekstu */
    margin-bottom: 10px !important;
}

#content h3 {
    font-size: 14px !important;    /* Podrozdziały będą miały rozmiar zwykłego tekstu, ale z pogrubieniem */
    font-weight: bold !important;
    color: rgb(64, 75, 53) !important;
    margin-top: 15px !important;
    margin-bottom: 5px !important;
}

/* poniżej stare ustawienia tabeli */

table.tabulatura {
  table-layout: fixed;
  margin-left: 1px;
  border-collapse: collapse;
  border: solid #79851e 1px;
}
table.tabulatura td,
table.tabulatura th {
  width: 13px;
  height: 13px;
  text-align: center;
  border: solid #79851e 1px;
}
table.tabulatura td.fit {
  font-size: 75%;
}
table.tabulatura th {
  font-weight: bold;
}
table.tabulatura colgroup.odd {
  background-color: #CFCE73;
}
table.tabulatura caption {
  text-align: left;
}
div.tabelka-i-filmik {
  margin-left: 0px;
  margin-right: auto;
  float: left;
  padding-left: 0px;
}
div.tabelka-i-filmik div {
  margin-top: 1em;
  margin-bottom: 1em;
  text-align: center;
}
div.tabelka-i-filmik + * {
  clear: both;
}



/* REGUŁY DLA SMARTFONÓW */
@media (max-width: 850px) {
  body { font-size: 23px !important; }
  #menu { white-space: normal !important; }
  div#content { left: 191px !important; width: 603px !important; max-width: 603px !important; }
  img#the-image { float: none !important; width: 100% !important; max-width: 100% !important; margin: 10px auto 15px auto !important; }
  #imageinfo { float: none !important; width: 100% !important; max-width: 100% !important; }
  div.gallery-nav div.inner { text-align: center !important; }



}






/* 1. Definicja dawnego niebieskawego koloru poświaty */
:root {
    --color-halo-blue: rgb(79, 127, 183);
}


/* 2. Nałożenie NIEBIESKIEJ poświaty na wszystkie zdjęcia w treści z pominięciem nawigacji */
#content img:not(.gallery-nav img):not(.widget img):not(.next img):not(.last img) {
    box-shadow: 0 0 12px 2px var(--color-halo-blue) !important;
    -webkit-box-shadow: 0 0 12px 2px var(--color-halo-blue) !important;
    -moz-box-shadow: 0 0 12px 2px var(--color-halo-blue) !important;
}



/* 3. Bezwarunkowe usunięcie jakichkolwiek cieni i poświat z głównego BANERU strony */
div.banner img,
#header img,
.banner img,

div.banner {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}




/* Dodanie bezpiecznego odstępu tekstu od prawej krawędzi */
#content {
    padding-right: 15px !important;
}




/* Korekta pozycji zdjęcia na środku ekranu - TYLKO TELEFONY */
@media (max-width: 850px) {
    #content img,
    #content p img {
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
        float: none !important;
    }
}










/* Stylizacja nagłówków H1, H2, H3 - TYLKO DLA SMARTFONÓW */
@media (max-width: 850px) {
#content h1 {
    font-size: 26px !important;    /* Rozmiar czcionki dla głównego tytułu strony */
    font-weight: bold !important;  /* Pogrubienie */
    color: rgb(64, 75, 53) !important; /* Twój ciemnozielony kolor ink */
    margin-top: 20px !important;    /* Mały odstęp od góry baneru */
    margin-bottom: 20px !important; /* Ładny odstęp od tekstu poniżej */
}

#content h2 {
    font-size: 24px !important;    /* Rozdziały (modele szybowców) będą nieco mniejsze od H1 */
    font-weight: bold !important;
    color: rgb(64, 75, 53) !important;
    margin-top: 25px !important;   /* Odstęp od poprzedniego bloku tekstu */
    margin-bottom: 10px !important;
}

#content h3 {
    font-size: 24px !important;    /* Podrozdziały będą miały rozmiar zwykłego tekstu, ale z pogrubieniem */
    font-weight: bold !important;
    color: rgb(64, 75, 53) !important;
    margin-top: 15px !important;
    margin-bottom: 5px !important;
  }

}/* Pełna i ostateczna naprawa wszystkich 4 strzałek i numeracji na telefonach */
@media (max-width: 850px) {
    /* 1. Zabezpieczenie kontenera przed łamaniem linii */
    div.gallery-nav div.inner {
        white-space: nowrap !important;
        display: block !important;
        text-align: center !important;
        width: 100% !important;
    }

    /* 2. Zastosowanie reguły do WSZYSTKICH elementów (lewe strzałki, numery, prawe strzałki) */
    div.gallery-nav span.widget,
    div.gallery-nav span.pagenum,
    div.gallery-nav .widget,
    div.gallery-nav .pagenum,
    div.gallery-nav .next,
    div.gallery-nav .last {
        display: inline-block !important;
        float: none !important;
        vertical-align: middle !important;
    }

    /* 3. Wymuszenie równego rozmiaru dla WSZYSTKICH 4 grafik strzałek */
    div.gallery-nav span.widget img,
    div.gallery-nav .widget img,


    div.gallery-nav .next img,
    div.gallery-nav .last img {
        width: 32px !important;
        max-width: 32px !important;
        height: auto !important;
        margin: 0 4px !important; /* Estetyczne odstępy między ikonami */
        padding: 0 !important;


        display: inline-block !important;
        float: none !important;
    }
}


/* poniżej padding to odległość obrazka od obrazka (strzałki) (mała duża galeria w telefonie) */

 @media  (max-width: 850px) {
    }
    .first { padding-left: 0px; padding-right: 6px }
	.pagenum { padding-left: 10px; padding-right: 10px; }
    .last { padding-left: 10px; padding-right: 0px }

}

/* Poprawna wersja reguł nawigacji dla obrazków typu widget */
.widget img {
    display: inline-block;
}

.widget img .first {
    padding-left: 0px;
    padding-right: 6px;
}

.widget img .pagenum {
    padding-left: 10px;
    padding-right: 10px;
}

.widget img .last {
    padding-left: 10px;
    padding-right: 0px;
}



/* CAŁKOWITA BLOKADA SZTUCZNEGO ZMNIEJSZANIA CZCIONEK PRZEZ SMARTFONY */
.gallery-container,
.gallery-container p,
div[style*="text-align:left"],
div[style*="text-align:center"] p {
    -webkit-text-size-adjust: none !important;
    -moz-text-size-adjust: none !important;
    -ms-text-size-adjust: none !important;
    text-size-adjust: none !important;
}

/* MOBILNE WYMUSZENIE WIELKOŚCI CZCIONKI DLA SMARTFONÓW */
@media screen and (max-width: 768px) {
    .gallery-container p,
    div[style*="text-align:left"] {
        font-size: 16px !important;
        line-height: 1.6 !important;
    }
}

/* ABSOLUTNE WYMUSZENIE ROZMIARÓW DLA GALERII PRACROWNI PROMYK DLA SMARTFONÓW */
@media screen and (max-width: 768px) {
    /* 1. Powiększamy tekst powitalny galerii głównej oraz ogólne bloki opisowe */
    #content p,
    #content div,
    div[style*="line-height"],
    div[style*="font-size:14px"],
    div[style*="font-size:15px"] {
        font-size: 16px !important;
        line-height: 1.6 !important;
        color: #333 !important;
    }

    /* 2. Wchodzimy precyzyjnie do kafelków miniatur i powiększamy opisy pod instrumentami */
    .gallery-item-box p,
    .gallery-container p,
    div[style*="width:210px"] p {
        font-size: 16px !important;
        line-height: 1.6 !important;
    }

    /* 3. Powiększamy małe przyciski nawigacyjne (Poprzedni / Następny) pod miniaturkami zdjęć */
    div[style*="margin-bottom:12px"] a,
    div[style*="font-size:11px"] a,
    div[style*="font-size:12px"] a,
    div[style*="font-size:13px"] a,
    .gallery-item-box div a {
        font-size: 15px !important; /* Zwiększamy rozmiar liter samych guzików */
        font-weight: bold !important;
        padding: 6px 10px !important; /* Zwiększamy pole dotykowe dla kciuka */
        display: inline-block !important;
        background: #f9f9f9 !important;
        border: 1px solid #ddd !important;
        border-radius: 3px !important;
        text-decoration: none !important;
    }

    /* 4. Powiększamy ceny pod instrumentami */
    .gallery-item-box p[style*="color:#d32f2f"],
    div[style*="color:#d32f2f"] {
        font-size: 17px !important;
        margin-top: 8px !important;
    }
}


/* WYMUSZENIE DUŻEJ CZCIONKI DLA ODNALEZIONEJ KLASY GALERII NA SMARTFONIE */
@media screen and (max-width: 768px) {
    /* Uderzamy prosto w strukturę, którą znalazłeś w szablonie */
    .root.galeria #content,
    .root.galeria #content p,
    .root.galeria #content div,
    .root.galeria p,
    .root.galeria div {
        font-size: 16px !important;
        line-height: 1.6 !important;
        color: #333 !important;
        -webkit-text-size-adjust: none !important;
        text-size-adjust: none !important;
    }
}
