/* ==========================================================
   Quark 2 — Sad — Atlas sadu (V3)
   ========================================================== */


/* ---------- Tokeny ---------- */

:root {
    --v3-paper: #f2efe7;
    --v3-card: #faf8f2;
    --v3-ink: #142e27;
    --v3-muted: #60756a;
    --v3-line: #cbd2c5;
    --v3-accent: #e88358;
    --v3-dark: #102e25;
    --q2-bg: var(--v3-paper);
    --q2-bg-elev: var(--v3-card);
    --q2-bg-muted: #e9ecdf;
    --q2-text: var(--v3-ink);
    --q2-text-strong: var(--v3-ink);
    --q2-text-muted: var(--v3-muted);
    --q2-link: #245d46;
    --q2-nav-bg: var(--v3-paper);
    --q2-nav-border: var(--v3-line);
    --sad-primary: var(--v3-ink);
    --sad-primary-hover: #315744;
    --sad-accent: var(--v3-accent);
    &[data-theme="dark"] {
        --v3-paper: #142d24;
        --v3-card: #213d31;
        --v3-ink: #f5f1e6;
        --v3-muted: #b3c4b5;
        --v3-line: #40574b;
        --v3-accent: #f09a70;
        --v3-dark: #092118;
        --q2-bg-muted: #244032;
        --q2-link: #e7be91;
        --sad-primary: var(--v3-accent);
        --sad-primary-hover: #ffc39d;
    }
}


/* ---------- Podstawy ---------- */

html {
    background: var(--v3-paper);
}

body {
    background: var(--v3-paper);
    font-family: Inter, Arial, sans-serif;
}

body,
p,
li,
h1,
h2,
h3,
h4 {
    color: var(--v3-ink);
}

h1,
h2,
h3,
h4,
p,
li {
    hyphens: none;
    -webkit-hyphens: none;
    overflow-wrap: normal;
    word-break: normal;
}

h1,
h2,
h3,
h4 {
    margin: 0 0 .5em;
    font: 800 inherit/1.15 Inter, Arial, sans-serif;
    /* letter-spacing: -.055em; */
}

h2::before {
    display: none;
}

:is(a, button, input, textarea):focus-visible {
    outline: 3px solid var(--v3-accent);
    outline-offset: 3px;
}


/* ---------- Nawigacja ---------- */

#header {
    background: var(--v3-paper);
    border-bottom: 1px solid var(--v3-line);
    box-shadow: none;
    backdrop-filter: none;
    .navbar {
        max-width: 1320px;
        min-height: 76px;
        margin: 0 auto;
        padding: 0 clamp(1rem, 3vw, 2rem);
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        @media (max-width: 650px) {
            min-height: 64px;
        }
    }
    .navbar-brand {
        display: inline-flex;
        align-items: center;
        svg {
            max-width: 150px;
            path {
                fill: var(--v3-ink);
            }
        }
    }
    .dropmenu>ul>li>a {
        padding: .55rem .75rem;
        border-radius: 0;
        color: var(--v3-ink);
        font-size: .77rem;
        font-weight: 700;
        letter-spacing: .08em;
        text-transform: uppercase;
        &:hover,
        &.active {
            background: transparent;
            /* color: #b45835; */
            box-shadow: inset 0 -2px 0 var(--v3-accent);
        }
    }
    .theme-toggle {
        color: var(--v3-ink);
    }
}

.header-animated.scrolled #header .navbar {
    min-height: 68px;
}

#overlay li:has(> a[href="/blog"]) {
    display: none;
}

.v3-logo {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    white-space: nowrap;
    color: var(--v3-ink);
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: .035em;
    word-spacing: .12em;
    &::before {
        content: "";
        display: block;
        flex: 0 0 33px;
        width: 33px;
        height: 33px;
        background: url("zdjecia/logo.svg") center / contain no-repeat;
    }
     :root[data-theme="dark"] &::before {
        background-image: url("zdjecia/logo-ciemne.svg");
    }
    .v3-logo-mark {
        display: none;
    }
}


/* ==========================================================
   Hero — jeden wygląd dla wszystkich stron
   ========================================================== */

