@import url('https://fonts.googleapis.com/css2?family=Tuffy:ital,wght@0,400;0,700;1,400;1,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poiret+One&display=swap');

:root {
  --accent: #5d9685;
  --background: #95adab;
  --text: #1c1c1c;
}

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

a {
  text-decoration: none;
}

ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

body {
  font-family: 'Montserrat', sans-serif;
  line-height: 1.6;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

html {
  font-size: 20px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

header {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 1) 100%
    ),
    url(./images/back.jpg);
  background-position: top;
  background-size: cover;
  background-repeat: no-repeat;
  min-height: 100vh;
  opacity: 0.6;
  z-index: 0;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  background-color: #fff;
  width: 100%;
  position: absolute;
  top: 0;
}

.contact-icons {
  display: flex;
  align-items: center;
  gap: 15px;
}

.contact-icons li a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  color: #fff;
  background-color: var(--accent);
  transition: background-color 0.3s ease, color 0.3s ease;
  text-transform: uppercase;
  position: relative;
}

.contact-icons li a:hover {
  color: var(--accent);
  background-color: transparent;
}

.menu {
  display: flex;
  align-items: center;
  gap: 15px;
}

.menu li a {
  color: var(--accent);
  position: relative;
  text-transform: uppercase;
  padding-bottom: 4px;
}

.menu li a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 0;
  transition: width 0.3s ease;
  background-color: var(--accent);
}

.menu li a:hover::after {
  width: 40%;
}

.header-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 100px;
}

.header-grid img {
  height: 80vh;
  position: relative;
  z-index: 1000;
  box-shadow: -6px -3px 36px 39px rgba(207, 207, 207, 0.75);
  -webkit-box-shadow: -6px -3px 36px 39px rgba(207, 207, 207, 0.75);
  -moz-box-shadow: -6px -3px 36px 39px rgba(207, 207, 207, 0.75);
}

.broken-box {
  width: 400px;
  height: 400px;
  border: 10px solid #fff;
  position: relative;
  overflow: visible;
  display: flex;
  justify-content: center;
  flex-direction: column;
  margin-right: -20px;
  z-index: 1;
}

.overflow-text {
  display: inline-block;
  text-transform: uppercase;
  position: relative;
  font-size: 40px;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4);
  z-index: 10;
  margin: 15px;
  color: var(--accent);
  font-family: 'Poiret One', sans-serif;
}

.overflow-text:first-child::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 30%;
  transition: width 0.3s ease;
  background-color: var(--accent);
}

section {
  padding: 30px;
  margin-bottom: 60px;
}

#about {
  background-color: var(--background);
  color: #fff;
}

.text {
  max-width: 1000px;
  margin: auto;
}

.text.max-width-1300 {
  max-width: 1300px;
}

.contact-icons {
  margin-top: 30px;
}

h2 {
  text-transform: uppercase;
  position: relative;
  font-family: 'Poiret One', sans-serif;
  color: #fff;
  align-items: center;
  width: max-content;
  margin-bottom: 30px;
  font-size: 35px;
}

h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 60%;
  transition: width 0.3s ease;
  background-color: #fff;
}

h3 {
  text-transform: uppercase;
  position: relative;
  font-family: 'Poiret One', sans-serif;
  color: var(--accent);
  align-items: center;
  width: max-content;
  margin-bottom: 30px;
  font-size: 35px;
}

h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 60%;
  transition: width 0.3s ease;
  background-color: var(--accent);
}

h4 {
  text-transform: uppercase;
  font-family: 'Poiret One', sans-serif;
  font-size: 50px;
  color: var(--accent);
}

strong {
  text-transform: uppercase;
  font-family: 'Poiret One', sans-serif;
  color: var(--accent);
  font-weight: 700;
}

.services-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 50px;
  margin-top: 50px;
}

