:root {
  --primary-color: #2f8ee5;
  --header-primary-color: #2f8de59f;
  --secondary-color: #56aded;
  --red-color: #fe4646;
  --dark-red-color: #ab2a2a;
  --white-color: #fff;
  --lato-font: "Lato", sans-serif;
  --playfair-font: "Playfair Display", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  background-color: var(--primary-color);
  font-family: var(--lato-font);
  width: 100vw;
}

#notification {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #30a6a888;
  border-radius: 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 20px;
  position: fixed;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999999999;
  transition: top 0.5s ease-in-out;
}

#notification.show {
  top: 20px;
}

#notification_message {
  max-width: 400px;
  font-size: 20px;
  margin-left: 20px;
}

header,
header div,
header nav,
header ul {
  display: flex;
  justify-content: center;
  align-items: center;
}

header {
  position: fixed;
  background-color: var(--header-primary-color);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  width: 100vw;
  height: auto;
  justify-content: space-between;
  top: 0;
  right: 0;
  left: 0;
  z-index: 999999;
  border-bottom: 1px solid black;
  box-sizing: border-box;
}

header nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

header div img {
  width: auto;
  height: 70px;
  margin: 10px;
  border-radius: 10px;
}

header div h1 {
  color: var(--white-color);
  font-size: 25px;
  font-weight: 300;
}

header li {
  list-style: none;
}

header a {
  text-decoration: none;
  color: var(--white-color);
}

nav ul {
  width: 40vw;
}

nav ul li {
  margin: 20px;
}

#log-in-header {
  border: 1px solid var(--white-color);
  padding: 15px 35px 15px 35px;
  margin-right: 20px;
  border-radius: 8px;
}

#popup {
  position: fixed;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--white-color);
  z-index: 999999999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 20px;
  box-sizing: border-box;
  overflow-y: scroll;
}

#my_profile_pic_mobile {
  padding: 0 !important;
  margin: 0 !important;
}

#my_profile_pic_mobile img {
  border-radius: 50%;
}

#account-circle {
  position: relative;
  display: inline-block; /* Umożliwia pojawianie się menu w kontekście diva */
}

#account-circle img {
  height: 70px;
  width: auto;
  border-radius: 50%;
  margin-right: 10px;
}

.account-menu {
  position: absolute;
  display: none;
  background-color: rgba(217, 217, 217, 0.8);
  padding: 10px;
  border-radius: 20px;
  top: 90%; /* Umieszczenie tuż pod obrazkiem */
  left: 50%;
  transform: translateX(-90%); /* Centrowanie */
  width: 200px; /* lub inna szerokość według potrzeb */
  box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2); /* Cień dla lepszego efektu */
  z-index: 1000;
}

.account-menu a {
  display: block;
  color: black; /* Kolor tekstu */
  padding: 8px 16px; /* Padding dla linków */
  text-decoration: none; /* Brak podkreślenia */
  border-bottom: 1px solid black; /* Linia rozdzielająca */
  text-align: center;
}

.account-menu a:last-child {
  border-bottom: none; /* Usuwa linię u ostatniego elementu */
}

#account-circle:hover .account-menu {
  display: block; /* Pokazuje menu po najechaniu */
}

#popup h1,
#popup h2 {
  text-align: center;
}

#content {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px;
  max-width: 600px;
  justify-content: center;
}

#town_input {
  font-size: 20px;
  padding: 10px;
  border-radius: 8px;
}

#town_input::placeholder {
  color: #888;
  opacity: 1;
}

.profile_pic img {
  cursor: pointer;
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(90, 90, 90, 0.5);
  transition: transform 0.3s ease-in-out;
}

.profile_pic img:hover {
  transform: scale(1.1);
}

.profile_pic {
  position: relative;
  display: inline-block;
}

.profile_pic.selected::after {
  content: "✔";
  color: white;
  font-size: 24px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  background-color: rgba(50, 50, 50, 0.8);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#saveButton {
  display: none;
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #308ee4;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#saveButton_town {
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #308ee4;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.popup-closing {
  animation: fadeOut 0.5s forwards;
}

main {
  display: grid;
}

