* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0 auto;
  max-width: 1920px;
  background-color: black;
  background-image: url(/assets/photos/background_soulfreediving.webp);
  background-position: top;
  background-size: 100%;
  font-family: "Montserrat";
  color: #ffffff;
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 20px;
  cursor: pointer;
  z-index: 1001;
}

.burger span {
  display: block;
  height: 3px;
  background-color: white;
  border-radius: 3px;
  transition: 0.3s;
}

/* Анимация открытия */
.burger.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.burger.open span:nth-child(2) {
  opacity: 0;
}

.burger.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.header_container {
  margin-bottom: 100px;
  padding: 15px 30px;
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
}

.header_items {
  margin-left: auto;
  display: flex;
  justify-content: center;
  gap: 20px;
  cursor: pointer;
}

.header_item {
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  color: white;
}

.socials {
  margin-left: auto;
  display: flex;
  gap: 10px;
}

.socials a {
  text-decoration: none;
  color: white;
}

.main_container {
  padding: 15px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.main_text {
  width: 70%;
  margin-bottom: 300px;
}

.main_text h6 {
  font-size: 24px;
  margin-bottom: 50px;
}

.main_text p {
  font-size: 18px;
  margin-bottom: 10px;
}

.btn-start {
  padding: 15px;
  font-size: 24px;
  border-radius: 50px;
  color: white;
  text-decoration: none;
  background-color: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 5px turquoise, inset 0 0 5px turquoise;
  transition: box-shadow 1s;
  cursor: pointer;
  z-index: 1000;
}

.btn-start:hover {
  box-shadow: 0 0 5px turquoise, inset 0 0 5px turquoise, 0 0 100px turquoise,
    inset 0 0 50px turquoise;
}

.freediving {
  padding: 15px 30px;
  width: 70%;
  display: flex;
  flex-direction: column;
  gap: 50px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 25px;
}

.freediving h2 {
  font-size: 48px;
}

.freediving p {
  font-size: 18px;
  margin-bottom: 10px;
}

.events {
  width: 70%;
  padding: 15px 0px;
  display: flex;
  flex-direction: column;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 25px;
}

.events h2 {
  margin-bottom: 20px;
  font-size: 48px;
}

.events h5 {
  margin-bottom: 20px;
  font-size: 24px;
}

.events p {
  font-size: 18px;
  /* margin-bottom: 10px; */
}

.breath-timer {
  width: 70%;
  margin-top: 50px;
  padding: 15px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 25px;
  color: white;
}

.breath-timer h2 {
  font-size: 48px;
}

.timer-display {
  font-size: 64px;
  font-weight: bold;
}

.btn-timer {
  width: 150px;
  height: 150px;
  padding: 15px;
  font-size: 24px;
  border-radius: 50%;
  border: none;
  color: white;
  text-decoration: none;
  background-color: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 5px turquoise, inset 0 0 5px turquoise;
  transition: box-shadow 1s;
  cursor: pointer;
  z-index: 1000;
}

#timerRange {
  width: 100%;
  margin: 20px 0;
  transition: all 0.3s ease;
  appearance: none;
  height: 8px;
  border-radius: 5px;
  background: #444; /* начальный фон */
  outline: none;
}

#timerRange::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: turquoise;
  cursor: pointer;
  border: 2px solid turquoise;
  transition: background 0.3s ease;
}

#timerRange::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: turquoise;
  cursor: pointer;
  border: 2px solid turquoise;
}

