/* Resetowanie stylów marginesów i paddingów oraz box-sizing */
*, ::after, ::before {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Definicja kolorów głównych */
:root {
  --main-color: hsl(129, 47%, 45%); /* Kolor główny */
  --secondary-color: hsl(128, 43%, 26%); /* Kolor dodatkowy */
}

/* Ustawienie bazowego rozmiaru fontu i płynnego przewijania */
html {
  font-size: 62.5%; /* 1rem = 10px */
  scroll-behavior: smooth;
}

/* Stylizacja ciała dokumentu */
body {
  font-family: Roboto, sans-serif;
  font-size: 1.8rem; /* Domyślny rozmiar tekstu */
  background-color: #292929; /* Kolor tła */
  color: #ffffff; /* Kolor tekstu */
}

/* Stylizacja nawigacji */
nav {
  text-transform: uppercase; /* Wielkie litery */
}

/* Stylizacja logo w nawigacji */
.navbar-brand img {
  margin-left: 1em;
  width: 100px;
}

/* Stylizacja nagłówka strony */
header {
  position: relative;
  height: 320px;
  background-image: url(../img/header_new_mini.jpg); /* Tło nagłówka */
  background-size: cover;
  text-align: center;
  color: hsl(129, 47%, 45%); /* Kolor tekstu */
  text-shadow: 2px 2px 5px #000000; /* Cień tekstu */
  z-index: 0;
}

/* Dodanie cienia na obrazku w nagłówku */
.shadow {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: hsla(0, 0%, 0%, 0.685); /* Przezroczysty cień */
  z-index: -10;
}

/* Stylizacja tekstu w nagłówku */
.header-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
}

/* Galeria obrazów */
.gallery {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.gallery-image {
  max-width: 100%;
  height: auto;
  transition: transform 0.7s ease-in-out; /* Animacja powiększenia obrazu */
  cursor: pointer;
  margin-block: 30px;
}

.gallery-image:hover {
  transform: scale(1.1); /* Powiększenie obrazu przy najechaniu */
}

/* Modalne okno do powiększenia obrazów */
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9); /* Tło modala */
}

.modal-image {
  margin: auto;
  margin-top: 10vh;
  display: block;
  height: 100vh;
  max-width: 80%;
  max-height: 80%;
}

/* Przycisk zamknięcia modala */
.close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 50px;
  font-weight: bold;
  color: #ffffff;
  cursor: pointer;
}

/* Stylizacja przycisku "Skontaktuj się" w nagłówku */
.header-text .header-contact-btn {
  position: relative;
  margin-top: .3em;
  padding: .5em 1.5em;
  font-size: 1.6rem;
  color: #ffffff;
  background-color: var(--secondary-color);
  border-radius: 8px;
  text-decoration: none;
  overflow: hidden;
  z-index: 0;
}

.header-text .header-contact-btn::before {
  display: block;
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #208ed8; /* Kolor animacji przy najechaniu */
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s;
  z-index: -1;
}

.header-text .header-contact-btn:hover::before {
  transform-origin: left;
  transform: scaleX(1);
}

/* Stylizacja sekcji */
section {
  margin-top: 1.5em;
}

/* Stylizacja nagłówków */
h2 {
  font-size: 3rem;
  text-transform: uppercase;
  text-align: center;
}

/* Podkreślenie nagłówka */
.underline {
  background-color: var(--main-color);
  height: 3px;
  width: 50px;
  margin: 0 auto 1em;
}

/* Stylizacja sekcji "O nas" */
#about-us .about-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-indent: 50px; /* Wcięcie pierwszej linii */
}

#about-us .about-text img {
  margin-top: 1em;
  width: 300px;
}

/* Stylizacja sekcji usług */
#services h2 {
  padding-top: 1em;
}

#services .service-list h3 {
  font-weight: 700;
  text-transform: uppercase;
}

/* Ostatni element listy usług */
#services .service-list li:last-child {
  margin-bottom: 2em;
}

/* Stylizacja listy usług i akapitów */
#services .service-list h3, p {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

/* Stylizacja szczegółów kontaktowych */
.contact-details h3 {
  text-transform: uppercase;
}

.contact-name {
  text-transform: uppercase;
}

.contact-detail {
  font-size: 1.5rem;
  color: #ffffff;
}

/* Stylizacja galerii na mniejszych ekranach */
@media (max-width: 767px) {
  .gallery-image {
      cursor: default;
  }
  .gallery-image:hover {
      transform: none;
  }
}

.col-12.col-md-6 {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.col-12.col-md-6 h3 {
  margin-bottom: 0em; /* Dodanie odstępu między tytułem a obrazem */
}
