/* GNSS Moldova — Agrarian Navigation landing page.
   Loaded ONLY on /agro-navigation/. Existing site styles are untouched. */

.agro-page {
  --agro-green: #187d56;
  --agro-deep: #073e30;
  --agro-text: #18312c;
  --agro-muted: #60736b;
  background: #f7faf8;
  color: var(--agro-text);
}

.agro-page .navbar {
  background: #fff !important;
  box-shadow: 0 3px 18px rgba(9, 46, 35, .08) !important;
}

.agro-page .navbar .nav-link.active {
  color: var(--agro-green);
}

.agro-page .agro-hero {
  position: relative;
  isolation: isolate;
  padding: 115px 0 120px;
  background: linear-gradient(90deg, rgba(4, 37, 29, .94), rgba(8, 57, 40, .72) 49%, rgba(7, 47, 32, .16)),
              url('/images/agro-navigation.webp') center 52% / cover no-repeat;
  color: #fff;
}

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

.agro-page .agro-hero h1 {
  max-width: 790px;
  color: #fff;
  font-size: clamp(2.4rem, 4.5vw, 4.1rem);
  line-height: 1.13;
  letter-spacing: -.035em;
  font-weight: 800;
  margin: 0 0 24px;
}

.agro-page .agro-hero .lead {
  max-width: 735px;
  color: rgba(255, 255, 255, .92);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.7;
  margin: 0 0 26px;
}

.agro-page .agro-hero .badge-soft {
  background: rgba(255, 255, 255, .15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .3);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.agro-page .agro-hero .btn {
  padding: 13px 24px;
  border-radius: 11px;
  font-weight: 700;
}

.agro-page .agro-hero .btn-light {
  background: #fff;
  color: var(--agro-deep);
  border-color: #fff;
}

.agro-page .agro-hero .btn-outline-light {
  border: 2px solid rgba(255, 255, 255, .9);
  color: #fff;
}

.agro-page .agro-hero .btn-outline-light:hover {
  background: #fff;
  color: var(--agro-deep);
}

.agro-page .agro-benefits,
.agro-page .agro-products,
.agro-page .agro-precision,
.agro-page .agro-faq,
.agro-page .agro-contact {
  padding: 80px 0;
}

.agro-page .agro-benefits h2,
.agro-page .agro-products h2,
.agro-page .agro-precision h2,
.agro-page .agro-faq h2,
.agro-page .agro-contact h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -.025em;
}

.agro-page .agro-benefits { background: #fff; }

.agro-page .agro-benefits .row > div { display: flex; }

.agro-page .agro-benefit-card {
  width: 100%;
  padding: 28px 24px;
  border: 1px solid #e2eee7;
  border-radius: 19px;
  background: #f9fcfa;
  box-shadow: 0 10px 30px rgba(9, 59, 38, .04);
  transition: transform .2s ease, box-shadow .2s ease;
}

.agro-page .agro-benefit-card::before {
  content: '✓';
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 20px;
  border-radius: 12px;
  background: #e3f5e9;
  color: #167c52;
  font-size: 1.4rem;
  font-weight: 800;
}

.agro-page .agro-benefit-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 35px rgba(9, 59, 38, .1);
}

.agro-page .agro-benefit-card h3 {
  font-size: 1.1rem;
  font-weight: 750;
  margin-bottom: 10px;
}

.agro-page .agro-benefit-card p {
  color: var(--agro-muted);
  line-height: 1.65;
}

.agro-page .agro-products {
  background: #eef6f0;
  scroll-margin-top: 80px;
}

.agro-page .agro-products .row > div { display: flex; }

.agro-page .agro-products .section-kicker {
  color: var(--agro-green);
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .14em;
}

.agro-page .agro-product-card {
  width: 100%;
  padding: 32px;
  background: #fff;
  border: 1px solid #dce9df;
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(11, 54, 34, .05);
  transition: transform .2s ease, box-shadow .2s ease;
}