:is(#hero,
#owoce-hero,
#blog-hero) {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 560px;
    margin-top: 0;
    padding: 70px 0;
    overflow: hidden;
    background: #173329 center 48% / cover no-repeat;
    &::after {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: linear-gradient(90deg, rgba(8, 32, 24, .84) 0%, rgba(8, 32, 24, .59) 36%, rgba(8, 32, 24, .16) 73%, transparent 100%);
    }
    .image-overlay {
        display: none;
    }
    .columns {
        display: block;
    }
    .container {
        position: relative;
        z-index: 1;
        width: 100%;
        max-width: 1320px;
        text-align: left;
    }
    .hero-content-wrapper {
        width: 52% !important;
        min-width: 420px;
        max-width: 600px;
        margin: 0;
        padding: 0;
        background: none;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        backdrop-filter: none;
        text-align: left;
    }
    h1,
    h2 {
        max-width: 590px;
        margin: 0 0 .7rem;
        color: #fffdf5;
        font-size: clamp(2.35rem, 3.8vw, 3.5rem);
        line-height: 1.08;
        letter-spacing: -.05em;
        text-wrap: balance;
    }
    p,
    .lead {
        max-width: 42ch;
        margin: 0;
        color: #f1f2e9;
        font-size: clamp(.96rem, 1.3vw, 1.08rem);
        line-height: 1.6;
        text-wrap: pretty;
    }
    .hero-actions {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 1rem;
        margin-top: 1.1rem;
        .btn {
            display: inline-flex;
            align-items: center;
            min-height: 38px;
            padding: 0 0 .25rem;
            border: 0;
            border-bottom: 2px solid #e88358;
            border-radius: 0;
            background: transparent !important;
            box-shadow: none;
            color: #fffdf5 !important;
            font-size: .82rem;
            font-weight: 800;
            letter-spacing: 0;
            text-transform: none;
            &:hover {
                color: #ffd7bd !important;
                border-color: #ffd7bd;
            }
        }
    }
    @media (max-width: 900px) {
        min-height: 470px;
        .hero-content-wrapper {
            min-width: 340px;
        }
    }
    @media (max-width: 768px) {
        min-height: 540px;
        padding: 0;
        background-position: 60% center;
        &::after {
            background: linear-gradient(90deg, rgba(8, 32, 24, .82), rgba(8, 32, 24, .38));
        }
        .container {
            padding-block: 72px;
        }
        .hero-content-wrapper {
            width: 100% !important;
            min-width: 0;
            max-width: 100%;
        }
    }
    @media (max-width: 650px) {
        min-height: 510px;
        &::after {
            background: linear-gradient(90deg, rgba(8, 32, 24, .88), rgba(8, 32, 24, .4));
        }
        .container {
            padding-block: 62px;
        }
        h1,
        h2 {
            font-size: clamp(2.2rem, 8vw, 2.75rem);
        }
    }
}


/* Tylko hero strony głównej: dodaj klasę "hero-home" w
   pages/01.home/_hero/hero.md, np.: hero_classes: 'hero-fullscreen text-light hero-home' */

.hero-home {
    .hero-content-wrapper::before {
        content: "KATALOG ODMIAN";
        display: block;
        width: fit-content;
        margin-bottom: .8rem;
        color: #f0d9b9;
        font-size: .68rem;
        font-weight: 800;
        letter-spacing: .16em;
        @media (max-width: 650px) {
            font-size: .6rem;
        }
    }
    .hero-actions .btn:nth-child(2) {
        display: none;
    }
}


/* ---------- Rytm sekcji ---------- */

#start>.section {
    padding: clamp(2.5rem, 4.5vw, 4rem) 0;
}

.section .container {
    max-width: 1320px;
}

.section-title-wrapper {
    margin-bottom: 1.25rem !important;
    padding-bottom: .6rem;
    border-bottom: 1px solid var(--v3-line);
    h2 {
        margin: 0;
        color: var(--v3-ink);
        text-align: center !important;
        font-size: clamp(2.1rem, 3.6vw, 3.8rem);
        line-height: 1.08;
    }
    .divider {
        display: none;
    }
    @media (max-width: 650px) {
        align-items: start;
        flex-direction: column;
    }
}

.modular-odmiany {
    background: var(--v3-paper);
    .section-title-wrapper::after {
        content: "Z NASZEGO KATALOGU";
        color: var(--v3-muted);
        font-size: .65rem;
        font-weight: 800;
        letter-spacing: .12em;
        white-space: nowrap;
    }
}


/* ---------- Feature boxes ---------- */

.feature-icon-box {
    margin-bottom: .75rem;
    color: var(--sad-primary);
    font-size: 1.8rem;
}

.feature-title {
    margin-bottom: .35rem;
    font-size: 1.2rem;
}

