@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css');

:root {
  --primary: #2b3b38;
  --primary-light: #3a4f4b;
  --secondary: #b4b8b7;
  --light: #ecf0f1;
  --dark: #2c3e50;
  --text: #333333;
  --text-light: #7f8c8d;
  --white: #ffffff;
  --gray-bg: #f9f9f9;
  --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
  --section-padding: 80px;
  --section-padding-large: 100px;
  --section-gap: 30px;
}

/* Базовые стили */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--white);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Контейнер */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Типографика */
h1, h2, h3, h4 {
  font-weight: 600;
  color: var(--primary);
  line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; margin-bottom: 1.5rem; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }

p {
  margin-bottom: 1rem;
  font-weight: 400;
}

/* Шапка */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  z-index: 1000;
  box-shadow: var(--shadow);
  padding: 5px 0;
  transition: var(--transition);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.social-icons {
    display: flex;
    gap: 15px; /* Space between icons */
    align-items: center; /* Vertically center with logo and navbar */
    margin: 0 20px; /* Space from logo and navbar */
}

.social-icons a {
    color: #36414d; /* Hover color (e.g., blue) */
    font-size: 35px; /* Icon size */
    text-decoration: none;
}

.social-icons a:hover {
    color: #36414d; /* Hover color (e.g., blue) */
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  height: 100px;
  max-width: 150px;
  object-fit: contain;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  max-height: 100%;
}

@media (max-width: 768px) {
  .logo img {
    height: 28px;
    max-width: 120px;
  }
}

/* Навигация */
.nav {
  display: flex;
  gap: 25px;
}

.nav a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.nav a:hover {
  color: var(--secondary);
}

/* Кнопки */
.btn {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  padding: 12px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
}