.agro-page .agro-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 42px rgba(11, 54, 34, .12);
}

.agro-page .agro-product-card.agro-featured {
  border: 2px solid #35a875;
  box-shadow: 0 16px 36px rgba(17, 123, 71, .1);
}

.agro-page .agro-product-card .badge-soft {
  background: #e4f5e9;
  color: #0c6a43;
  font-weight: 750;
}

.agro-page .agro-product-photo {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 12px;
  margin: 0 0 22px;
}

.agro-page .agro-product-card h3 {
  font-size: 1.4rem;
  font-weight: 750;
  line-height: 1.3;
  margin-bottom: 14px;
}

.agro-page .agro-product-card .price {
  font-size: 2rem;
  font-weight: 800;
  color: #0d7850;
  margin: 0 0 16px;
}

.agro-page .agro-product-card .price-info {
  color: #167c52;
  border-color: #167c52;
  vertical-align: middle;
}

.agro-page .agro-product-card p:not(.price) {
  color: var(--agro-muted);
  line-height: 1.75;
  margin-bottom: 26px;
}

.agro-page .btn-agro {
  display: inline-block;
  padding: 12px 22px;
  background: var(--agro-green);
  color: #fff;
  border: 1px solid var(--agro-green);
  border-radius: 11px;
  font-weight: 700;
  text-align: center;
}

.agro-page .btn-agro:hover,
.agro-page .btn-agro:focus {
  background: #0b5e41;
  color: #fff;
  border-color: #0b5e41;
}