.range-labels {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.about {
  width: 70%;
  padding: 15px 30px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 16px;
}

.about-container {
  max-width: 100%;
}

.about h2 {
  font-size: 48px;
  margin-bottom: 20px;
}

.about-img {
  margin-right: 20px;
  width: 400px;
  height: auto;
  float: left;
  border-radius: 16px;
}

.about-text {
  font-size: 18px;
}

.courses {
  width: 70%;
  padding: 15px 30px;
  display: flex;
  flex-direction: column;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 25px;
}

.courses h2 {
  font-size: 48px;
  margin-bottom: 20px;
}

.course-header {
  margin-bottom: 20px;
  padding: 15px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 16px;
  box-shadow: 0 0 5px turquoise, inset 0 0 5px turquoise;
  transition: box-shadow 1s ease-in-out;
}

.course-header:hover {
  box-shadow: 0 0 5px turquoise, inset 0 0 5px turquoise, 0 0 50px turquoise,
    inset 0 0 25px turquoise;
}

.course-about {
  font-size: 18px;
  margin-bottom: 10px;
}

.course-content {
  max-height: 0;
  overflow: hidden;
  padding: 0 10px;
  transition: max-height 1s ease, padding 1s ease;
}

.course-content.open {
  max-height: 1500px;
  padding: 10px;
}

.course-content h6 {
  font-size: 20px;
  margin-bottom: 10px;
}

.course-content ul {
  margin-bottom: 10px;
  line-height: 1.5;
}

.course-content ul p {
  font-size: 16px;
}

.gallery {
  width: 70%;
  padding: 15px 30px;
  gap: 10px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 25px;
}

.gallery h2 {
  font-size: 48px;
  margin-bottom: 20px;
}
 
.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.gallery-img {
  width: 200px;
  height: auto;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-img:hover {
  transform: scale(1.05);
}

/* Lightbox overlay */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.show {
  opacity: 1;
  pointer-events: auto;
}

#lightbox-img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
}

.classes {
  width: 70%;
  padding: 15px 30px;
  /* display: flex; */
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 25px;
}

.classes h2 {
  font-size: 48px;
  margin-bottom: 20px;
}

.classes h6 {
  margin-bottom: 10px;
  font-size: 20px;
}

.classes li {
  margin: 0 0 10px 25px;
  font-size: 16px;
}

.classes p {
  font-size: 16px;
  line-height: 2;
}

.travels {
  width: 70%;
  padding: 15px 30px;
  display: flex;
  flex-direction: column;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 25px;
}

.travels-container h2 {
  font-size: 48px;
  margin-bottom: 20px;
}

.travel-header {
  margin-bottom: 20px;
  padding: 15px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 16px;
  box-shadow: 0 0 5px turquoise, inset 0 0 5px turquoise;
  transition: box-shadow 1s ease-in-out;
}

.travel-header:hover {
  box-shadow: 0 0 5px turquoise, inset 0 0 5px turquoise, 0 0 50px turquoise,
    inset 0 0 25px turquoise;
}

.travel-content {
  max-height: 0;
  overflow: hidden;
  padding: 0 10px;
  transition: max-height 1s ease, padding 1s ease;
}

.travel-content.open {
  max-height: 2500px;
  padding: 10px;
}

.travel-content h4 {
  margin-bottom: 10px;
  font-size: 28px;
}

.travel-content ul {
  margin-bottom: 10px;
  line-height: 1.5;
}

.travel-content li {
  font-size: 16px;
}

.travel-content p {
  margin-bottom: 10px;
  font-size: 16px;
}

.travel-content a {
  color: turquoise;
  cursor: pointer;
}

.adresses {
  width: 70%;
  padding: 15px 30px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 25px;
}

.adresses h2 {
  font-size: 48px;
  margin-bottom: 20px;
}

.adresses p {
  font-size: 18px;
  margin-bottom: 20px;
}

.footer_container {
  display: flex;
  height: 150px;
  padding: 15px 30px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 16px 16px 0 0;
  font-size: 16px;
}

.footer_container h3 {
  margin: 0 auto;
  display: block;
}

.footer_contacts {
  margin: 0 auto;
  display: flex;
  gap: 100px;
  list-style: none;
}

.footer_contacts a {
  color: white;
  text-decoration: none;
}

.footer_details {
  list-style: none;
}

.footer_details li {
  text-align: justify;
}

@media (max-width: 768px) {

  .burger {
    display: flex;
    /* margin-left: auto; */
  }

    .header_container {
      margin-bottom: 20px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    position: relative;
  }

  .header_items {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    display: none;
    flex-direction: column;
    gap: 15px;
    background: rgba(0, 0, 0, 0.9);
    padding: 15px;
    border-radius: 0 0 10px 10px;
    animation: fadeIn 0.3s ease;
  }

  .header_items.show {
    display: flex;
  }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .main_container {
    padding: 10px 15px;
  }

  .main_text {
    width: 100%;
    margin-bottom: 100px;
  }

  .main_text h6 {
    font-size: 20px;
    margin-bottom: 20px;
  }

  .main_text p {
    font-size: 16px;
  }

  .btn-start {
    font-size: 18px;
    padding: 10px 20px;
  }

  .freediving,
  .events,
  .breath-timer,
  .courses,
  .gallery,
  .classes,
  .travels,
  .about,
  .adresses {
    width: 100%;
    padding: 10px 15px;
  }

  .freediving h2,
  .events h2,
  .breath-timer h2,
  .courses h2,
  .gallery h2,
  .classes h2,
  .travels h2,
  .about h2,
  .adresses h2 {
    font-size: 36px;
  }

  .freediving p,
  .events p,
  .courses p,
  .classes li,
  .classes p,
  .travels p,
  .about p,
  .adresses p {
    font-size: 16px;
  }

  .gallery-grid {
    gap: 10px;
  }

  .gallery-img {
    width: 40vw;
    max-width: 160px;
    border-radius: 6px;
  }

  #lightbox-img {
    max-width: 95vw;
    max-height: 80vh;
  }

  .range-labels {
    flex-direction: column;
    gap: 10px;
  }

  .course-header {
    font-size: 18px;
    padding: 10px;
  }

  .course-content h6 {
    font-size: 18px;
  }

  .course-content ul p {
    font-size: 14px;
  }

  .travel-header {
    font-size: 18px;
    padding: 10px;
  }

  .travel-content h4 {
    font-size: 18px;
  }

  .about-img {
    width: 50%;
  }

  .footer_container {
    flex-direction: column;
    height: auto;
    padding: 10px 15px;
    gap: 10px;
  }

  .footer_contacts {
    gap: 20px;
    flex-wrap: wrap;
  }
}