.services-grid img {
  height: 80vh;
  position: relative;
  z-index: 1000;
  box-shadow: -6px -3px 36px 39px rgba(207, 207, 207, 0.75);
  -webkit-box-shadow: -6px -3px 36px 39px rgba(207, 207, 207, 0.75);
  -moz-box-shadow: -6px -3px 36px 39px rgba(207, 207, 207, 0.75);
}

.services-text {
  font-size: 25px;
}

.services-text ul li {
  position: relative;
  max-width: max-content;
  margin-bottom: 15px;
}

.services-text ul li::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100px;
  transition: width 0.3s ease;
  background-color: var(--accent);
}

#lessons {
  background: linear-gradient(
      to top,
      rgba(255, 255, 255, 0.2),
      rgba(255, 255, 255, 0.2)
    ),
    url('images/back.jpg') no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
  background-repeat: no-repeat;
  max-width: 100%;
  width: 100%;
  padding: 100px;
  height: max-content;
  margin-top: 100px;
}

#lessons h3 {
  font-size: 40px;
  margin-bottom: 60px;
}

.lessons-text > h4 {
  font-size: 30px;
  text-align: center;
  max-width: 700px;
  margin: 60px auto;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  text-align: center;
  width: 100%;
}

.feature-item {
  border-right: 1px solid var(--accent);
  padding: 30px;
}

.feature-item:last-child {
  border: 0;
}

.feature-item i {
  font-size: 40px;
  color: var(--accent);
  margin-bottom: 30px;
}

.feature-item h4 {
  color: var(--accent);
  margin-bottom: 15px;
  font-size: 30px;
}

.feature-item p {
  color: var(--accent);
  color: var(--text);
}

.lessons-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1300px;
  padding: 2rem;
  align-items: center;
  margin: 4rem auto 1rem;
  background-color: rgba(240, 231, 231, 0.8);
}

.reviews {
  display: flex;
  flex-wrap: wrap;
  max-width: 700px;
}

.masonry {
  column-count: 3;
  column-gap: 1rem;
}

.masonry img {
  width: 100%;
  margin-bottom: 1rem;
  border-radius: 12px;
  display: block;
  break-inside: avoid;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

footer {
  background-color: var(--background);
  color: #fff;
  padding: 30px;
  margin-bottom: 0;
}

footer .text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

footer .text p {
  max-width: 600px;
  text-align: center;
  margin: 15px auto;
  font-size: 22px;
}

.main-button {
  background-color: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
  padding: 15px 30px;
  border-radius: 40px;
  transition: background-color 0.3s ease, color 0.3s ease;
  margin: 15px auto;
}

.main-button:hover {
  background-color: #fff;
  color: var(--accent);
}

@media (max-width: 1024px) {
  .masonry {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  .masonry {
    column-count: 1;
  }
}

@media (max-width: 998px) {
  body {
    font-size: 16px;
  }
  nav {
    flex-direction: column;
    gap: 15px;
    position: relative;
  }
  .menu {
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
  }
  .header-grid {
    flex-direction: column-reverse;
    padding: 20px 15px 30px;
  }
  header::before {
    opacity: 1;
  }
  .header-grid img {
    height: auto;
    max-width: 100%;
  }
  .broken-box {
    width: 300px;
    height: 300px;
    margin-right: 0;
    margin-top: -17px;
    z-index: 2000;
  }
  .feature-item {
    border-bottom: 1px solid var(--accent);
    border-right: 0;
  }
  .services-grid {
    flex-direction: column;
  }
  h4 {
    font-size: 28px;
    margin-bottom: 20px;
  }
  .services-grid img {
    height: auto;
    max-width: 100%;
  }
  .services-text {
    font-size: 20px;
  }
  #lessons {
    padding: 20px;
    margin-top: 0;
  }
  h3 {
    width: auto;
  }
  #lessons h3 {
    font-size: 35px;
    margin-bottom: 27px;
  }
  .lessons-text {
    margin: 0;
  }
  nav .contact-icons {
    margin-top: 0;
  }
}
