/* --- CSS Reset & Base Variables (адаптация из Figma) --- */
:root {
  --color-primary: #6cb043;
  --color-primary-dark: #188542;
  --color-navbar-bg: #449c42;
  --color-text-main: #000000;
  --color-text-grey: #8e8e8e;
  --color-text-light: #5c5c5c;
  --color-white: #ffffff;
  --color-footer-bg-light: #2c9043;
  --color-footer-text-light: #a0ce84;
  --color-footer-icon-bg: #a0c888;

  --font-primary: "Commissioner", sans-serif;
  --font-secondary: "Inter", sans-serif;

  --container-width: 1420px;
  --card-shadow: 0px 21px 17.7px rgba(0, 0, 0, 0.11);
}

/* --- MAIN CONTENT --- */
.page-title {
  font-family: var(--font-secondary);
  font-weight: 800;
  font-size: 19px;
  text-transform: uppercase;
  margin-bottom: 30px;
}

/* Filters (Tabs) */
.filters-wrapper {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 40px;
}
.filters {
  display: flex;
  border-radius: 5px;
  padding: 4px;
  gap: 5px;
  background: rgba(108, 176, 67, 0.15);
}
.filter-btn {
  background: transparent;
  border: none;
  padding: 10px 30px;
  border-radius: 5px;
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s;
  color: var(--color-primary);
  /* Rectangle 34624341 */
  background: #ffffff;
  border: 1px solid #6cb043;
  border-radius: 5px;
}
.filter-btn.active {
  background: var(--color-primary);
  color: white;
}
.filter-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.5);
}

/* --- NEWS GRID --- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.news-grid .news-card {
  background: var(--color-white);
  border-radius: 5px;
  box-shadow: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.news-grid .news-card:hover {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}
.news-grid .news-card:hover .card-desc {
  color: #000;
}

.news-grid .news-card .card-image {
  opacity: 0.7;
}

.news-grid .news-card:hover .card-image {
  opacity: 1;
}

.news-grid .news-card:hover .card-btn {
  background: white;
  border: 1px solid white;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.11);
  color: var(--color-primary);
}

.card-image {
  width: 100%;
  height: 185px;
  background-size: cover;
  background-position: center;
  background-color: #d9d9d9;
}

.card-content {
  padding: 25px 20px 30px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card-title {
  font-family: var(--font-secondary);
  font-weight: 700;
  font-size: 18px;
  text-align: center;
  margin-bottom: 15px;
}

.card-desc {
  font-family: var(--font-secondary);
  font-weight: 600;
  font-size: 15px;
  text-align: center;
  color: var(--color-text-grey);
  line-height: 108%;
  margin-bottom: 20px;
  flex-grow: 1;
}

.card-btn {
  display: block;
  width: 100%;
  max-width: 182px;
  padding: 12px 0;
  border-radius: 6px;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  text-transform: uppercase;
  transition: 0.2s;
}

.btn-fill {
  background: var(--color-primary);
  border: 1px solid #b7e09f;
  color: white;
}
.btn-fill:hover {
  background: #539c36;
}

/* Специальный стиль для первой карточки */
.btn-outline {
  background: white;
  border: 1px solid white;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.11);
  color: var(--color-primary);
}
.btn-outline:hover {
  background: #f4f4f4;
}

/* Expand Button */
.expand-more-wrapper {
  display: flex;
  justify-content: center;
}
.expand-btn {
  background: #e3f0dc;
  border: 1px solid #b7e09f;
  border-radius: 5px;
  padding: 14px 80px;
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 14px;
  color: var(--color-primary);
  text-transform: uppercase;
  cursor: pointer;
}
.expand-btn:hover {
  background: #d1e3c7;
}

/* --- FOOTER --- */
.site-footer {
  background: var(--color-primary-dark);
  padding: 40px 0 30px;
  color: white;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
}
.footer-logo .logo-text .brand {
  color: white;
}
.footer-logo .logo-text .sub-brand {
  color: white;
}

.footer-socials {
  display: flex;
  gap: 15px;
  margin: 20px 0;
}
.footer-socials .social-icon {
  background: #a0ce84;
  color: #188542;
}

.footer-copyright {
  font-weight: 500;
  font-size: 12px;
  line-height: 150%;
  letter-spacing: 0.03em;
  color: #a0ce84;
  max-width: 400px;
}

.footer-links-col h4 {
  font-family: var(--font-secondary);
  font-weight: 800;
  font-size: 20px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.footer-links-col ul {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.footer-links-col ul li a {
  font-weight: 600;
  font-size: 15px;
  color: white;
}
.footer-links-col ul li a:hover {
  text-decoration: underline;
}

.client-col {
  background: #2c9043;
  padding: 20px;
  border-radius: 0;
  margin: -40px 0 -30px 0;
}

.footer-contacts-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.footer-phone-item,
.footer-address-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}
.icon-phone-green,
.icon-pin-green {
  width: 31px;
  height: 31px;
  background: #a0ce84;
  border-radius: 8px;
  position: relative;
}
.icon-phone-green::after {
  content: "📞";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
}
.icon-pin-green::after {
  content: "📍";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
}

.phone-link {
  display: block;
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 18px;
  color: #a0ce84;
  margin-bottom: 5px;
}
.footer-address-item span {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 16px;
  color: #a0ce84;
}

.btn-tracking-footer {
  max-width: 220px;
  margin-top: 10px;
  background: var(--color-primary);
  color: white;
}

/* --- RESPONSIVENESS (Адаптивность) --- */
@media (max-width: 1200px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .client-col {
    margin: -40px 0 -30px 0;
  }
}

@media (max-width: 992px) {
  .header-top {
    flex-wrap: wrap;
    justify-content: center;
  }
  .header-contacts {
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }
  .main-nav {
    display: none;
  } /* Скрываем меню на планшетах, при необходимости реализуется выпадающим */
  .filters-wrapper {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .header-socials {
    display: none;
  }
  .news-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
  .expand-btn {
    padding: 14px 40px;
  }
}

@media (max-width: 576px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .client-col {
    margin: 0;
    padding: 20px;
  }
  .header-contacts {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .nav-menu {
    flex-grow: 1;
    justify-content: center;
  }
  .search-box {
    display: none;
  }
  .filters {
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }
  .filter-btn {
    flex: 1;
    min-width: 150px;
    text-align: center;
    padding: 10px 10px;
  }
  .btn-tracking {
    font-size: 12px;
    padding: 8px 16px;
  }
}

@media (max-width: 992px) {
  .card-content {
    padding: 25px 20px 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .card-title {
    text-align: left;
  }

  .card-desc {
    text-align: left;
  }
}