.feature-desc {
    margin-bottom: 0;
    color: var(--v3-muted);
    font-size: .95rem;
}

.section-features {
    padding: 2.5rem 1rem;
    .feature-card {
        box-sizing: border-box;
        height: 100%;
        margin-bottom: 1rem;
        padding: 1.75rem;
        background: var(--v3-card);
        border: 1px solid var(--v3-line);
        border-radius: 2px;
    }
}


/* ==========================================================
   Karty odmian / bloga — 4 kolumny, niepełny rząd się rozciąga
   ========================================================== */

.kategoria-blok {
    margin-block: 0 2.25rem !important;
    .kategoria-naglowek {
        margin: 0 0 .9rem;
        color: var(--v3-ink);
        font-size: clamp(1.9rem, 3vw, 2.7rem);
        line-height: 1.1;
    }
    .divider {
        display: none;
    }
}

:is(.modular-odmiany,
.kategoria-blok,
.modular-blog-recent) {
    --pad: 1.1rem;
    .fruits-grid {
        --per-view: 4;
        --grid-gap: 1rem;
        display: flex;
        flex-wrap: wrap;
        gap: var(--grid-gap);
        margin-bottom: 1.5rem;
        @media (max-width: 1024px) {
            --per-view: 3;
        }
        @media (max-width: 768px) {
            --per-view: 2;
        }
        @media (max-width: 520px) {
            --per-view: 1;
        }
    }
    .card-owoc {
        /* bazowo 1/N rzędu; flex-grow rozciąga karty w niepełnym rzędzie */
        flex: 1 1 calc((100% - (var(--per-view) - 1) * var(--grid-gap)) / var(--per-view) - 1px);
        display: flex;
        flex-direction: column;
        min-width: 0;
        min-height: 0;
        padding: 0;
        overflow: hidden;
        background: var(--v3-card) !important;
        border: 1px solid var(--v3-line);
        border-radius: 10px;
        box-shadow: none;
        transition: border-color .25s ease, transform .25s ease;
        a {
            color: inherit;
            text-decoration: none;
        }
        &:hover {
            border-color: var(--v3-accent);
            transform: translateY(-3px);
        }
        &:hover .card-image img {
            transform: scale(1.04);
        }
        @media (prefers-reduced-motion: reduce) {
            &,
            .card-image img {
                transition: none;
            }
            &:hover,
            &:hover .card-image img {
                transform: none;
            }
        }
    }
    .card-image {
        display: block;
        width: 100%;
        height: 220px;
        overflow: hidden;
        background: var(--q2-bg-muted);
        a {
            display: block;
            width: 100%;
            height: 100%;
        }
        img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform .4s ease;
        }
    }
    .card-header {
        padding: 1rem var(--pad) 0;
    }
    &:not(.modular-blog-recent) .card-category {
        display: inline-flex;
        padding: .35rem .55rem;
        border: 1px solid var(--v3-line);
        border-radius: 3px;
        color: var(--v3-ink);
        font-size: .62rem;
        font-weight: 800;
        letter-spacing: .13em;
        text-transform: uppercase;
    }
    .card-title {
        margin: .6rem 0 .4rem !important;
        color: var(--v3-ink);
        font-size: clamp(1.25rem, 1.7vw, 1.6rem);
        line-height: 1.15;
        overflow-wrap: anywhere;
        a {
            color: var(--v3-ink);
        }
    }
    .card-body {
        display: block;
        flex: 1;
        padding: 0 var(--pad);
         :is(p,
        .text-gray) {
            margin: 0;
            color: var(--v3-muted);
            font-size: .9rem;
            line-height: 1.5;
        }
    }
    .card-footer {
        padding: .8rem var(--pad) 1.1rem;
        .btn {
            display: inline-flex;
            align-items: center;
            width: max-content;
            min-height: 34px;
            padding: 0;
            border: 0;
            border-bottom: 2px solid var(--v3-accent);
            border-radius: 0;
            background: transparent !important;
            box-shadow: none;
            color: var(--v3-ink) !important;
            font-size: .74rem;
            font-weight: 800;
            letter-spacing: .06em;
            text-transform: uppercase;
            &:hover {
                color: #b45835 !important;
            }
        }
    }
}


/* Ostatnie wpisy z bloga (ciemne tło sekcji) */

.modular-blog-recent {
    background: var(--v3-dark);
    .section-title-wrapper {
        border-bottom-color: rgba(255, 255, 255, .18);
        h2 {
            color: #f8f3e8;
        }
    }
}