.btn:hover {
  background: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

/* Универсальная кнопка "Подробнее" */
.btn-details {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  text-decoration: none;
  border: none;
  cursor: pointer;
  margin-top: 15px;
  width: 100%;
  max-width: 180px;
}

.btn-details:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-details i {
  margin-left: 8px;
  transition: transform 0.3s;
}

.btn-details:hover i {
  transform: translateX(3px);
}

/* Герой-секция */
.hero {
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  background: url('images/hero-bg.jpg') center/cover no-repeat, #2c3e50;
  color: var(--white);
  text-align: center;
  position: relative;
  margin-top: 0; /* Убираем отрицательный margin */
  padding-top: 80px; /* Базовый отступ для десктопа */
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: var(--white);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.hero p {
  color: var(--white);
  font-size: 1.5rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
  .hero {
    padding-top: 120px; /* Увеличенный отступ для мобильных, учитывая высоту header */
    min-height: 500px;
  }
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero p {
    font-size: 1.2rem;
  }
}

/* Секции */
.section {
  padding: 80px 0;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s, transform 0.5s;
}

.section.fade-in {
  opacity: 1;
  transform: translateY(0);
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-gray {
  background-color: var(--gray-bg);
}

/* Галерея проектов */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.projects {
  padding: var(--section-padding) 0;
  margin-bottom: var(--section-gap);
}

.completed {
  padding: var(--section-padding) 0;
  margin-top: var(--section-gap);
}

.project {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.project:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.project img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.project-info {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-info h3 {
  color: var(--primary);
}

.project-info p {
  color: var(--text-light);
  margin-bottom: 15px;
}

.project-details {
  margin-top: auto;
  padding-top: 15px;
  text-align: center;
}

/* О компании */
.about-content {
  display: flex;
  gap: 40px;
  align-items: center;
}

.about-text {
  flex: 1;
}

.about-image {
  flex: 1;
}

.about-image img {
  width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.about ul {
  list-style: none;
  margin: 20px 0;
}

.about ul li {
  margin-bottom: 10px;
  position: relative;
  padding-left: 30px;
}

.about ul li:before {
  content: "✓";
  color: var(--primary);
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* FAQ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 15px;
  border-bottom: 1px solid #ddd;
}

.faq-question {
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  font-weight: 600;
  padding: 15px 0;
  cursor: pointer;
  position: relative;
}

.faq-question::after {
  content: '+';
  position: absolute;
  right: 0;
  font-size: 1.2rem;
}

.faq-answer {
  display: none;
  padding-bottom: 15px;
  transition: var(--transition);
}

/* Отзывы */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.review {
  background: var(--white);
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-style: italic;
}

.review span {
  display: block;
  margin-top: 10px;
  font-weight: 500;
  text-align: right;
}

/* Карта */
.map-section {
  padding-bottom: var(--section-gap);
}

.map-container {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-top: 30px;
  position: relative;
  height: 500px;
}

.map-container iframe {
  width: 100%;
  height: 550px;
  border: none;
  display: block;
  position: absolute;
  top: -50px;
  clip-path: inset(50px 0 0 0);
}

@media (max-width: 768px) {
  .map-container {
    height: 400px;
  }
  .map-container iframe {
    height: 450px;
    top: -40px;
    clip-path: inset(40px 0 0 0);
  }
}

@media (max-width: 576px) {
  .map-container {
    height: 300px;
  }
  .map-container iframe {
    height: 340px;
    top: -30px;
    clip-path: inset(30px 0 0 0);
  }
}

/* Контакты */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-top: 40px;
  padding-bottom: var(--section-padding-large);
}

.contact-info p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
}

.contact-form button {
  width: 100%;
}

/* Подвал */
.footer {
  background: var(--primary);
  color: var(--white);
  padding: 30px 0;
  text-align: center;
  padding-top: var(--section-gap);
  padding-bottom: 40px;
}

.footer p {
  margin: 0;
}

/* Модальное окно */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: auto;
  opacity: 0;
  transition: opacity 0.3s;
}

.modal.show {
  display: flex;
  opacity: 1;
}

.modal-content {
  margin: auto;
  width: 90%;
  max-width: 900px;
  position: relative;
  padding: 60px 0 40px;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: var(--white);
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--secondary);
}

.modal-gallery {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-height: 70vh;
}

.modal-image-container {
  width: 100%;
  max-height: 70vh;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.modal-image {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
}

.gallery-prev,
.gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: var(--white);
  border: none;
  padding: 10px;
  cursor: pointer;
  font-size: 1.5rem;
  transition: var(--transition);
}

.gallery-prev:hover,
.gallery-next:hover {
  background: var(--primary);
}

.gallery-prev {
  left: 10px;
}

.gallery-next {
  right: 10px;
}

.gallery-counter {
  position: absolute;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.5);
  color: var(--white);
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.9rem;
}

.modal-actions {
  text-align: center;
  margin-top: 25px;
  width: 100%;
}

.modal-link {
  display: inline-flex;
  align-items: center;
  padding: 12px 30px;
  background: var(--primary);
  color: var(--white);
  text-decoration: none;
  border-radius: 50px;
  transition: var(--transition);
}

.modal-link:hover {
  background: var(--primary-light);
  transform: translateY(-3px);
}

.modal-link i {
  margin-left: 8px;
  transition: transform 0.3s;
}

.modal-link:hover i {
  transform: translateX(3px);
}

/* Адаптивность */
@media (max-width: 992px) {
  .about-content {
    flex-direction: column;
  }
  
  .about-image {
    margin-top: 30px;
  }
}

@media (max-width: 768px) {
  .header .container {
    flex-direction: column;
    gap: 15px;
  }
  
  .nav {
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .section {
    padding: 60px 0;
  }
  
  .modal-content {
    padding: 80px 0 30px;
  }
  
  .modal-close {
    top: 15px;
    right: 15px;
    font-size: 30px;
  }
}

@media (max-width: 576px) {
  .btn-details {
    max-width: 100%;
  }
  
  .modal-image-container {
    max-height: 50vh;
  }
  
  .modal-image {
    max-height: 50vh;
  }
  
  .gallery {
    grid-template-columns: 1fr;
  }
  
  .gallery-prev,
  .gallery-next {
    padding: 8px;
    font-size: 1.2rem;
  }
  
  .gallery-counter {
    font-size: 0.8rem;
  }
}

/* Стили для чекбокса согласия */
.privacy-checkbox {
  margin: 15px 0;
  display: flex;
  align-items: flex-start;
}

.privacy-checkbox input[type="checkbox"] {
  margin-right: 10px;
  margin-top: 3px;
  min-width: 18px;
  min-height: 18px;
}

.privacy-checkbox label {
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text-light);
  cursor: pointer;
}

.privacy-checkbox a {
  color: var(--primary);
  text-decoration: underline;
  transition: color 0.3s;
}

.privacy-checkbox a:hover {
  color: var(--secondary);
}