/* === Базовые стили === */
*,
*::before,
*::after {
  box-sizing: border-box;
}

.btn-order:hover,
.btn-submit:hover {
  background-color: #bdf236; /* светлее, чем #A4DE02 */
  transition: background-color 0.3s;
}

body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
  color: #333;
}

/* === Универсальные классы === */
.link {
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  color: #fff;
}

/* === Шапка === */
header {
  background: #1E5631;
  color: #fff;
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  position: relative;
}

.logo img {
  height: 40px;
  width: auto;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
  flex-direction: row;
}

nav ul li a {
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  color: #fff;
}

nav ul li a:hover {
  color: #A4DE02; /* ярко-зеленый при наведении */
  transition: color 0.3s;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 5px 15px;
  margin-left: auto;
}

.header-contacts {
  display: flex;
  align-items: center;
}

.desktop-phone {
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  color: #fff;
}

.btn-order {
  background: #A4DE02;
  color: #1E5631;
  padding: 10px 20px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  border-radius: 5px;
  font-size: 16px;
  margin-left: 15px;
}

.mobile-phone {
  display: none;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
}

@media (max-width: 1068px) {
  .menu-toggle {
    display: block;
  }

  nav ul {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background: #1E5631;
    flex-direction: column;
    padding: 10px 0;
    z-index: 1001;
  }

  nav ul.active {
    display: flex;
  }

  nav ul li {
    margin: 5px 0; /* уменьшен отступ */
    text-align: center;
  }

  .header-contacts {
    display: none;
  }

  .mobile-phone {
    display: inline-block;
    margin-left: auto;
    margin-right: 15px;
  }

  .desktop-phone {
    display: none;
  }
}

/* === Hero === */
#hero {
  background: url('../media/hero-bg.jpg') no-repeat center center/cover;
  color: #fff;
  padding: 200px 0;
  text-align: center;
}

.hero-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

#hero h1 {
  font-size: 48px;
  margin: 0;
  line-height: 1.2;
}

#hero p {
  font-size: 18px;
  margin: 20px 0;
}

@media (max-width: 500px) {
  #hero h1 {
    font-size: 36px;
    line-height: 1.3;
  }
}

/* === Клиенты === */
#clients {
  padding: 60px 0;
  background: linear-gradient(to right, #f8f8f8, #e8f5e9);
}

.section-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.section-container h2 {
  font-size: 36px;
  margin-bottom: 20px;
}

.section-container p {
  font-size: 18px;
  max-width: 800px;
  margin: 0 auto 40px;
  line-height: 1.5;
}

#clients-logos {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
}

#clients-logos > div {
  flex: 0 0 200px;
  max-width: 200px;
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
}

#clients-logos img {
  max-width: 160px;
  width: 100%;
  height: auto;
  object-fit: contain;
}

@media (max-width: 500px) {
  #clients-logos {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 0 16px;
    box-sizing: border-box;
  }
}

/* === О компании === */
#about {
  padding: 60px 0;
  background: #fff;
}

.about-cards {
  display: flex;
  justify-content: space-around;
  margin-top: 30px;
  flex-wrap: wrap;
}

.about-cards > div {
  text-align: center;
  margin: 15px;
  min-width: 200px;
}

.about-cards img {
  height: 70px;
  width: auto;
}

.about-cards p {
  font-size: 18px;
  margin-top: 10px;
  font-weight: 500;
}

/* === Услуги === */
#services {
  padding: 50px 0;
  text-align: center;
}

.services-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

#services h2 {
  font-size: 36px;
  margin-bottom: 20px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.service-card {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.service-card h3 {
  font-size: 24px;
  margin-bottom: 10px;
}

.service-card p {
  font-size: 16px;
  margin-bottom: 20px;
}

@media (max-width: 500px) {
  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    padding: 15px;
  }
}

/* === Контакты === */
#contacts {
  padding: 50px 0;
  text-align: center;
}

#contacts p {
  margin-bottom: 10px;
}

/* === Футер === */
footer {
  background: #1E5631;
  color: #fff;
  padding: 20px 0;
  text-align: center;
}

.footer-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-container .logo img {
  height: 40px;
  width: auto;
  margin-bottom: 10px;
}

.footer-container p {
  margin: 0;
  font-size: 14px;
}

/* === Модалка и форма === */
.modal {
  display: none;
  position: fixed;
  z-index: 1002;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 30px;
  border: 1px solid #888;
  width: 90%;
  max-width: 600px;
  border-radius: 10px;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close {
  color: #aaa;
  position: absolute;
  right: 20px;
  top: 10px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
}

.form-group textarea {
  height: 150px;
  resize: vertical;
}

.char-count {
  font-size: 14px;
  color: #666;
  text-align: right;
  margin-top: 5px;
}

.error {
  color: #d9534f;
  font-size: 14px;
  margin-top: 5px;
  display: none;
}

.btn-submit {
  background: #A4DE02;
  color: #1E5631;
  padding: 12px 25px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  border-radius: 5px;
  font-size: 16px;
  width: 100%;
  transition: background 0.3s;
}

.btn-submit:hover {
   background-color: #bdf236;
  transition: background-color 0.3s;
}

.success-message {
  display: none;
  background: #d4edda;
  color: #155724;
  padding: 15px;
  border-radius: 5px;
  margin-top: 20px;
  text-align: center;
}

/* === Адаптивная модалка === */
@media (max-width: 1068px) {
  .modal-content {
    width: 95%;
    margin: 20px auto;
    padding: 20px;
    max-width: none;
  }

  .close {
    right: 15px;
    top: 5px;
    font-size: 24px;
  }

  .form-group input,
  .form-group textarea {
    padding: 10px;
    font-size: 14px;
  }

  .btn-submit {
    padding: 12px;
    font-size: 14px;
  }

  .modal-content h2 {
    font-size: 24px;
    margin-bottom: 15px;
  }

  .form-group {
    margin-bottom: 15px;
  }
}

/* === Индикатор загрузки === */
.loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #A4DE02;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
  display: none;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