/* ---------- Przyciski ogólne ---------- */

.btn-primary {
    background-color: var(--sad-primary) !important;
    border-color: var(--sad-primary) !important;
    color: #fff !important;
    transition: background-color .2s ease, border-color .2s ease;
    &:hover {
        background-color: var(--sad-primary-hover) !important;
        border-color: var(--sad-primary-hover) !important;
    }
}

.btn,
.button {
    border-radius: 2px;
}

.card {
    border-color: var(--v3-line);
    border-radius: 2px;
    box-shadow: none;
}


/* ---------- Zaproszenie do kontaktu ---------- */

.modular-callout {
    position: relative;
    overflow: hidden;
    background: #e8e4d8;
    text-align: left;
    &::before {
        content: "";
        position: absolute;
        right: -2%;
        bottom: -1px;
        width: min(62vw, 850px);
        height: min(34vw, 370px);
        background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20760%20330%22%20fill%3D%22none%22%20stroke%3D%22%23446b57%22%20stroke-width%3D%222.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%20%20%3Cpath%20d%3D%22M18%20309c93-9%20175-6%20263%200%20107%207%20202-13%20291-9%2062%202%20121%208%20175%201%22%2F%3E%0A%20%20%3Cpath%20d%3D%22M166%20305c3-31%202-67-2-101m1%2023c-22-28-44-41-74-48m75%2031c19-30%2045-46%2077-52%22%2F%3E%0A%20%20%3Cpath%20d%3D%22M76%20185c-20-12-25-34-11-50-13-19-3-42%2018-47%204-22%2028-31%2045-21%2015-22%2041-21%2055-2%2024-10%2046%202%2050%2024%2022%202%2035%2024%2026%2043%2014%2019%203%2045-19%2048-13%2021-37%2025-52%2011-20%2016-46%2011-56-7-23%209-43-1-56-19z%22%2F%3E%0A%20%20%3Cpath%20d%3D%22M95%20180c15-3%2029-2%2043%203m47-20c18-8%2038-11%2058-5m-81%2044c-2-22-8-36-18-46%22%2F%3E%0A%20%20%3Cpath%20d%3D%22M469%20308c6-45%208-87%204-128m0%2055c-26-34-58-54-95-63m94%2044c32-38%2072-56%20112-60m-113%2031c-9-35-30-63-53-80%22%2F%3E%0A%20%20%3Cpath%20d%3D%22M377%20174c-28-4-43-26-36-51-20-18-11-49%2014-57%201-27%2029-44%2053-34%2020-24%2053-20%2069%202%2027-12%2059%201%2067%2027%2030-3%2049%2023%2039%2048%2025%2018%2019%2053-7%2064-4%2028-35%2042-58%2026-21%2021-54%2020-71-2-29%2014-59%202-70-23z%22%2F%3E%0A%20%20%3Cpath%20d%3D%22M399%20169c22-7%2045-4%2065%209m51-25c18-11%2040-15%2061-13m-109%2031c-4-24-15-41-29-52%22%2F%3E%0A%20%20%3Cpath%20d%3D%22M115%20178c-9%2015-9%2030%203%2035%2013%205%2027-7%2022-23-3-8-10-15-17-21m-5%209c1-9%206-14%2014-16%22%2F%3E%0A%20%20%3Cpath%20d%3D%22M220%20161c-11%2010-10%2026%202%2032%2011%206%2026%200%2027-15%201-11-8-19-20-24m-8%207c1-8%205-13%2012-16%22%2F%3E%0A%20%20%3Cpath%20d%3D%22M396%20177c-12%208-13%2025-2%2033%2010%208%2026%203%2029-10%203-11-3-23-16-29m-10%206c2-8%207-12%2015-14%22%2F%3E%0A%20%20%3Cpath%20d%3D%22M540%20163c-11%2011-9%2028%204%2033%2012%205%2025-3%2025-17%200-11-9-19-20-23m-8%207c2-8%207-13%2014-15%22%2F%3E%0A%20%20%3Cpath%20d%3D%22M112%20158c-12-1-19-7-24-16%2012-3%2022%200%2029%2010m111-9c-11-3-17-10-19-20%2012-1%2022%205%2025%2015m171%2024c-12-2-18-8-22-19%2013-2%2021%202%2027%2012m136-14c-11-2-18-8-23-18%2013-3%2022%202%2028%2012%22%2F%3E%0A%3C%2Fsvg%3E%0A") right bottom / contain no-repeat;
        opacity: .28;
        pointer-events: none;
    }
    .container {
        position: relative;
        z-index: 1;
        display: grid;
        align-items: end;
        text-align: left;
        grid-template-columns: minmax(0, 1.3fr) minmax(220px, .7fr);
        gap: .6rem 4rem;
    }
    h2 {
        max-width: 780px;
        margin: 0;
        color: #142e27;
        font-size: clamp(2.2rem, 3.8vw, 4rem);
        line-height: 1.08;
    }
    .callout-body {
        grid-column: 1;
        max-width: 660px;
        p {
            margin: 0;
            color: #263d30;
            font-size: .98rem;
            line-height: 1.55;
        }
    }
    .button.primary {
        grid-column: 2;
        grid-row: 1 / span 2;
        justify-self: end;
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        padding: .75rem 1.15rem;
        border: 1px solid #142e27;
        border-radius: 2px;
        background: #142e27;
        color: #fff;
        font-size: .76rem;
        font-weight: 800;
        letter-spacing: .04em;
        text-transform: uppercase;
        text-decoration: none !important;
        &:hover {
            background: #fff;
            color: #142e27;
        }
    }
    @media (max-width: 900px) {
        .container {
            grid-template-columns: 1fr;
        }
        .callout-body,
        .button.primary {
            grid-column: 1;
            grid-row: auto;
            justify-self: start;
        }
    }
    @media (max-width: 650px) {
        h2 {
            font-size: 2.35rem;
        }
        &::before {
            right: -30%;
            width: 120%;
            height: 230px;
            opacity: .14;
        }
    }
}