.agro-page .agro-precision { background: #fff; }

.agro-page .agro-precision .info-card {
  padding: 36px;
  border-radius: 22px;
  border-left: 5px solid var(--agro-green);
  background: #f2f9f4;
  box-shadow: none;
}

.agro-page .agro-precision p {
  color: #50665b;
  line-height: 1.8;
}

.agro-page .agro-faq { background: #f7faf8; }

.agro-page .agro-faq .accordion-item {
  margin-bottom: 12px;
  border: 1px solid #dfebe3;
  border-radius: 13px;
  overflow: hidden;
}

.agro-page .agro-faq .accordion-button {
  font-weight: 700;
  padding: 20px 24px;
}

.agro-page .agro-faq .accordion-button:not(.collapsed) {
  color: #0b6342;
  background: #e6f5eb;
  box-shadow: none;
}

.agro-page .agro-contact {
  background: linear-gradient(135deg, #064c37, #13815b);
  color: #fff;
  scroll-margin-top: 80px;
}

.agro-page .agro-contact-card {
  height: 100%;
  padding: 32px;
  border-radius: 22px;
  background: #fff;
  color: var(--agro-text);
  box-shadow: 0 16px 38px rgba(0, 0, 0, .13);
}

.agro-page .agro-contact-card h2 { font-size: 1.6rem; }

.agro-page .agro-contact-card a:not(.btn) { overflow-wrap: anywhere; }

.agro-page .agro-contact-card .form-control {
  border-radius: 10px;
  padding: 12px 14px;
}

.agro-page .agro-contact-card button[type='submit'] {
  padding: 12px 22px;
  border-radius: 10px;
  background: var(--agro-green);
  border-color: var(--agro-green);
  font-weight: 700;
}

.agro-page footer { color: #50665b; }

@media (max-width: 767.98px) {
  .agro-page .agro-hero {
    padding: 76px 0 84px;
    background: linear-gradient(rgba(5, 39, 28, .84), rgba(5, 39, 28, .74)),
                url('/images/agro-navigation.webp') 65% center / cover no-repeat;
  }

  .agro-page .agro-hero h1 {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }

  .agro-page .agro-hero .btn {
    width: 100%;
  }

  .agro-page .agro-benefits,
  .agro-page .agro-products,
  .agro-page .agro-precision,
  .agro-page .agro-faq,
  .agro-page .agro-contact {
    padding: 54px 0;
  }

  .agro-page .agro-product-card,
  .agro-page .agro-contact-card {
    padding: 24px;
  }
}

/* Benefits: checkmark and heading on the same line. No HTML changes needed. */
.agro-page .agro-benefit-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  column-gap: 16px;
  align-content: start;
  align-items: center;
}

.agro-page .agro-benefit-card::before {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
}

.agro-page .agro-benefit-card h3 {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
}

.agro-page .agro-benefit-card p {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 18px 0 0 !important;
}

/* ==========================================
   Back to Top
   ========================================== */

.agro-page .agro-scroll-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    left: auto;

    width: 54px;
    height: 54px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #0879e8;
    color: #ffffff;

    border: none;
    border-radius: 50%;

    box-shadow: 0 6px 20px rgba(0, 80, 170, 0.25);

    cursor: pointer;
    z-index: 1050;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(12px);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        background 0.25s ease,
        visibility 0.25s ease;
}

.agro-page .agro-scroll-top.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.agro-page .agro-scroll-top:hover {
    background: #065eb6;
    transform: translateY(-3px);
}

.agro-page .agro-scroll-top svg {
    width: 22px;
    height: 22px;
}

@media (max-width: 575.98px) {
    .agro-page .agro-scroll-top {
        right: 16px;
        bottom: 20px;
        width: 46px;
        height: 46px;
    }
}

/* =====================================================
   HEADER — одинаковый с главной страницей GNSS Moldova
   ===================================================== */

.agro-page .navbar {
    background: #ffffff !important;
    padding-top: 8px;
    padding-bottom: 8px;
    min-height: 61px;
}

/* Логотип */
.agro-page .navbar svg {
    display: block;
    width: 190px;
    height: 45px;
}

/* Кнопка геодезического оборудования */
.agro-page .navbar .btn-outline-primary {
    white-space: nowrap;
}

/* Мобильная версия */
@media (max-width: 575.98px) {

    .agro-page .navbar .container {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
    }

    .agro-page .navbar svg {
        width: 145px;
        height: auto;
    }

    .agro-page .navbar .btn {
        font-size: 12px;
    }

    .agro-page .navbar .me-3 {
        margin-right: 5px !important;
    }

    .agro-page .navbar .ms-auto {
        gap: 5px;
    }

}

/* ==========================================
   BACK TO TOP — стиль главной страницы
   ========================================== */

.agro-page #scrollTopBtn {
    position: fixed !important;

    right: 20px !important;
    bottom: 100px !important;
    left: auto !important;

    width: 52px !important;
    height: 52px !important;

    display: flex !important;
    align-items: center;
    justify-content: center;

    padding: 0 !important;

    background-color: #0d6efd !important;
    color: #ffffff !important;

    border: none !important;
    border-radius: 50% !important;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);

    cursor: pointer;
    z-index: 1050;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(10px);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        background-color 0.25s ease,
        visibility 0.25s ease;
}

/* Кнопка появляется при прокрутке */

.agro-page #scrollTopBtn.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* Наведение */

.agro-page #scrollTopBtn:hover {
    background-color: #0b5ed7 !important;
    transform: translateY(-2px);
}

/* Стрелка */

.agro-page #scrollTopBtn svg {
    display: block;
    width: 20px;
    height: 20px;
    stroke: #ffffff;
}

/* Мобильные устройства */

@media (max-width: 575.98px) {

    .agro-page #scrollTopBtn {
        right: 20px !important;
        bottom: 100px !important;

        width: 52px !important;
        height: 52px !important;
    }

}

/* ==========================================
   AGRO PRODUCTS — GRID / LIST VIEW
   ========================================== */

/* Общая структура карточки */

.agro-page .agro-product-card {
    display: flex;
    flex-direction: column;
}

.agro-page .agro-product-image {
    width: 100%;
    flex-shrink: 0;
}

.agro-page .agro-product-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

/* ==========================================
   PRODUCTS VIEW TOGGLE
   ========================================== */

