/* --- CSS Reset & Base Variables --- */
:root {
  --color-primary: #6cb043;
  --color-primary-dark: #188542;
  --color-navbar-bg: #449c42;
  --color-bg-light: #f3f9ef;
  --color-border-light: #b7e09f;
  --color-text-main: #000000;
  --color-text-grey: #8e8e8e;
  --color-text-light: #5c5c5c;
  --color-white: #ffffff;
  --color-footer-text-light: #a0ce84;
  --color-dot-grey: #afafaf;

  --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);
}

/* --- BUTTONS --- */
.btn {
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 12px 20px;
  border-radius: 8px;
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  text-transform: uppercase;
  transition: opacity 0.2s;
  border: none;
  cursor: pointer;
}
.btn:hover {
  opacity: 0.8;
}

/* --- 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;
  background: rgba(108, 176, 67, 0.15);
  border-radius: 5px;
  padding: 4px;
  gap: 5px;
  width: 100%;
  max-width: 739px;
}
.filter-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 0;
  border-radius: 5px;
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s;
  color: var(--color-primary);
}
.filter-btn.active {
  background: var(--color-primary);
  color: white;
}
.filter-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.5);
}

/* --- NEWS DETAIL --- */
.news-detail-wrapper {
  display: flex;
  gap: 40px;
  margin-bottom: 80px;
}
.news-image-block {
  flex: 0 0 604px;
  height: 352px;
  border-radius: 8px;
  overflow: hidden;
  background: #b7e09f;
}
.news-main-img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}
.news-text-block {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.news-date {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 14px;
  color: var(--color-primary);
  margin-bottom: 10px;
}
.news-title {
  font-family: var(--font-secondary);
  font-weight: 800;
  font-size: 24px;
  line-height: 100%;
  margin-bottom: 20px;
}
.news-body p {
  font-family: "Calibri", var(--font-secondary), sans-serif;
  font-weight: 400;
  font-size: 21px;
  line-height: 104%;
  color: #000000;
  margin-bottom: 20px;
}
.news-detail-btn {
  display: inline-block;
  padding: 14px 35px;
  background: #e3f0dc;
  border: 1px solid #b7e09f;
  border-radius: 5px;
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 14px;
  color: var(--color-primary);
  text-align: center;
  align-self: flex-start;
  cursor: pointer;
  transition: 0.2s;
}
.news-detail-btn:hover {
  background: #d1e3c7;
}

/* --- RELATED SECTION --- */
.related-section {
  margin-bottom: 80px;
}
.related-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
  position: relative;
}
.related-title {
  font-family: var(--font-secondary);
  font-weight: 800;
  font-size: 19px;
  text-transform: uppercase;
  padding: 0 30px;
  z-index: 1;
  background: white;
}
.related-header::before,
.related-header::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-primary);
}
.related-header::before {
  margin-right: 0;
}
.related-header::after {
  margin-left: 0;
}

.related-slider-wrapper {
  position: relative;
  margin-left: -15px;
  margin-right: -15px;
}
.related-slider-wrapper {
  position: relative;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 27px;
}
.related-grid .news-card {
  margin: 0 17px; /* отступ между слайдами */
}
.news-card {
  background: var(--color-white);
  border-radius: 5px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.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-outline {
  background: #ffffff;
  border: 1px solid #b7e09f;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.11);
  color: var(--color-primary);
}
.btn-outline:hover {
  background: #f4f4f4;
}

/* Slider Arrows & Dots */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: #b7e09f;
  border: none;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.slider-arrow.prev {
  left: -30px;
}
.slider-arrow.next {
  right: -30px;
}
.arrow-icon {
  display: block;
  width: 8px;
  height: 8px;
  border-top: 2px solid white;
  border-right: 2px solid white;
}
.slider-arrow.prev .arrow-icon {
  transform: rotate(-135deg);
  margin-left: 4px;
}
.slider-arrow.next .arrow-icon {
  transform: rotate(45deg);
  margin-right: 4px;
}

.related-slider-wrapper .news-card {
  box-shadow: none;
}

.related-slider-wrapper .news-card:hover {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}
.slider-pagination {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 25px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-dot-grey);
  cursor: pointer;
}
.dot.active {
  background: var(--color-primary);
}

/* --- CONTACTS SECTION --- */
.contacts-section {
  padding: 40px 0 60px;
}
.contacts-title {
  font-family: var(--font-secondary);
  font-weight: 800;
  font-size: 19px;
  text-transform: uppercase;
  margin-bottom: 49px;
}
.contacts-wrapper {
  display: flex;
  gap: 3px;
  background: #b7e09f;
}

.contacts-info-box {
  border: 1px solid #b7e09f;
  border-radius: 8px;
  background: #fff;
  min-width: 331px;
  margin: 5px;
  height: auto;
}

.map-img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  margin: 0px;
  position: relative;
  display: block;
  padding: 5px;
  background: #b7e09f;
  border: 1px solid #b7e09f;
  border-radius: 8px;
  overflow: hidden;
}