/* ---------- Podstrony (treść, formularz) i stopka ---------- */

body:not(.modular) #start {
    background: var(--v3-paper);
    .container {
        max-width: 1160px;
    }
}

.v3-variety-photo {
    max-width: 800px;
    margin: 0 auto 1.5rem;
    overflow: hidden;
    border-radius: 10px;
    img {
        display: block;
        width: 100%;
        max-height: 460px;
        aspect-ratio: 3 / 2;
        object-fit: cover;
    }
}

#body-wrapper {
    .content-item {
        max-width: 900px;
        margin: 0 auto;
        &>h1 {
            margin-bottom: .4rem;
            font-size: clamp(2rem, 4vw, 3.5rem);
            line-height: 1.08;
        }
        &>p {
            color: var(--v3-muted);
        }
    }
    .form-wrapper {
        margin: 1.5rem auto 0;
        padding: clamp(1.4rem, 3vw, 2.6rem);
        background: var(--v3-card);
        border: 1px solid var(--v3-line);
        border-radius: 12px;
        box-shadow: 0 18px 50px rgba(0, 0, 0, .08);
        scroll-margin-top: 100px;
        animation: v3-form-enter .65s cubic-bezier(.2, .7, .2, 1) both;
        @media (prefers-reduced-motion: reduce) {
            animation: none;
        }
        form {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
            gap: 1.15rem;
        }
    }
    .form-field {
        min-width: 0;
        margin: 0;
    }
     :is(.form-field:has(textarea),
    .button-wrapper) {
        grid-column: 1 / -1;
    }
    .form-label {
        display: block;
        margin-bottom: .4rem;
        color: var(--v3-ink);
        font-size: .8rem;
        font-weight: 700;
    }
    .form-input {
        width: 100%;
        min-height: 46px;
        padding: .7rem .85rem;
        background: var(--v3-paper);
        border: 1px solid var(--v3-line);
        border-radius: 5px;
        color: var(--v3-ink);
        box-shadow: none;
        &:focus {
            border-color: var(--v3-accent);
            outline: 2px solid var(--v3-accent);
            outline-offset: 1px;
        }
    }
    textarea.form-input {
        min-height: 150px;
        resize: vertical;
    }
    .button-wrapper {
        margin-top: .2rem;
        button {
            width: auto;
            min-height: 46px;
            padding: .7rem 1.25rem;
            border: 0;
            border-radius: 5px;
            background: var(--v3-accent);
            color: #142e27;
            font-weight: 800;
        }
    }
}

@keyframes v3-form-enter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#footer {
    background: var(--v3-dark);
    border-top: 1px solid var(--v3-line);
    color: #dce8db;
    p,
    a {
        color: inherit;
    }
}


/* ---------- Pomocnicze ---------- */

.centro {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

.hex {
    display: none;
}