.hero {
  position: relative;
  height: 100vh;
  display: flex;
  justify-content: flex-start;
  overflow: hidden;
}

.hero img {
  position: absolute;
  width: 100%;
  height: 100vh;
  background-image: url("img/main_page/main_postcard.jpg");
  background-position: center; /* Centruje obraz w poziomie i pionie */
  background-size: cover; /* Zapewnia pokrycie całej dostępnej przestrzeni, zachowując proporcje */
  background-repeat: no-repeat;
  z-index: -1;
}

.hero-content {
  width: 100vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0) 100%
  );
}

.hero-content h2 {
  font-size: 110px;
  font-family: var(--playfair-font);
  color: var(--white-color);
  text-align: center;
  margin: 0;
  margin-bottom: 30px;
}

.hero-content a {
  background-color: var(--red-color);
  border-radius: 8px;
  font-size: 25px;
  color: white;
  text-decoration: none;
  font-weight: 300;
  padding: 10px 60px 10px 60px;
}

#postcrossing-def {
  background-color: var(--secondary-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 800px;
  justify-self: center;
  text-align: center;
  padding: 40px;
  margin-top: 100px;
  margin-bottom: 100px;
}

#postcrossing-def h3 {
  color: var(--dark-red-color);
  font-family: var(--playfair-font);
  font-size: 36px;
  margin: 0;
}

#postcrossing-def h4 {
  color: var(--white-color);
  font-size: 30px;
  margin: 0;
  font-weight: 400;
  margin-top: 20px;
}

#how-it-works {
  display: flex;
  justify-content: space-between;
  margin: 40px;
  color: var(--white-color);
}

#how-it-works section h3 {
  font-size: 40px;
  font-family: var(--playfair-font);
  margin-bottom: 0;
}

#how-it-works section h4 {
  font-size: 20px;
  font-weight: 400;
  margin-top: 20px;
  margin-bottom: 80px;
}

#how-it-works section a {
  font-size: 15px;
  font-weight: 400;
  color: var(--white-color);
  text-decoration: none;
  border: 1px solid var(--white-color);
  border-radius: 8px;
  padding: 10px 40px 10px 40px;
}

#infos {
  background-color: var(--secondary-color);
  display: flex;
  justify-content: space-evenly;
  padding: 60px;
  color: var(--white-color);
}

.info {
  width: calc((100vw - 120px) / 4);
}

.info img {
  height: 40px;
  width: auto;
}

.info h5 {
  font-size: 25px;
  font-weight: 500;
  margin: 10px 0 10px 0;
  width: max-content;
}

.info h6 {
  font-size: 20px;
  font-weight: 300;
  margin: 0;
}

#why_us {
  padding: 30px;
}

#why_us h3 {
  font-size: 60px;
  color: var(--white-color);
  font-family: var(--playfair-font);
  margin-bottom: 0;
}

#why_us h6 {
  font-size: 20px;
  color: var(--white-color);
  font-weight: 300;
}

#container {
  display: flex;
  justify-content: space-around;
}

.block {
  border: 1px solid var(--white-color);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 15px;
}

.block h5,
.block h6 {
  margin: 0;
}

#container > .block:nth-child(1) img {
  background-image: url("img/main_page/poland.jpeg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  width: 100%;
  height: 20vw;
}

#container > .block:nth-child(2) img {
  background-image: url("img/main_page/postcard.webp");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  width: 100%;
  height: 20vw;
}

#container > .block:nth-child(3) img {
  background-image: url("img/main_page/poland2.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  width: 100%;
  height: 20vw;
}

.block-under-img {
  padding: 30px;
  width: 23vw;
}

.block-h6-overtop {
  font-size: 15px !important;
  margin-bottom: 20px !important;
}

.block h5 {
  color: var(--white-color);
  font-size: 30px;
  font-weight: 300;
  width: 70%;
  margin-bottom: 20px;
}

.block-h6-overbottom {
  margin-bottom: 25px !important;
}

.block a {
  color: var(--white-color);
  text-decoration: none;
}

#comment {
  display: grid;
  justify-content: center;
  justify-items: center;
  align-items: center;
  margin-top: 100px;
  margin-bottom: 100px;
}

#comment img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
}