.map-img iframe {
  display: block;
  border: none;
}
.contacts-info_wrapper {
  flex: 0 0 340px;
  background: #ffffff;
  border-radius: 8px;
  padding: 25px 25px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.contact-list-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}
.c-icon {
  width: 31px;
  height: 31px;
  border: 1.8px solid var(--color-primary);
  border-radius: 8px;
  position: relative;
  flex-shrink: 0;
}
.c-icon::after {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
}

.c-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.c-phone {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 18px;
  color: var(--color-primary);
  line-height: 115%;
}
.c-address {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 16px;
  color: var(--color-primary);
}
.c-schedule {
  font-family: var(--font-secondary);
  font-weight: 700;
  font-size: 14px;
  line-height: 116%;
  color: #000000;
}
.c-email {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 16px;
  color: var(--color-primary);
}

.contact-socials {
  display: flex;
  gap: 10px;
  margin-top: 5px;
  padding: 14px 21px;
  margin: 4px;
}
.contact-socials .s-icon {
  width: 31px;
  height: 31px;
  border-radius: 8px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  transition: 0.2s;
}

.contacts-map-box {
  flex: 1;
  background: #ffffff;
  border: 1px solid #b7e09f;
  border-radius: 8px;
  overflow: hidden;
  height: auto;
}
.map-img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

/* --- 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;
}

.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;
  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;
}

/* --- RESPONSIVE --- */
@media (max-width: 1200px) {
  .news-detail-wrapper {
    flex-direction: column;
  }
  .news-image-block {
    flex: none;
    width: 100%;
    height: 350px;
  }
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 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: flex-start;
  }
  .filters {
    max-width: 100%;
  }
  .contacts-wrapper {
    flex-direction: column;
  }
  .contacts-info-box {
    flex: none;
    width: 100%;
  }
  .contacts-map-box {
    height: 300px;
  }
}

@media (max-width: 768px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
  .related-slider-wrapper {
    padding: 0 30px;
  }
  .slider-arrow {
    width: 28px;
    height: 28px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .client-col {
    margin: 0;
    padding: 20px;
  }
  .news-image-block {
    height: 250px;
  }
}

.contacts-section .map_number {
  color: #000;
}

.contact-socials {
  background: rgba(160, 206, 132, 0.17);
  border: 1px solid #b7e09f;
  border-radius: 8px;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: stretch;
  align-content: stretch;
}

/* Адаптив */
@media (max-width: 992px) {
  @media (max-width: 768px) {
    .filters-wrapper {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
    .filters-wrapper::-webkit-scrollbar {
      display: none;
    }

    .filters {
      display: flex;
      gap: 12px;
      white-space: nowrap;
      padding-bottom: 4px;
    }

    .filter-btn {
      flex-shrink: 0;
    }

    .filter-btn {
      min-width: 150px;
    }

    .contacts-info-box {
      border: 1px solid #b7e09f;
      border-radius: 8px;
      background: #fff;
      min-width: 100%;
      padding: 5px;
      margin: 0;
      height: auto;
    }

    .contacts-wrapper {
      display: flex;
      gap: 3px;
      background: #b7e09f;
      position: relative;
      padding: 3px;
      border-radius: 8px;
    }

    .contacts-map-box {
      height: 300px;
      min-height: 206px;
    }

    .map-img iframe {
      display: block;
      border: none;
      min-height: 206px;
    }
  }
}

/* Возможно вам будет интересно */

.recomendation_news_inner .section-title-wrapper {
  position: relative;
  text-align: center;
  margin: 20px 0; /* по желанию */
}

/* Линия, которая растягивается на всю ширину контейнера */
.recomendation_news_inner .section-title-wrapper::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: #6cb043;
  z-index: 0;
}

.recomendation_news_inner .section-title-centered {
  display: inline-block; /* чтобы фон был только под текстом */
  background: #fff;
  padding: 0 20px;
  position: relative;
  z-index: 1; /* поверх линии */
  font-family: var(--font-secondary);
  font-weight: 800;
  font-size: 19px;
  color: #000;
}

/* Стили для слайдера */
/* Стили для счётчика (такие же, как у товаров) */
.pagination-counter {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  margin-top: 15px;
}
.pagination-counter__text {
  font-size: 16px;
  font-weight: 500;
  color: #333;
}
.pagination-counter__arrow {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  transition: opacity 0.2s;
}
.pagination-counter__arrow:hover {
  opacity: 0.7;
}
.pagination-counter__hint {
  font-size: 14px;
  color: #999;
  margin-left: 8px;
}

.news-grid.news_detail_slider {
  display: flex;
  gap: 20px;
}
.news-grid.news_detail_slider .news-card {
  max-width: 335px;
}

.news-grid .card-btn {
  background: #ffffff;
  border: 1px solid #b7e09f;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.11);
  border-radius: 6px;

  color: #6cb043;
}
