/*
 * 2026-11 — home page v2 (mock-up «Головна Квінта Агро: до і після», 11.11.2026).
 * Loaded only on the home page (catalog/controller/common/home.php). Blocks:
 * first screen (.kvh-hero), services (.kvh-services), popular models (.kvh-models), «Чому Квінта Агро» (.kvh-trust),
 * folded SEO text (.kvh-seo), «Залишились питання?» (.kvh-cta), the pick form popup (.kv-pick).
 * Site colours: red #c41230, black #000, light grey #f4f4f4 / #f8f8f8.
 */

/* ---------- Buttons ---------- */
.kvh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.kvh-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px #c41230; }
.kvh-btn--lg { min-height: 56px; padding: 14px 34px; font-size: 16px; }
.kvh-btn--primary { background: #c41230; color: #fff; }
.kvh-btn--primary:hover { background: #a10e27; color: #fff; text-decoration: none; }
.kvh-btn--ghost { border-color: rgba(255, 255, 255, .7); color: #fff; background: rgba(0, 0, 0, .15); }
.kvh-btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .12); color: #fff; text-decoration: none; }
.kvh-btn--outline { border-color: #d6d6d6; color: #000; background: #fff; text-transform: uppercase; letter-spacing: .04em; font-size: 14px; padding: 20px 44px; border-radius: 2px; }
.kvh-btn--outline:hover { border-color: #000; color: #000; text-decoration: none; }
.kvh-btn--white { background: #fff; color: #c41230; }
.kvh-btn--white:hover { background: #f4f4f4; color: #a10e27; text-decoration: none; }
.kvh-btn--outline-white { border-color: #fff; color: #fff; background: transparent; }
.kvh-btn--outline-white:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---------- Section labels / titles ---------- */
.kvh-label { margin: 0 0 18px; font-weight: 500; }
.kvh-title { margin: 0 0 32px; font-size: 36px; line-height: 1.2; font-weight: 500; color: #000; }

/* ---------- First screen ---------- */
.kvh-hero {
    position: relative;
    min-height: 680px;
    height: 100vh;
    max-height: 980px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #2b2117;
    color: #fff;
}
.kvh-hero__img, .kvh-hero__img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.kvh-hero__img img { object-fit: cover; object-position: 60% 50%; }
/* Stronger shade under the menu (the white menu text stays readable on any photo) and on the left under the text. */
.kvh-hero__shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, .62) 0, rgba(0, 0, 0, .25) 160px, rgba(0, 0, 0, 0) 300px),
        linear-gradient(90deg, rgba(0, 0, 0, .55) 0, rgba(0, 0, 0, .25) 45%, rgba(0, 0, 0, 0) 70%);
}
.kvh-hero__box { position: relative; z-index: 1; padding-top: 110px; padding-bottom: 60px; }
.kvh-hero__title.main-slider__item-title {
    max-width: 760px;
    margin: 0 0 32px;
    font-size: 44px;
    line-height: 1.15;
    font-weight: 500;
    color: #fff;
}
.kvh-hero__partners { display: flex; align-items: center; gap: 32px; margin-bottom: 28px; }
.kvh-hero__partner { display: block; height: auto; }
.kvh-hero__partner--agco { width: 172px; }
.kvh-hero__partner--mf { width: 123px; }
.kvh-hero__text { max-width: 560px; margin: 0 0 36px; font-size: 18px; line-height: 1.45; color: rgba(255, 255, 255, .9); }
.kvh-hero__actions { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- Services ---------- */
.kvh-services { padding: 80px 0; background: #fff; }
.kvh-services__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}
.kvh-service { min-width: 0; }
.kvh-service__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #e6e6e6;
    background: #fff;
    color: #000;
    text-decoration: none;
    transition: box-shadow .2s ease, border-color .2s ease;
}
.kvh-service__link:hover { border-color: #c41230; box-shadow: 0 8px 24px rgba(0, 0, 0, .08); color: #000; text-decoration: none; }
.kvh-service__link:focus-visible { outline: 3px solid #c41230; outline-offset: 2px; }
.kvh-service__img { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #f4f4f4; }
.kvh-service__img img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.03); } /* hides thin edges of resized photos */
.kvh-service__body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 20px 20px 22px; }
.kvh-service__title { font-size: 20px; line-height: 1.25; font-weight: 500; margin-bottom: 10px; }
.kvh-service__text { font-size: 14px; line-height: 1.45; color: #4d4d4d; margin-bottom: 16px; }
.kvh-service__action {
    margin-top: auto;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #c41230;
}

/* ---------- Popular models ---------- */
.kvh-models { padding: 40px 0 90px; background: #fff; }
.kvh-models__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}
.kvh-model { display: flex; flex-direction: column; min-width: 0; border: 1px solid #e6e6e6; background: #fff; }
.kvh-model__img { display: block; padding: 16px; }
.kvh-model__img img { display: block; width: 100%; height: auto; aspect-ratio: 437 / 398; object-fit: contain; }
.kvh-model__body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 0 20px 20px; }
.kvh-model__label { margin: 0 0 4px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #6b6b6b; }
.kvh-model__name { margin: 0 0 14px; font-size: 20px; line-height: 1.25; font-weight: 500; }
.kvh-model__name a { display: inline-block; padding: 4px 0; color: #000; text-decoration: none; }
.kvh-model__name a:hover { color: #c41230; }
.kvh-model__params { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 18px; }
.kvh-model__param { background: #f4f4f4; padding: 8px 10px; min-width: 0; }
.kvh-model__param dt { font-size: 12px; line-height: 1.3; color: #5c5c5c; font-weight: 400; }
.kvh-model__param dd { margin: 2px 0 0; font-size: 14px; line-height: 1.3; font-weight: 500; color: #000; overflow-wrap: anywhere; }
.kvh-model__actions { margin-top: auto; display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.kvh-model__more { align-self: center; font-size: 14px; color: #000; text-decoration: underline; text-underline-offset: 3px; padding: 12px 8px; }
.kvh-model__more:hover { color: #c41230; }
.kvh-models__all { display: flex; justify-content: center; margin-top: 40px; }

/* ---------- Why Kvinta Agro ---------- */
.kvh-trust { padding: 70px 0 80px; background: #000; color: #fff; }
.kvh-label--light { color: #fff; }
.kvh-trust__title { max-width: none; margin: 0 0 40px; font-size: 32px; line-height: 1.25; font-weight: 500; color: #fff; }
.kvh-trust__facts {
    list-style: none;
    margin: 0 0 40px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px 32px;
}
.kvh-fact { display: flex; flex-direction: column; gap: 6px; }
.kvh-fact__value { font-size: 44px; line-height: 1.05; font-weight: 500; color: #fff; text-decoration: none; white-space: nowrap; }
a.kvh-fact__value:hover { color: #fff; text-decoration: underline; }
.kvh-fact__text { font-size: 15px; line-height: 1.4; color: #e6e6e6; }
.kvh-fact__note { font-size: 13px; line-height: 1.4; color: #c4c4c4; }
.kvh-trust__cities-title { margin: 0 0 8px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: #c4c4c4; }
.kvh-trust__cities { margin: 0 0 28px; font-size: 16px; line-height: 1.6; color: #fff; }
.kvh-trust__btn { min-height: 48px; padding: 12px 28px; }

/* ---------- SEO text (folded) ---------- */
.kvh-seo.info { padding-top: 48px; padding-bottom: 48px; }
.kvh-seo__text { color: #4d4d4d; }
.kvh-seo__text--folded {
    max-height: 3.4em;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent);
    mask-image: linear-gradient(180deg, #000 40%, transparent);
}
.kvh-seo__text--folded > :first-child { margin-top: 0; }
.kvh-seo__more {
    margin-top: 4px;
    padding: 11px 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    color: #c41230;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.kvh-seo__more[hidden] { display: none; }

/* ---------- «Залишились питання?» ---------- */
.kvh-cta { background: #c41230; color: #fff; padding: 44px 0; }
.kvh-cta__box { display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; }
.kvh-cta__title { margin: 0 0 8px; font-size: 30px; line-height: 1.2; font-weight: 500; color: #fff; }
.kvh-cta__text p { margin: 0; font-size: 16px; line-height: 1.45; color: #fff; }
.kvh-cta__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.kvh-cta__actions .kvh-btn { min-height: 52px; padding: 12px 30px; font-size: 16px; }

/* ---------- Pick form popup ---------- */
.popup--pick .popup__box.kv-pick { flex: 0 0 560px; max-width: 560px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 36px 40px 30px; }
.kv-pick .popup__close { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; background: none; padding: 0; cursor: pointer; }
.kv-pick__title.popup__title { margin-bottom: 10px; text-align: left; }
.kv-pick__lead { margin: 0 0 20px; font-size: 15px; line-height: 1.45; color: #222; }
.kv-pick__form { text-align: left; }
.kv-pick__need { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.kv-pick__label { display: block; margin: 0 0 6px; padding: 0; font-size: 13px; color: #444; }
.kv-pick__opt { color: #6b6b6b; }
.kv-pick__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.kv-pick__chip { position: relative; margin: 0; cursor: pointer; }
.kv-pick__chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kv-pick__chip span {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid #cfcfcf;
    border-radius: 999px;
    font-size: 14px;
    line-height: 1.2;
    color: #000;
    background: #fff;
}
.kv-pick__chip:hover span { border-color: #000; }
.kv-pick__chip input:checked + span { background: #000; border-color: #000; color: #fff; }
.kv-pick__chip input:focus-visible + span { outline: 3px solid #c41230; outline-offset: 2px; }
.kv-pick__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; align-items: end; }
.kv-pick__field { margin-bottom: 14px; min-width: 0; }
.kv-pick__input {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 0;
    background: #f2f2f2;
    font: inherit;
    font-size: 15px;
    color: #000;
}
.kv-pick__input::placeholder { color: #757575; }
.kv-pick__input:focus { outline: none; border-color: #000; background: #fff; box-shadow: 0 0 0 2px #000; }
.kv-pick__input.error { border-color: #c41230; }
/* The native select stays (keyboard and screen readers); the theme script (front/dist/js/app.js, Select) adds its
   own div.select copy after every select — hidden here. */
select.kv-pick__select { display: block; appearance: auto; }
div.select.kv-pick__select { display: none !important; }
.kv-pick .g-recaptcha { margin: 4px 0 14px; }
.kv-pick .popup__form-btn-box { margin-top: 6px; }
.kv-pick__submit.popup__form-btn { width: 100%; }
.kv-pick__submit:focus-visible, .kv-pick .popup__close:focus-visible { outline: 3px solid #000; outline-offset: 2px; }
.kv-pick .kv-form-notice { margin: 14px 0 0; font-size: 12px; line-height: 1.5; color: #555; }
.kv-pick .kv-field-error { margin-top: 6px; }

/* ---------- Tablets ---------- */
@media (max-width: 1199px) {
    .kvh-services__list, .kvh-models__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kvh-trust__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kvh-hero__title.main-slider__item-title { font-size: 38px; }
}

/* ---------- Phones ---------- */
@media (max-width: 767px) {
    .kvh-title { font-size: 28px; margin-bottom: 22px; }
    .kvh-hero { min-height: 680px; min-height: 100svh; height: auto; max-height: none; align-items: flex-end; }
    .kvh-hero__box { padding-top: 110px; padding-bottom: 36px; }
    .kvh-hero__img img { object-position: 70% 50%; }
    .kvh-hero__shade {
        background:
            linear-gradient(180deg, rgba(0, 0, 0, .6) 0, rgba(0, 0, 0, .2) 120px, rgba(0, 0, 0, .1) 40%, rgba(0, 0, 0, .7) 100%);
    }
    .kvh-hero__title.main-slider__item-title { font-size: 26px; margin-bottom: 20px; }
    .kvh-hero__partners { gap: 20px; margin-bottom: 18px; }
    .kvh-hero__partner--agco { width: 120px; }
    .kvh-hero__partner--mf { width: 86px; }
    .kvh-hero__text { font-size: 15px; margin-bottom: 24px; }
    .kvh-hero__actions { flex-direction: column; gap: 12px; }
    .kvh-hero__actions .kvh-btn { width: 100%; }

    .kvh-services { padding: 48px 0; }
    .kvh-services__list { grid-template-columns: 1fr; gap: 10px; }
    .kvh-service__link { flex-direction: row; align-items: stretch; position: relative; padding-right: 36px; }
    .kvh-service__link::after {
        content: '';
        position: absolute;
        right: 16px;
        top: 50%;
        width: 9px;
        height: 9px;
        border-top: 2px solid #c41230;
        border-right: 2px solid #c41230;
        transform: translateY(-50%) rotate(45deg);
    }
    .kvh-service__img { flex: 0 0 96px; aspect-ratio: auto; min-height: 96px; }
    .kvh-service__body { padding: 12px 0 12px 14px; justify-content: center; }
    .kvh-service__title { font-size: 17px; margin-bottom: 4px; }
    .kvh-service__text { font-size: 13px; margin-bottom: 0; }
    .kvh-service__action { display: none; }

    .kvh-models { padding: 24px 0 56px; }
    .kvh-models__list { gap: 10px; }
    .kvh-model__img { padding: 10px; }
    .kvh-model__body { padding: 0 10px 12px; }
    .kvh-model__label { font-size: 11px; }
    .kvh-model__name { font-size: 15px; margin-bottom: 10px; }
    .kvh-model__params { grid-template-columns: 1fr; gap: 6px; margin-bottom: 12px; }
    .kvh-model__param { padding: 6px 8px; }
    .kvh-model__param dt { font-size: 11px; }
    .kvh-model__param dd { font-size: 13px; }
    .kvh-model__actions .kvh-btn { min-height: 44px; padding: 8px 6px; font-size: 13px; }
    .kvh-models__all { margin-top: 28px; }

    .kvh-trust { padding: 48px 0 56px; }
    .kvh-trust__title { font-size: 26px; margin-bottom: 28px; }
    .kvh-trust__facts { gap: 22px 16px; }
    .kvh-fact__value { font-size: 32px; }
    .kvh-fact:nth-child(n+3) { grid-column: 1 / -1; }
    .kvh-trust__btn { width: 100%; }

    .kvh-cta { padding: 36px 0; }
    .kvh-cta__title { font-size: 24px; }
    .kvh-cta__actions { width: 100%; flex-direction: column; }
    .kvh-cta__actions .kvh-btn { width: 100%; }

    .popup--pick { align-items: flex-start; overflow-y: auto; }
    .popup--pick .popup__box.kv-pick { flex-basis: 100%; max-width: 100%; max-height: none; min-height: 100%; padding: 28px 20px 24px; }
    .kv-pick__row { grid-template-columns: 1fr; }
    .kv-pick .popup__close { position: absolute; top: 10px; right: 10px; z-index: 2; background: #fff; border-radius: 50%; }
    .kv-pick__title.popup__title { padding-right: 44px; }
    .kvh-trust__btn { font-size: 14px; padding: 12px 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .kvh-btn, .kvh-service__link { transition: none; }
}
