/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #eeeeee;
  /* Отступ сверху, чтобы фиксированный header не закрывал контент */
  padding-top: 100px;
}

/* Header and Navigation */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(119, 119, 119, 0.5);
  z-index: 1000;
  /* Позволяет header расширяться в мобильной версии (когда строки меню переносятся) */
  min-height: 80px;
  padding: 10px 0;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #fff;
}

.burger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.burger-menu span {
  width: 100%;
  height: 3px;
  background-color: #fff;
  transition: all 0.3s;
}

.burger-menu.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active span:nth-child(2) {
  opacity: 0;
}

.burger-menu.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.nav-menu {
  display: flex;
  list-style: none;
}

.nav-menu li {
  margin: 0 15px;
}

.nav-menu a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s;
}

.nav-menu a:hover {
  color: #ccc;
}

.social-links {
  display: flex;
  gap: 10px;
}

.social-icon {
  width: 30px;
  height: 30px;
  color: #fff;
  transition: color 0.3s;
}

.social-icon:hover {
  color: #ccc;
}

/* Hero Section */
.hero {
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: 100px 20px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-content {
  flex: 1;
  padding-right: 40px;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 20px;
  color: #333;
  padding-right: 40px;
}

.hero p {
  font-size: 18px;
  margin-bottom: 30px;
  color: #555;
}

.btn-primary {
  display: inline-block;
  padding: 15px 30px;
  background-color: #fff;
  color: #777;
  border: 1px solid #777;
  border-radius: 30px;
  text-decoration: none;
  transition:
    background-color 0.3s,
    color 0.3s;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: #777;
  color: #fff;
}

.hero-image {
  flex: 1;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* Cover CTA Section */
.cover-cta {
  position: relative;
  padding: 80px 20px;
  color: #fff;
  overflow: hidden;
}

.cover-cta__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.7);
  z-index: 0;
}

.cover-cta__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.cover-cta__content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.cover-cta__content h2 {
  font-size: 42px;
  margin-bottom: 20px;
}

.cover-cta__content p {
  font-size: 18px;
  margin-bottom: 30px;
  line-height: 1.6;
}

.cover-cta .btn-primary {
  background-color: rgba(255, 255, 255, 0.9);
  color: #333;
  border-color: rgba(255, 255, 255, 0.8);
}

.cover-cta .btn-primary:hover {
  background-color: #fff;
  color: #333;
}

/* Portfolio Section */
.portfolio {
  padding: 60px 20px;
  background-color: #fff;
}

/* Materials Slider Section */
.materials {
  padding: 60px 20px;
  background-color: #fff;
}

.materials h2 {
  font-size: 42px;
  margin-bottom: 20px;
  text-align: center;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.portfolio h2 {
  font-size: 46px;
  margin-bottom: 20px;
  text-align: left;
}

.portfolio > .container > p {
  font-size: 20px;
  margin-bottom: 40px;
  text-align: left;
}

.carousel {
  position: relative;
  overflow: hidden;
}

.carousel-container {
  display: flex;
  transition: transform 0.3s ease;
}

.carousel-item {
  flex: 0 0 calc(33.333% - 13.333px);
  text-align: center;
}

.carousel-item img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: 10px;
}

.carousel-item h3 {
  font-size: 18px;
  margin: 10px 0;
}

.carousel-item p {
  font-size: 14px;
  color: #777;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: #000;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  font-size: 24px;
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

/* About Section */
.about {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 20px;
  background-color: #f9f9f9;
}

.about-content {
  display: flex;
  align-items: center;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.about-image {
  flex: 1;
  max-width: 600px;
}

.about-text {
  flex: 1;
}

.about-image img {
  width: 100%;
  max-width: 100%;
  border-radius: 10px;
}

.about-text h2 {
  font-size: 28px;
  margin-bottom: 20px;
}

.about-text p {
  font-size: 16px;
  line-height: 1.6;
}

.contact-form {
  max-width: 500px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.form-group input[type='text'] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
}

.contact-methods {
  display: flex;
  gap: 20px;
}

.contact-method {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.contact-method input {
  margin-right: 10px;
}

.method-icon {
  margin-right: 5px;
}

/* Footer */
.footer {
  background-color: #777;
  color: #fff;
  text-align: center;
  padding: 20px;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .burger-menu {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(119, 119, 119, 0.9);
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-menu li {
    margin: 10px 0;
  }

  .social-links {
    display: none;
  }

  .navbar {
    position: relative;
  }
}

/* Popup Modal */
.popup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.popup-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.popup-content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  max-width: 500px;
  width: 100%;
  padding: 32px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.popup-content h2 {
  margin-top: 0;
  margin-bottom: 18px;
}

.popup-content p {
  margin-bottom: 24px;
  color: #555;
}

.popup-contacts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.popup-contact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  background: #fafafa;
  transition:
    background 0.2s,
    border-color 0.2s;
}

.popup-contact:hover {
  background: #fff;
  border-color: #ccc;
}

.popup-contact-icon {
  font-size: 22px;
  line-height: 1;
  width: 24px;
  height: 24px;
}

.close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #777;
}

.close:hover {
  color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
  /* Увеличиваем отступ, чтобы контент не уезжал под растягивающийся фиксированный header */
  body {
    padding-top: 180px;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 20px;
  }

  .hero-content {
    padding-right: 0;
    margin-bottom: 40px;
  }

  .hero h1 {
    font-size: 36px;
    padding-right: 0;
    order: 1;
  }

  .hero .hero-image {
    order: 2;
  }

  .hero .hero-content {
    order: 3;
  }

  .navbar {
    flex-direction: column;
    height: auto;
    padding: 20px 20px;
  }

  .nav-menu {
    margin: 15px 0;
  }

  .social-links {
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .carousel-item {
    flex: 0 0 100%;
  }

  .about-content {
    flex-direction: column;
    text-align: center;
  }

  .about-image img {
    max-width: 300px;
  }

  .about-text h2 {
    font-size: 24px;
  }

  .portfolio h2 {
    font-size: 36px;
  }

  .cover-cta {
    padding: 60px 20px;
  }

  .cover-cta__content h2 {
    font-size: 32px;
  }

  .cover-cta__content p {
    font-size: 16px;
  }
}
