/* ======= RESET GLOBALNY ======= */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    background-color: #fff;
    color: #000;
    line-height: 1.4;
    margin: 0;
    padding: 0;
    
}

img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    font-size: 100%;
    border: none;
    background: none;
    cursor: pointer;
}

ul, ol {
    list-style: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* ======= PARAMETRY DOMYŚLNE ======= */
:root {
  
  --content-title-justify: center;
  --content-subtitle-justify: center;
  
  --hero-max-height: 400px;
}


/* ======= KOLORY DOMYŚLNE NOC ======= */

@media (prefers-color-scheme: dark) {
  
:root {
--title-text-color: rgba(255, 255, 255, 0.702);
--title-hover-color: rgb(255, 255, 255);

--menu-text-color: rgba(255, 255, 255, 0.695);
--menu-bg-color: rgba(238, 238, 238, 0);
--menu-hover-bg: rgba(255, 255, 255, 0.178);
--menu-active-color: rgba(255, 255, 255, 0.785);
--menu-active-bg: rgba(175, 175, 175, 0.307);
--menu-line-color: rgba(255, 255, 255, 0);

--content-title-color: #eee;
--content-subtitle-color: #aaa;

--content-text-color: #aaa;
--page-bg-color: #222;
--content-link-color: #fff;
--content-hover-color: #ccc;
--content-underline-color: #999;
--content-separator-color: rgba(255, 255, 255, 0.1);

--footer-text-color: rgba(255, 255, 255, 0.5);
--footer-link-color: rgba(251, 251, 251, 0.7);
--footer-hover-color: rgb(253, 253, 253);
--footer-bg-color: rgba(82, 82, 82, 0);
}


body.start-page {
background-image: url('main_cover_night.jpg'); /* Twój obrazek */


}


}

/* ======= KOLORY DOMYŚLNE DZIEŃ ======= */

@media (prefers-color-scheme: light) {

:root {
--title-text-color: rgb(44, 44, 44);
--title-hover-color: rgb(82, 82, 82);

--menu-text-color: rgb(33, 33, 33);
--menu-bg-color: rgba(238, 238, 238, 0);
--menu-hover-bg: rgba(191, 191, 191, 0.5);
--menu-active-color: rgba(0, 0, 0, 1);
--menu-active-bg: rgba(196, 196, 196, 0.424);
--menu-line-color: rgba(255, 255, 255, 0);

--content-title-color: #111;
--content-subtitle-color: #222;

--content-text-color: #222;
--page-bg-color: #fff;
--content-link-color: #777;
--content-hover-color: #000;
--content-underline-color: #ccc;
--content-separator-color: rgba(0, 0, 0, 0.1);


--footer-text-color: rgb(33, 33, 33);
--footer-link-color: rgb(255, 255, 255);
--footer-hover-color: rgb(0, 0, 0);
--footer-bg-color: rgba(0, 0, 0, 0);
}


body.start-page {
background-image: url('main_cover_day.jpg'); /* Twój obrazek */
}

}



/* ====== BODY ====== */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* zawsze minimum wysokość okna */
    font-family: "Lato", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 17px;
    user-select: none;
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none;     /* IE/Edge starsze */
    
}



body.start-page {

    background-size: cover;      /* wypełnia całą przeglądarkę */
    background-position: center; /* wyśrodkowanie */
    background-repeat: no-repeat;
    background-attachment: fixed; /* tło nie przewija się z treścią */
}



#main-title {
  color: var(--title-text-color);
    cursor: pointer;
    transition: color 0.3s;
    text-align: center;
    margin-top: 5px;
    font-style: italic;
    font-weight: 800;
}

#main-title:hover {
    color: var(--title-hover-color);

}


#main-title-wrapper {
  display: flex;
  align-items: center; /* wyrównanie pionowe obrazka i tekstu */
  justify-content: center; /* wyśrodkowanie całości na stronie */
  gap: 0px; /* odstęp między miniaturką a tytułem */
}

#main-title-wrapper h1 {
  margin: 0;
}

#main-thumb {
  width: 50px; /* dopasuj rozmiar miniaturki */
  height: 50px;
  border-radius: 50%; /* jeśli chcesz okrągłą miniaturkę */
  object-fit: cover;
}


hr {
  border: 0;
  border-top: 1px solid var(--menu-line-color);
}


/* Wrapper dla głównej zawartości */
#page-content {
    flex: 1; /* zajmuje całą pozostałą przestrzeń między headerem a stopką */
}

/* ====== MENU GALERII ====== */
#galleries {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* centruje elementy poziomo */
  gap: 8px;
  margin-bottom: 15px;
  padding: 0px 0; /* dodatkowy odstęp wokół menu */
}