.agro-page .view-toggle {
    display: inline-flex;
    width: auto;
    border-radius: 50px;
    flex-shrink: 0;
}

.agro-page .view-toggle .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 29px;
    height: 28px;
    padding: 2px 6px;

    font-size: 14px;
    line-height: 1;

    background-color: #ffffff;
    color: #6c757d;

    border: 1px solid #6c757d;
    border-radius: 0;

    box-shadow: none;
    transition: background-color .2s ease, color .2s ease;
}

/* Закругление */
.agro-page .view-toggle .btn:first-child {
    border-radius: 50px 0 0 50px;
}

.agro-page .view-toggle .btn:last-child {
    border-radius: 0 50px 50px 0;
}

/* Активная кнопка */
.agro-page .view-toggle .btn.active {
    background: #0d6efd !important;
    color: #fff !important;
    border-color: #0d6efd !important;
    z-index: 2;
}

/* Неактивная */
.agro-page .view-toggle .btn:not(.active) {
    background: #fff !important;
    color: #6c757d !important;
}

/* Наведение */
.agro-page .view-toggle .btn:not(.active):hover {
    background: #e9ecef !important;
    color: #0d6efd !important;
}

/* Иконки */
.agro-page .view-toggle .btn span[aria-hidden="true"] {
    font-size: 14px;
    line-height: 1;
}

/* Мобильная версия */
@media (max-width: 576px) {
    .agro-page .view-toggle {
        width: auto;
        justify-content: flex-end;
        flex-shrink: 0;
    }
}

/* ==========================================
   GRID VIEW — ПЛИТКА
   ========================================== */

#agroProducts:not(.agro-products-list) .agro-product-item {
    width: 50%;
    flex: 0 0 50%;
}

#agroProducts:not(.agro-products-list) .agro-product-photo {
    width: 100%;
    height: 190px;
    object-fit: cover;
    margin-bottom: 22px;
}

/* ==========================================
   LIST VIEW — СПИСОК
   ========================================== */

/* Одна карточка на всю ширину */

#agroProducts.agro-products-list .agro-product-item {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
}

/* Горизонтальная карточка */

#agroProducts.agro-products-list .agro-product-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 30px;

    width: 100%;
    padding: 30px;
}

/* Левая колонка — фотография */

#agroProducts.agro-products-list .agro-product-image {
    width: 42%;
    flex: 0 0 42%;
}

/* Фотография */

#agroProducts.agro-products-list .agro-product-photo {
    width: 100%;
    height: 350px;

    object-fit: cover;
    object-position: center;

    margin: 0;
    border-radius: 12px;
}

/* Правая колонка — информация */

#agroProducts.agro-products-list .agro-product-content {
    flex: 1;
    min-width: 0;
}

/* Название */

#agroProducts.agro-products-list .agro-product-card h3 {
    font-size: 1.6rem;
    margin-bottom: 16px;
}

/* Цена */

#agroProducts.agro-products-list .agro-product-card .price {
    margin-bottom: 18px;
}

/* Описание */

#agroProducts.agro-products-list .agro-product-card p:not(.price) {
    margin-bottom: 24px;
}

/* Кнопка */

#agroProducts.agro-products-list .btn-agro {
    width: 100%;
}

/* ==========================================
   MOBILE
   ========================================== */

@media (max-width: 767.98px) {

    /* Плитка: одна колонка */

    #agroProducts:not(.agro-products-list) .agro-product-item {
        width: 100%;
        flex: 0 0 100%;
    }

    /* Список: тоже вертикальный */

    #agroProducts.agro-products-list .agro-product-card {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 24px;
    }

    #agroProducts.agro-products-list .agro-product-image {
        width: 100%;
        flex: 0 0 auto;
    }

    #agroProducts.agro-products-list .agro-product-photo {
        width: 100%;
        height: 220px;
        margin-bottom: 22px;
    }

    #agroProducts.agro-products-list .agro-product-card h3 {
        font-size: 1.4rem;
    }

}