#comment h5 {
  color: var(--white-color);
  font-size: 30px;
  font-weight: 400;
  width: 500px;
  text-align: center;
  margin-top: 10px;
  margin-bottom: 10px;
}

#comment h6 {
  color: var(--white-color);
  text-align: center;
  font-size: 15px;
  font-weight: 300;
  margin-top: 0;
}

#contact {
  background-color: var(--secondary-color);
  border-radius: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 80vw;
  justify-self: center;
}

#left-contact,
#right-contact {
  width: 50%;
  margin-top: 60px;
  margin-bottom: 60px;
  margin-left: 60px;
  margin-right: 40px;
  display: grid;
}

#left-contact h2 {
  color: var(--white-color);
  font-size: 60px;
  font-family: var(--playfair-font);
  margin: 0;
}

#left-contact h3 {
  color: var(--white-color);
  font-size: 30px;
  margin: 0;
  font-weight: 300;
}

#send-message-form {
  background-color: var(--red-color);
  border: none;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--white-color);
  font-size: 15px;
  padding: 10px 30px 10px 30px;
  margin-top: 30px;
  cursor: pointer;
}

#send-message-form img {
  width: 30px;
  height: 30px;
  margin: 5px;
}

#contact_container {
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: fixed;
  z-index: 9999999;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  color: #ffffff;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

#contact_container.visible {
  opacity: 1;
  visibility: visible;
}

#close_btn {
  position: absolute;
  right: 20px;
  top: 20px;
  background-color: #444;
  border-radius: 50%;
  font-size: 24px;
  padding: 5px 12px;
  cursor: pointer;
  color: #fff;
}

#send_info {
  margin-bottom: 20px;
  font-size: 24px;
}

#contact_container input,
#contact_container textarea {
  width: 80%; /* Adjust width according to preference */
  padding: 12px;
  margin-bottom: 15px;
  background-color: #fff;
  border: none;
  border-radius: 10px;
  color: #222;
  font-family: var(--lato-font);
  font-size: 15px;
}

#contact_container button {
  font-size: 20px;
  color: #fff;
  background-color: #4c7daf;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#contact_container button:hover {
  background-color: #36597d;
}

#content input::placeholder {
  color: var(--white-color);
}

.address {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  color: var(--white-color);
}

.address img {
  width: 30px;
  height: 30px;
}

.address-more {
  display: flex;
  flex-direction: column;
  margin-left: 20px;
}

.address-more h4 {
  margin: 0;
}

.address-more a {
  color: var(--white-color);
}

footer {
  display: flex;
  width: calc(100vw - 120px);
  color: var(--white-color);
  padding: 60px;
}

footer a {
  color: var(--white-color);
  text-decoration: none;
}

#left-footer,
#right-footer {
  display: flex;
  flex-direction: column;
}

#left-footer {
  width: 60vw;
}

#right-footer {
  width: 40vw;
  height: 200px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: stretch;
}

#left-footer h2 {
  font-size: 40px;
  font-family: var(--playfair-font);
}

#left-footer h6 {
  font-size: 20px;
  font-weight: 300;
  margin: 10px 0 10px 0;
}

#social a img {
  width: 40px;
  height: 40px;
  margin: 10px;
}

.right-footer-more {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

.right-footer-more h6 {
  text-transform: uppercase;
  opacity: 0.6;
  font-size: 15px;
  font-weight: 400;
}

@media (min-width: 1000px) {
  #mobile-header {
    display: none;
  }
}