.gallery-item {
  font-size: 1rem;
  padding: 2px 6px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s, color 0.3s;
  color: var(--menu-text-color);
  background-color: var(--menu-bg-color);
}

.gallery-item:hover {
  background-color: var(--menu-hover-bg);
}

.gallery-item.active {
  /* font-weight: bold; */
  color: var(--menu-active-color);
  background-color: var(--menu-active-bg);
}

/* ====== CONTENT ====== */
#content {
    opacity: 1;
    transition: opacity 0.4s ease;
}

#content.fade-out {
    opacity: 0;
}

.gallery-info {
  max-width: 800px;
  margin: 0 auto 20px;
  padding: 20px;
}

/* ======  ====== */
.hero {
    width: 100%;
    max-height: var(--hero-max-height);
    object-fit: cover;
    display: block;
    margin-bottom: 0px;
    opacity: 1 !important;
    pointer-events: none;
    border: 0;
    
}

/* ====== MINIATURY ====== */
.thumb-container {
    column-width: 250px;  /* minimalna szerokość kolumny */
    column-gap: 15px;     /* odstęp między kolumnami */
    margin: 10px 100px;
}

.thumb-wrapper {
    display: inline-block;  /* konieczne dla multi-column */
    width: 100%;
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 0px;
    position: relative;
}

.thumb-wrapper img:not(.hero) {
    width: 100%;
    height: auto;      /* zachowanie proporcji */
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.4s ease, opacity 0.4s ease !important;
}

.thumb-wrapper img:not(.hero):hover {
    transform: scale(1.05);
}

/* ====== RESPONSYWNOŚĆ ====== */
@media (max-width: 480px) {
  .thumb-container {
      column-width: 150px;  /* minimalna szerokość kolumny */
      column-gap: 15px;     /* odstęp między kolumnami */
      margin: 10px 20px;
  }
}

/* ====== LIGHTBOX ====== */
#lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

#lightbox img {
  max-width: 100%;
  max-height: 100%;
  vertical-align: middle;
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
  margin: auto;
}

#lightbox button {
    position: absolute;
    /* top: 50%; */
    transform: translateY(-50%);
    font-size: 30px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    user-select: none;
    opacity: 1;
    transition: opacity 0.5s ease;
}

#prev-btn { left: 10px; }
#next-btn { right: 25px; }

#close-btn {
    top: 20px;
    right: 30px;
    transform: none;
    font-size: 45px;
}

#fullscreen-btn {
    top: 20px;
    right: 60px;
    transform: none;
    font-size: 18px;
}

/* Ukrywanie po chwili nieużywania */
#lightbox.hide-buttons button {
    opacity: 0;
}



/* ====== STOPKA ====== */
#site-footer {
    background-color: var(--footer-bg-color);
    color: var(--footer-text-color);
    padding: 20px 10px;
    text-align: center;
    font-size: 0.9rem;
}

#site-footer a {
    color: var(--footer-link-color);
    margin: 0 10px;
    text-decoration: none;
    transition: color 0.3s;
}

#site-footer a:hover {
    color: var(--footer-hover-color);
}

.footer-socials {
    margin-bottom: 10px;
}

.footer-info {
    font-size: 0.8rem;
    color: var(--footer-text-color);
}



/* ====== KONTENT ====== */


body, html {
  background-color: var(--page-bg-color);
}

.gallery-info{
  color: var(--content-text-color);
  
}

.gallery-info p{
margin-bottom: 0.5rem;
  
}
.gallery-info p strong{
font-weight: 800;
  
}

.gallery-info p a{
color: var(--content-link-color);
text-decoration: underline;
text-decoration-color: var(--content-underline-color);
  
}

.gallery-info p a:hover{
color: var(--content-hover-color);
  
}

.gallery-info h1 {
  color: var(--content-title-color);
  font-size: 2.2rem;
  font-weight: bold;
  font-style: italic;
  margin-top: 2.0rem;
  margin-bottom: 2.0rem;
  text-align: var(--content-title-justify);
}

.gallery-info h2 {
  color: var(--content-subtitle-color);
  font-size: 1.7rem;
  font-weight: bold;
  font-style: italic;
  margin-top: 2.9rem;
  margin-bottom: .9rem;
  text-align: var(--content-subtitle-justify);
}

.gallery-info hr {
  border: 0;
  border-top: 1px solid var(--content-separator-color);
  margin-top: 2.0rem;
  margin-bottom: 2.0rem;
}


.content-img {
    max-width: 100%;
    height: auto;
    margin: 1em 0;
    display: block;
}