@media (max-width: 1000px) {
  #mobile-header {
    display: flex;
  }

  #mobile-header div {
    padding-right: 20px;
  }

  .burger {
    position: relative;
    width: 40px;
    height: 30px;
    background: transparent;
    cursor: pointer;
    display: block;
    margin-left: 20px;
  }

  .burger input {
    display: none;
  }

  .burger span {
    display: block;
    position: absolute;
    height: 4px;
    width: 100%;
    background: black;
    border-radius: 9px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: 0.25s ease-in-out;
  }

  .burger span:nth-of-type(1) {
    top: 0px;
    transform-origin: left center;
  }

  .burger span:nth-of-type(2) {
    top: 50%;
    transform: translateY(-50%);
    transform-origin: left center;
  }

  .burger span:nth-of-type(3) {
    top: 100%;
    transform-origin: left center;
    transform: translateY(-50%);
  }

  .burger input:checked ~ span:nth-of-type(1) {
    top: 0;
    left: 5px;
    transform: rotate(405deg);
  }

  .burger input:checked ~ span:nth-of-type(2) {
    width: 0%;
    opacity: 0;
  }

  .burger input:checked ~ span:nth-of-type(3) {
    top: 28px;
    left: 5px;
    transform: rotate(-405deg);
  }

  #menu-left-mobile {
    position: fixed;
    width: 250px; /* szerokość menu */
    height: 100vh; /* pełna wysokość ekranu */
    top: 0;
    right: -300px; /* startowo ukryte poza ekranem */
    background-color: var(--primary-color); /* tło menu */
    transition: transform 0.3s ease; /* animacja wysuwania */
    z-index: 99999; /* aby menu było nad innymi elementami */
    display: grid;
    padding-right: unset !important;
    justify-items: center;
  }

  .burger input:checked + #menu-left-mobile {
    transform: translateX(-250px); /* przesunięcie menu na ekran */
  }

  #menu-left-mobile nav,
  #menu-left-mobile ul {
    display: grid;
    position: unset;
    transform: unset;
    width: 290px;
    font-size: 20px;
    text-align: center;
  }

  #popup h1 {
    font-size: 20px;
  }

  #popup h2 {
    font-size: 15px;
  }

  address {
    text-align: justify;
  }

  ul {
    padding: 0 !important;
  }

  #menu-left-mobile a {
    margin-right: 0 !important;
    text-align: center;
    width: 200px;
  }

  #computer-header {
    display: none;
  }

  #mobile-header div h1 {
    font-size: 20px;
  }

  .hero img {
    width: 100vw;
  }

  .hero-content h2 {
    font-size: 50px;
  }

  #postcrossing-def {
    width: 90vw;
  }

  #postcrossing-def h3 {
    font-size: 26px;
  }

  #postcrossing-def h4 {
    font-size: 23px;
  }

  #how-it-works {
    flex-direction: column;
    justify-content: unset;
    text-align: center;
  }

  #how-it-works section h3 {
    font-size: 28px;
  }

  #how-it-works aside img {
    display: none;
  }

  #infos {
    display: grid;
    width: 100vw;
    justify-content: center;
    justify-items: center;
  }

  .info {
    width: unset;
    display: grid;
    justify-content: center;
    justify-items: center;
    text-align: center;
    margin-bottom: 30px;
  }

  #why_us {
    width: unset;
  }

  #why_us h3 {
    font-size: 35px;
  }

  #container {
    display: grid;
  }

  #container > .block:nth-child(1) img {
    width: 100vw;
    height: 60vw;
    transform: translateX(-30px);
  }

  #container > .block:nth-child(2) img {
    width: 100vw;
    height: 60vw;
    transform: translateX(-30px);
  }

  #container > .block:nth-child(3) img {
    width: 100vw;
    height: 60vw;
    transform: translateX(-30px);
  }

  .block-under-img {
    width: unset;
  }

  .block h5 {
    width: unset;
    font-size: 23px;
  }

  #comment h5 {
    width: unset;
    font-size: 26px;
  }

  #contact {
    display: grid;
    width: unset;
  }

  #left-contact,
  #right-contact {
    width: unset;
    margin: unset;
    margin: 20px;
    text-align: center;
  }

  #left-contact h2 {
    font-size: 30px;
  }

  #contact_container input,
  #contact_container textarea,
  #contact_container button {
    width: 90vw;
  }

  footer {
    display: grid;
    padding: unset;
    margin: 20px;
    width: unset;
    justify-content: center;
    text-align: center;
  }

  #left-footer {
    width: unset;
  }

  #right-footer {
    display: grid;
    width: unset;
    height: unset;
    justify-content: center;
  }

  #left-footer h2 {
    font-size: 30px;
  }

  footer a {
    margin: 20px;
  }

  .right-footer-more h6 {
    margin-bottom: 0;
  }
}
