/* Montserrat se načítá lokálně z fonts */

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/montserrat-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/montserrat-500.woff2') format('woff2');
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/montserrat-700.woff2') format('woff2');
}

/* =========================================
   Global Variables & CSS Reset
   ========================================= */

:root {
    /* Color Palette */
    --color-bg-cream: rgb(241, 247, 237);
    --color-leaf-light: rgb(185, 210, 185);
    --color-forest-dark: rgb(36, 62, 54);
    --color-forest-medium: rgb(101, 154, 108);

    /* Typography */
    --font-main: 'Montserrat', 'Segoe UI', Roboto, system-ui, -apple-system, Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg-cream); /* Čisté krémové pozadí pro celou stránku */
    color: var(--color-forest-dark);
    line-height: 1.6;
}

/* Tlačítka (<button>) písmo nedědí – bez tohohle byla v systémovém Arialu */
button {
    font-family: inherit;
}

/* Fotogalerie: leaf-light pozadí stránky */
.page-gallery {
    background-color: var(--color-leaf-light);
}

/* =========================================
   Header Block (Mobile First)
   ========================================= */
.header {
    background-color: var(--color-forest-medium);
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: relative; /* Nově přidáno: kotevní bod pro plovoucí menu */
}

/* Container for logo and burger */
.header__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;

    /* Přidáno pro Nike styl: */
    position: relative; 
    z-index: 100; /* Udrží horní lištu VŽDY úplně nahoře nad vším */
}

/* Logo: 150 px (dřív 120 px). Na úzkém mobilu jen tolik, aby nezajelo pod
   otevřené menu (panel ~189 px + 24 px okraj + 8 px mezera), nikdy pod 120 px. */
.header__img {
    max-width: clamp(120px, calc(100vw - 221px), 150px);
    height: auto;
}

/* Burger button styles */
.header__burger {
    background: none;
    border: none;
    color: var(--color-bg-cream);
    font-size: 2rem;
    cursor: pointer;
}

/* Když je menu otevřené, křížek se ukotví k obrazovce v rohu tmavého panelu */
.header__burger--active {
    position: fixed;
    top: 1rem;
    right: 1.5rem;
    z-index: 100;
}

/* Navigation menu (Slide-in Drawer) */
.header__nav {
    display: flex; 
    flex-direction: column;
    align-items: flex-start; /* Nike dává odkazy moderně zarovnané doleva */
    
    position: fixed;      /* Drží na obrazovce, i když scrolluješ */
    top: 0;
    right: 0;
    width: 50vw;              /* Panel zabere polovinu šířky displeje… */
    min-width: max-content;   /* …ale nikdy užší než nejdelší odkaz („Naše dřeviny“ se nezalomí) */
    height: auto;             /* Výška podle obsahu – dřív 45vh a „O nás“ přetékalo z panelu */
    min-height: 45vh;
    max-height: 100vh;
    overflow-y: auto;         /* Na hodně nízkém displeji (telefon naležato) jde menu posunout */
    
    background-color: var(--color-forest-dark);
    padding: 6rem 2rem 2rem 2rem; /* Velká mezera nahoře, aby texty nepodlezly pod tlačítko */

    /* Oddělení panelu od pozadí (hlavně od tmavé page-intro) */
    border-left: 3px solid var(--color-leaf-light);
    border-bottom-left-radius: 1rem;

    /* Magie pro vyjíždění */
    transform: translateX(100%); /* Odsune celý panel doprava, úplně mimo displej */
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Profi hladká animace */
    z-index: 90; /* Panel je pod horní lištou, ale nad zbytkem webu */
}

/* BEM Modifier for active state */
.header__nav--active {
    transform: translateX(0); /* Vrátí panel zpět na jeho místo (na displej) */
}

/* Link styles inside navigation */
.header__link {
    text-decoration: none;
    color: var(--color-bg-cream);
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0.4rem 0;
    transition: color 0.2s ease;
}

.header__link:hover {
    color: var(--color-leaf-light);
}

/* =========================================
   Hero Block (Mobile First)
   ========================================= */
.hero {
    position: relative;
    overflow: hidden; /* pojistka proti vodorovnému přetečení dlouhého titulku */
    padding: 6rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;

    /* Jemný přechod přes lesní fotku – kontrast textu řeší panel za obsahem.
       Fotka = 3. fotka z fotogalerie (galerie/3.jpg) zmenšená na 1920 px jako WebP (pod 300 kB) */
    background-image:
        linear-gradient(to bottom, rgba(15, 26, 22, 0.25) 0%, rgba(15, 26, 22, 0.55) 100%),
        url('images/hero.webp');
    background-size: cover;
    background-position: center; /* fotka se ořízne rovnoměrně ze všech stran */
    background-repeat: no-repeat;

    min-height: 88vh;
    min-height: 90svh;
}

.hero__content {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    max-width: 520px;
    padding: 2.5rem 2rem;
}

/* Tmavý závoj za textem, plynule mizící do fotky – bez viditelné hrany */
.hero__content::before {
    content: "";
    position: absolute;
    inset: -3.5rem -2.5rem;
    z-index: -1;
    /* closest-side = gradient doběhne do nuly přesně na hraně prvku
       (dřív byla na šířkách od ~700 px vidět svislá hrana závoje);
       scale(1.42) vrací původní rozsah ztmavení */
    transform: scale(1.42);
    background: radial-gradient(closest-side,
        rgba(13, 23, 20, 0.85) 0%,
        rgba(13, 23, 20, 0.84) 28%,
        rgba(13, 23, 20, 0.78) 42%,
        rgba(13, 23, 20, 0.66) 54%,
        rgba(13, 23, 20, 0.5) 65%,
        rgba(13, 23, 20, 0.32) 77%,
        rgba(13, 23, 20, 0.15) 89%,
        rgba(13, 23, 20, 0) 100%);
    filter: blur(16px);
}

.hero__title {
    font-size: clamp(1.9rem, 6vw, 2.8rem);
    color: var(--color-leaf-light);
    line-height: 1.15;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.hero__title-lead {
    display: block;
    white-space: nowrap; /* „Stojíme na začátku“ vždy na jednom řádku */
}

.hero__title-accent {
    display: block;
    color: var(--color-bg-cream);
}

.hero__text {
    font-size: clamp(1rem, 3.5vw, 1.2rem);
    color: var(--color-bg-cream);
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

/* Šipka „posunout dolů“ */
.hero__scroll {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-bg-cream);
    border: 2px solid rgba(241, 247, 237, 0.7);
    border-radius: 50%;
    animation: hero-scroll-bounce 1.8s ease-in-out infinite;
}

@keyframes hero-scroll-bounce {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 6px); }
}

@media (prefers-reduced-motion: reduce) {
    .hero__scroll { animation: none; }
}

/* =========================================
   Button Components
   ========================================= */
/* Toto je základní tvar a chování KAŽDÉHO tlačítka na webu */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 2rem;    /* Udělá tlačítko krásně oválné (pilulkový tvar) */
    text-decoration: none;  /* Schová podtržení odkazu */
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
    transition: all 0.3s ease; /* Zajišťuje plynulou animaci */
    border: none;
}

/* Toto jsou specifické barvy pro HLAVNÍ (primary) tlačítko */
.btn--primary {
    background-color: var(--color-forest-medium);
    color: var(--color-bg-cream);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Jemný stín pod tlačítkem */
}

/* Efekt při přejetí myší (hover) */
.btn--primary:hover {
    background-color: var(--color-forest-dark);
    transform: translateY(-3px); /* Tlačítko se vizuálně malinko zvedne */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); /* Zvětší se pod ním stín */
}

/* Rozložení tlačítek v Hero sekci */
.hero__buttons {
    display: flex;
    flex-direction: column; /* Na mobilu budou tlačítka pod sebou */
    align-items: center;
    gap: 1rem;              /* Stejnoměrná mezera mezi tlačítky */
    width: 100%;            
}

/* Tlačítko s obrysem (Sekundární) */
.btn--outline {
    background-color: transparent; /* Průhledné pozadí, bude vidět krémový filtr/stromy */
    color: var(--color-forest-dark);
    border: 2px solid var(--color-forest-dark); /* Tmavě zelený rámeček */
}

/* Efekt při najetí myší pro sekundární tlačítko */
.btn--outline:hover {
    background-color: var(--color-forest-dark);
    color: var(--color-bg-cream);
    transform: translateY(-3px);
}

.hero__buttons .btn {
    min-width: 200px; /* Nastaví minimální šířku, aby obě tlačítka vypadala stejně symetricky */
}

/* Světlá varianta obrysového tlačítka na tmavém hero */
.hero .btn--outline {
    color: var(--color-bg-cream);
    border-color: var(--color-bg-cream);
}

.hero .btn--outline:hover {
    background-color: var(--color-bg-cream);
    color: var(--color-forest-dark);
}

/* =========================================
   Obecné styly sekcí
   ========================================= */
.section-title {
    font-size: 2rem;
    line-height: 1.2;
    color: var(--color-forest-dark);
    text-align: center;
    margin-bottom: 2rem;

    /* Vlastní zaoblené podtržení (zrušíme to výchozí) */
    text-decoration: none;
    position: relative; /* Potřebné pro správné umístění čáry pod text */
    display: inline-block; /* Zajistí, že čára bude jen tak široká jako text */
}

/* Toto nakreslí tu naši novou zaoblenou čáru */
.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    
    /* KLÍČOVÉ PRO CENTROVÁNÍ: */
    left: 50%;
    transform: translateX(-50%);
    
    width: 100%; /* Podtržení přes celou šířku textu */
    height: 5px;
    background-color: var(--color-forest-medium);
    border-radius: 5px;
}

/* =========================================
   Services Preview (Homepage)
   ========================================= */
.services {
    padding: 4rem 1.5rem; /* Vytvoří prostor nahoře, dole a po stranách */
    display: flex;
    flex-direction: column;
    align-items: center;  /* Vycentruje nadpis i tlačítko na střed */
}

.services__grid {
    display: flex;
    flex-direction: column; /* Na mobilu budou karty pod sebou */
    gap: 1.5rem;            /* Mezera mezi kartami */
    width: 100%;
    max-width: 400px;
    margin-top: 2rem;       /* Větší mezera pod nadpisem */
    margin-bottom: 2.5rem;  /* Mezera nad tlačítkem */
}

/* Komponenta: Karta služby */
.card {
    background-color: white; /* Bílé pozadí karet je krásně oddělí od krémového body */
    padding: 1.5rem;
    border-radius: 12px;     /* Zakulacené rohy */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); /* Velmi jemný stín pro 3D efekt */
    border-top: 4px solid var(--color-forest-medium); /* Zelená linka nahoře pro oživení */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 26px rgba(36, 62, 54, 0.13);
}

/* =========================================
   Homepage – „lesík“ vyrůstající ze spodní hrany karet služeb
   ========================================= */
.services__grid .card {
    position: relative;
    overflow: hidden;
    padding-bottom: 3.25rem; /* stromky končí jen pár px pod textem */
}

.services__grid .card::after {
    content: "";
    position: absolute;
    right: 24px; /* celý lesík je odsazený od pravé hrany karty */
    bottom: -4px; /* spodek kmínků je uříznutý hranou karty */
    width: 240px;
    height: 60px;
    pointer-events: none;
}

/* Vizuál jen tam, kde prohlížeč umí mask (jinak žádná dekorace, ne obdélník) */
@supports (mask-image: url(#s)) or (-webkit-mask-image: url(#s)) {
    .services__grid .card::after {
        background-color: var(--color-forest-medium);
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
    }
}

/* Všechny třípatrové stromky 50 px, všechny dvoupatrové 32 px.
   Každá karta má jinou kombinaci a jiné rozestupy. */

/* Karta 1 – velký + malý */
.services__grid .card:nth-child(1)::after {
    -webkit-mask-image: url('images/stromek-velky.svg'), url('images/stromek.svg');
    mask-image: url('images/stromek-velky.svg'), url('images/stromek.svg');
    -webkit-mask-size: auto 50px, auto 32px;
    mask-size: auto 50px, auto 32px;
    -webkit-mask-position: right 44px bottom, right 4px bottom;
    mask-position: right 44px bottom, right 4px bottom;
}

/* Karta 2 – malý + velký + malý */
.services__grid .card:nth-child(2)::after {
    -webkit-mask-image: url('images/stromek.svg'), url('images/stromek-velky.svg'), url('images/stromek.svg');
    mask-image: url('images/stromek.svg'), url('images/stromek-velky.svg'), url('images/stromek.svg');
    -webkit-mask-size: auto 32px, auto 50px, auto 32px;
    mask-size: auto 32px, auto 50px, auto 32px;
    -webkit-mask-position: right 6px bottom, right 44px bottom, right 92px bottom;
    mask-position: right 6px bottom, right 44px bottom, right 92px bottom;
}

/* Karta 3 – velký + malý + malý */
.services__grid .card:nth-child(3)::after {
    -webkit-mask-image: url('images/stromek-velky.svg'), url('images/stromek.svg'), url('images/stromek.svg');
    mask-image: url('images/stromek-velky.svg'), url('images/stromek.svg'), url('images/stromek.svg');
    -webkit-mask-size: auto 50px, auto 32px, auto 32px;
    mask-size: auto 50px, auto 32px, auto 32px;
    -webkit-mask-position: right 8px bottom, right 52px bottom, right 92px bottom;
    mask-position: right 8px bottom, right 52px bottom, right 92px bottom;
}

.card__title {
    font-size: 1.2rem;
    color: var(--color-forest-dark);
    margin-bottom: 0.8rem;
}

.card__text {
    font-size: 1rem;
    color: #4a5d4e; /* O něco světlejší zelená/šedá pro text, aby se odlišil od nadpisu */
    line-height: 1.5;
    font-weight: 700; /* PŘIDÁNO: Text bude o něco tučnější (Medium) */
}

/* =========================================
   Footer (Patička)
   ========================================= */
.footer {
    background-color: var(--color-forest-dark); /* Tmavý podklad */
    color: var(--color-bg-cream);               /* Světlý text */
    padding: 3rem 1.5rem 1.5rem;
    text-align: center;
}

.footer__content {
    display: flex;
    flex-direction: column; /* Na mobilu vše pěkně pod sebou */
    gap: 2.5rem;            /* Větší mezery mezi jednotlivými bloky */
    margin-bottom: 3rem;
}

.footer__section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer__title {
    font-size: 1.2rem;
    color: white; /* Čistě bílá nadpisy trochu víc vytáhne */
    margin-bottom: 0.5rem;
    text-transform: uppercase; /* Všechna písmena velká pro moderní vzhled */
    letter-spacing: 1px;       /* Větší mezery mezi písmeny u nadpisu */
}

/* Klikací odkazy v patičce */
.footer__link {
    color: var(--color-bg-cream);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
}

/* Podtržení při najetí (pro případ, že na to někdo kouká na počítači) */
.footer__link:hover {
    text-decoration: underline;
    text-decoration-color: var(--color-forest-medium);
    text-decoration-thickness: 2px;
}

/* Úplný spodek s copyrightem */
.footer__bottom {
    /* Jemná poloprůhledná linka oddělující copyright */
    border-top: 1px solid rgba(241, 247, 237, 0.2); 
    padding-top: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.8; /* Lehce ztlumený text */
}

.page-intro{
    display: flex;
    flex-direction: column;
    align-items: center;
   
    margin: 0 auto;
    

    justify-content: center;
    min-height: 150px;
    padding: 1.5rem; /* dlouhý nadpis (Ochrana osobních údajů) na mobilu nelepí na okraje */

    background-color: var(--color-forest-dark);
    /* Obrázek na pozadí */
    background-image: url('images/intro.svg'); 
    background-size: cover;      /* Obrázek se přizpůsobí velikosti sekce */
    background-position: center; /* Střed obrázku bude vždy uprostřed */
    background-repeat: no-repeat;
    
}

.page-intro__title{
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-bg-cream);
    text-align: center;
    
    /* Vlastní zaoblené podtržení (zrušíme to výchozí) */
    text-decoration: none; 
    position: relative; /* Potřebné pro správné umístění čáry pod text */
    width:fit-content;
    text-wrap: balance; /* dvouřádkový nadpis se rozdělí na dva podobně dlouhé řádky */
}

/* Toto nakreslí tu naši novou zaoblenou čáru */
.page-intro__title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    
    
    width: 100%; /* Tvá nastavená šířka */
    height: 7px;
    background-color: var(--color-forest-medium);
    border-radius: 5px;
}

.offer-full {
    padding: 1.5rem 1.5rem 3rem 1.5rem; /* Vytvoří prostor nahoře, dole a po stranách */
    display: flex;
    flex-direction: column;
    align-items: center;  /* Vycentruje nadpis i tlačítko na střed */
    background-color: var(--color-leaf-light);
}

.offer-full__grid{
    display: flex;
    flex-direction: column; /* Na mobilu budou karty pod sebou */
    gap: 1.5rem;            /* Mezera mezi kartami */
    width: 100%;
    max-width: 400px;
    margin-bottom: 1.5rem;  /* Mezera nad tlačítkem */
}

.card--dark{
    border-top: 4px solid var(--color-forest-dark); /* Zelená linka nahoře pro oživení */
}

/* =========================================
   Naše služby (body.page--services)
   ========================================= */

/* Karty s tmavým rámečkem kolem dokola jako fotky ve fotogalerii:
   stejná barva a šířka (1rem) jako rám galerie, uvnitř stejné zaoblení
   12 px jako fotky (vnější zaoblení = 12 px + 1rem rámečku) */
.page--services .offer-full__grid .card {
    border: 1rem solid var(--color-forest-dark);
    border-radius: calc(12px + 1rem);
}

.card__toggle{
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-forest-medium);
    font-weight: 700; /* PŘIDÁNO: Text bude o něco tučnější (Medium) */
    font-size: 0.9rem;
}

.card__details{
    display: none;
}

.card__details--visible{
    display: block;
    margin-top: 1rem;
    font-size: 1rem;
    color: #4a5d4e; /* O něco světlejší zelená/šedá pro text, aby se odlišil od nadpisu */
    line-height: 1.5;
    font-weight: 700;
}

.offer-full__cta-text{
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    text-align: center;
}

/* =========================================
   Grants Section (Naše služby page)
   ========================================= */
.grants {
    padding: 3rem 1.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.grants__title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-forest-dark);
    margin-bottom: 1rem;

    position: relative;
    text-decoration: none;
    width: 20rem;
}

.grants__title::after{
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;

    height: 5px;
    background-color: var(--color-forest-medium);
    border-radius: 5px;
    width: 100%;
}

.grants__intro {
    font-size: 1rem;
    color: var(--color-forest-dark);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.grants__list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

.grants__item {
    background-color: white;
    border: 1px solid var(--color-leaf-light);
    border-radius: 999px;
    padding: 0.5rem 1.1rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-forest-dark);
}

.grants__note {
    font-size: 0.95rem;
    color: #4a5d4e;
    line-height: 1.6;
    font-weight: 700;
}

.grants__cta{
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* =========================================
   Trees Section (Naše dřeviny page)
   ========================================= */
.trees {
    padding: 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--color-leaf-light);
}

.trees__grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 400px;
    padding-bottom: 1rem;
}

.card--light {
    background-color: var(--color-bg-cream);
    border-top: solid 4px var(--color-forest-dark);
}

.card__image {
    width: calc(100% + 3rem);
    height: 180px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    margin: -1.5rem -1.5rem 0rem -1.5rem;
}

.price-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.price-table th,
.price-table td {
    text-align: left;
    padding: 0.5rem 0.25rem;
    border-bottom: 1px solid var(--color-forest-dark);
    font-size: 0.9rem;
}

/* =========================================
   Price List Modal (Naše dřeviny page)
   ========================================= */
.price-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.price-modal--active {
    display: flex;
}

.price-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(36, 62, 54, 0.85);
}

.price-modal__content {
    position: relative;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    background-color: white;
    border-radius: 12px;
    padding: 2.8rem 0.3rem 0.3rem; /* nahoře místo pro tlačítko Zavřít, aby nezakrývalo záhlaví tabulky */
}

.price-modal__image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.price-modal__close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background-color: var(--color-forest-dark);
    color: var(--color-bg-cream);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cenik-button{
    margin-top: 1.5rem;
}

/* =========================================
   Two-tone Section Heading (O nás page)
   ========================================= */
.section-heading {
    font-size: 1.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-forest-dark);
    margin-bottom: 1rem;
}

.section-heading__accent {
    color: var(--color-forest-medium);
}

/* =========================================
   Page Intro Text (needs light color - dark background!)
   ========================================= */
.page-intro__text {
    color: var(--color-forest-dark);
    text-align: center;
    font-size: 1rem;
    line-height: 1.6;
    max-width: 320px;
    margin: 0 auto 0.5rem auto;
}

/* =========================================
   Story & Mission sections
   ========================================= */
.story,
.mission {
    padding: 2rem 1.5rem;
    max-width: 500px;
    margin: 0 auto;
}

.story__text,
.mission__text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-forest-dark);
    font-weight: 700;
}

.story__text--bottom{
    margin-top: 1.5rem;
}

.mission {
    background-color: white;
    border-left: 4px solid var(--color-forest-medium);
    border-radius: 0 12px 12px 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mission:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 26px rgba(36, 62, 54, 0.13);
}

/* =========================================
   Species Section
   ========================================= */
.species {
    padding: 2rem 1.5rem;
    max-width: 500px;
    margin: 0 auto;
}

.species__subtitle {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-forest-dark);
    margin: 1rem 0 0.6rem 0;
}

.species__list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.species__item {
    background-color: white;
    border: 1px solid var(--color-leaf-light);
    border-radius: 999px;
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-forest-dark);
}

/* =========================================
   Origin Section (reuses .card + .card__toggle mechanism)
   ========================================= */
.origin {
    padding: 2rem 1.5rem 3rem 1.5rem;
    max-width: 500px;
    margin: 0 auto;
}

.card__onas{
    border-top: none;
    border-radius: 0 12px 12px 0; /* zaoblená pravá strana, stejně jako .mission */
    margin-bottom: 3rem;
}

/* Tmavší text na kartě "Naše sazenice" */
.card__onas .card__text,
.card__onas .card__details--visible{
    color: var(--color-forest-dark);
}

/* =========================================
   Gallery Section (Fotogalerie page)
   ========================================= */
.gallery {
    padding: 1rem; /* rámeček zvenku stejně široký jako mezery mezi fotkami (gap 1rem) */
    max-width: 500px;
    margin: 2rem auto;
    background-color: var(--color-forest-dark);
    border-radius: 0.75rem;
}

.gallery__grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gallery__thumb-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: block;
    width: 100%;
}

.gallery__thumb {
    width: 100%;
    aspect-ratio: 3 / 2; /* stejný poměr na mobilu i desktopu */
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

/* =========================================
   Gallery Modal (Fotogalerie page)
   ========================================= */
.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.gallery-modal--active {
    display: flex;
}

.gallery-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(36, 62, 54, 0.85);
}

.gallery-modal__content {
    position: relative;
    max-width: min(900px, 92vw);
    width: auto;            /* obalí obrázek – na výšku i na šířku */
    max-height: 92vh;
    overflow: hidden;
    background-color: white;
    border-radius: 12px;
    padding: 0.3rem;
}

.gallery-modal__image {
    display: block;
    max-width: 100%;
    max-height: 88vh;       /* vysoká fotka na výšku se vejde bez scrollování */
    width: auto;
    height: auto;
    margin: 0 auto;
    border-radius: 8px;
}

.gallery-modal__close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background-color: var(--color-forest-dark);
    color: var(--color-bg-cream);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-modal__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background-color: rgba(36, 62, 54, 0.7);
    color: var(--color-bg-cream);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.gallery-modal__nav--prev {
    left: 0.5rem;
}

.gallery-modal__nav--next {
    right: 0.5rem;
}

/* =========================================
   Contact Form (Kontakt page)
   ========================================= */
.contact-form {
    padding: 2rem 1.5rem 3rem 1.5rem;
    max-width: 500px;
    margin: 0 auto;
}

.contact-form__form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.contact-form__field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.contact-form__label {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-forest-dark);
}

.contact-form__input {
    padding: 0.8rem 1rem;
    border: 1px solid var(--color-leaf-light);
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 1rem;
    color: var(--color-forest-dark);
    background-color: white;
}

.contact-form__textarea {
    resize: vertical;
}

.contact-form__consent {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--color-forest-dark);
}

.contact-form__consent input {
    margin-top: 0.2rem;
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
    accent-color: var(--color-forest-medium);
}

.contact-form__consent a {
    color: var(--color-forest-dark);
    font-weight: 700;
    text-decoration-color: var(--color-forest-medium);
    text-decoration-thickness: 2px;
}

/* Výrazné upozornění pod úvodním textem formuláře (Pouze osobní odběr.),
   aby ho nikdo nepřehlédl */
.contact-form__note {
    margin: -0.5rem 0 1.5rem 0;
    padding: 0.75rem 1rem;
    background-color: var(--color-leaf-light);
    border-left: 4px solid var(--color-forest-dark);
    border-radius: 0 8px 8px 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-forest-dark);
}

/* =========================================
   Locations / Maps (Kontakt page)
   ========================================= */
.locations {
    padding: 2rem 1.5rem 3rem 1.5rem;
    max-width: 500px;
    margin: 2rem auto;
    background-color: var(--color-leaf-light);
    border-radius: 0.75rem;
    border-left: 4px solid var(--color-forest-dark);
}

.locations__grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.locations__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-forest-dark);
    margin-bottom: 0.5rem;
}

.locations__map-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--color-forest-medium);
}

.locations__map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.story__text--kontakt{
    margin-top: -0.5rem;
    margin-bottom: 1.5rem;
}

.contact-person{
    padding: 2rem 1.5rem 2rem 1.5rem;
    max-width: 500px;
    margin: 0 auto;
    background-color: white;
    border-left: 4px solid var(--color-forest-dark);
    border-radius: 0.75rem;
    box-shadow: 0 2px 10px rgba(36, 62, 54, 0.08);
}

.contact-person__photo{
    display: block;
    width: 100%;
    max-width: 220px;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    margin: 0 0 1.25rem 0.5rem;
}

.contact-person__photo-img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transform: translate(-2rem, -5rem) scale(1.6);
    transform-origin: center top;
}

.contact-person__name{
    padding-left: 0.5rem;

}

.contact-person__contacts{
    padding-left: 0.5rem;
    font-weight: 700;
    
}

.contact-person__contacts__accent{
    color: var(--color-forest-medium);
}

/* Telefon v kartě kontaktní osoby: klikací (tel:), ale v barvě textu a ne v modré.
   Stejně jako odkazy v patičce se podtrhne až při najetí myší. */
.contact-person__link{
    color: inherit;
    text-decoration: none;
}

.contact-person__link:hover{
    text-decoration: underline;
    text-decoration-color: var(--color-forest-medium);
    text-decoration-thickness: 2px;
}

/* Kontaktní formulář – honeypot (skryté antispam pole) */
.contact-form__hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Kontaktní formulář – stavová hláška po odeslání */
.contact-form__status {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    background-color: var(--color-leaf-light);
    color: var(--color-forest-dark);
}

.contact-form__status--ok {
    background-color: var(--color-forest-medium);
    color: var(--color-bg-cream);
}

.contact-form__status--error {
    background-color: #b23b3b;
    color: #fff;
}

/* =========================================
   Legal / Zásady zpracování osobních údajů
   ========================================= */
.legal {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem 1.5rem;
}

.legal__text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-forest-dark);
    margin-bottom: 1rem;
}

.legal__heading {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-forest-dark);
    margin: 1.6rem 0 0.6rem 0;
}

.legal__list {
    margin: 0 0 1rem 1.25rem;
    line-height: 1.6;
    color: var(--color-forest-dark);
}

.legal__list li {
    margin-bottom: 0.3rem;
}

.legal__meta {
    font-size: 0.9rem;
    color: var(--color-forest-medium);
    margin-bottom: 1.5rem;
}

.legal__meta--note {
    margin-top: 2rem;
    padding: 0.8rem 1rem;
    background-color: var(--color-leaf-light);
    border-radius: 8px;
    color: var(--color-forest-dark);
}

.legal a {
    color: var(--color-forest-medium);
    font-weight: 700;
}

.footer__bottom p + p {
    margin-top: 0.5rem;
}

/* Odkaz „Nastavení cookies“ v patičce – je to <button>, ale vypadá jako odkaz */
.footer__consent-btn {
    background: none;
    border: none;
    padding: 0;
    line-height: inherit;
    cursor: pointer;
}

/* =========================================
   Consent banner – souhlas s mapami Google
   ========================================= */
.consent {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 150; /* nad obsahem i hlavičkou, pod modály galerie a ceníku (200) */
    max-width: 560px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    background-color: var(--color-forest-dark);
    color: var(--color-bg-cream);
    border-top: 4px solid var(--color-forest-medium);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.consent[hidden] {
    display: none;
}

.consent__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.4rem;
}

.consent__text {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.consent__text a {
    color: var(--color-leaf-light);
    font-weight: 700;
}

.consent__actions {
    display: flex;
    gap: 0.75rem;
}

/* Obě volby stejně velké – odmítnout musí jít stejně snadno jako souhlasit */
.consent__btn {
    flex: 1 1 0;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    cursor: pointer;
}

/* Na tmavé liště by výchozí hover (tmavě zelená) splynul s pozadím */
.consent .btn--primary:hover {
    background-color: var(--color-leaf-light);
    color: var(--color-forest-dark);
}

.consent .btn--outline {
    color: var(--color-bg-cream);
    border-color: var(--color-bg-cream);
}

.consent .btn--outline:hover {
    background-color: var(--color-bg-cream);
    color: var(--color-forest-dark);
}

/* =========================================
   Mapy na Kontaktu – načtou se až po souhlasu
   ========================================= */
.locations__notice {
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background-color: white;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.5;
}

.locations__notice p {
    margin-bottom: 0.9rem;
}

.locations__notice-btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
}

/* Bez souhlasu: místo mapy odkaz do Google Map (nic se nenačítá) */
.locations__map-wrap {
    display: grid;
    place-items: center;
    background-color: var(--color-bg-cream);
}

.locations__map {
    display: none;
}

.locations__map-link {
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--color-forest-dark);
    border-radius: 2rem;
    background-color: white;
    color: var(--color-forest-dark);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
}

.locations__map-link:hover {
    background-color: var(--color-forest-dark);
    color: var(--color-bg-cream);
}

/* Se souhlasem: mapy vidět, upozornění a odkazy schované (třídu přidává script.js) */
.locations--maps-on .locations__map {
    display: block;
}

.locations--maps-on .locations__notice,
.locations--maps-on .locations__map-link {
    display: none;
}

/* =========================================
   404 – Stránka nenalezena
   ========================================= */
.not-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 560px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem 1.5rem;
    text-align: center;
}

.not-found__code {
    font-size: clamp(5rem, 28vw, 8rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.05em;
    color: var(--color-forest-medium);
}

/* Tři stromky pod číslem – stejná SVG jako „lesík“ na kartách na úvodu */
.not-found__forest {
    display: block;
    width: 120px;
    height: 50px;
    margin: 0.75rem 0 1.75rem 0;
}

@supports (mask-image: url(#s)) or (-webkit-mask-image: url(#s)) {
    .not-found__forest {
        background-color: var(--color-forest-dark);
        -webkit-mask-image: url('images/stromek.svg'), url('images/stromek-velky.svg'), url('images/stromek.svg');
        mask-image: url('images/stromek.svg'), url('images/stromek-velky.svg'), url('images/stromek.svg');
        -webkit-mask-size: auto 32px, auto 50px, auto 32px;
        mask-size: auto 32px, auto 50px, auto 32px;
        -webkit-mask-position: left 14px bottom, center bottom, right 14px bottom;
        mask-position: left 14px bottom, center bottom, right 14px bottom;
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
    }
}

.not-found__text {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.6;
    color: var(--color-forest-dark);
    margin-bottom: 2rem;
}

.not-found__buttons {
    display: flex;
    flex-direction: column; /* na mobilu pod sebou, od 768 px vedle sebe */
    align-items: center;
    gap: 1rem;
}

.not-found__buttons .btn {
    min-width: 200px;
}

/* =========================================
   Media Queries – Desktop
   ========================================= */
@media (min-width: 768px) {

    /* Hero: obsah zůstává na střed, jen tlačítka vedle sebe */
    .hero__buttons {
        flex-direction: row;
        width: auto;
    }

    /* 404: tlačítka vedle sebe */
    .not-found__buttons {
        flex-direction: row;
    }

    /* Menu: od 768 px vodorovná lišta vedle loga, burger se schová.
       Na mobilu zůstává vyjížděcí panel beze změny. */
    .header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding-right: 2.5rem;
    }

    .header__top {
        width: auto;
    }

    .header__burger {
        display: none;
    }

    .header__nav {
        display: flex;
        flex-direction: row;
        align-items: center;
        position: static;
        gap: 24px;
        width: auto;
        min-width: 0;
        height: auto;
        min-height: 0;
        max-height: none;
        overflow: visible;
        padding: 0;
        background-color: transparent;
        border: none;
        border-radius: 0;
        transform: none;
        transition: none;
    }

    /* Odkaz v menu se nikdy nezalomí na dva řádky („Naše / služby“) */
    .header__link {
        white-space: nowrap;
    }

    /* Karty ve dvou sloupcích vedle sebe.
       Při lichém počtu se poslední karta díky justify-content: center
       sama vycentruje doprostřed. */
    .services__grid,
    .trees__grid {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: flex-start; /* karta se neroztahuje podle vyšší sousedky */
    }

    /* Index: dvě karty vedle sebe, větší svislá mezera mezi řadami */
    .services__grid {
        max-width: 850px;
        row-gap: 3rem;
    }

    .services__grid > .card {
        flex: 0 1 calc(50% - 0.75rem);
    }

    /* Naše dřeviny: katalog tří karet vedle sebe (8 karet → 3 + 3 + 2 na střed) */
    .trees__grid {
        max-width: 1000px;
    }

    .trees__grid > .card {
        flex: 0 1 calc(33.333% - 1rem);
    }

    /* Naše služby: jeden širší sloupec karet pod sebou */
    .offer-full__grid {
        max-width: 700px;
    }

    /* Kontakt: mapy středisek 2 + 1 na střed pod nimi */
    .locations {
        max-width: 900px;
    }

    .locations__grid {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .locations__item {
        flex: 0 1 calc(50% - 1rem);
    }

    /* Kontakt: fotka Ireny vlevo, text ji obtéká */
    .contact-person {
        overflow: hidden; /* karta obalí obtékanou fotku */
    }

    .contact-person__photo {
        float: left;
        max-width: 200px;
        margin: 0 1.5rem 0.75rem 0.5rem;
    }

    /* Fotogalerie: 9 fotek do mřížky 3 × 3 */
    .gallery {
        max-width: 900px;
    }

    .gallery__grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =========================================
   Menu na tabletu (768–1023 px): vodorovná lišta se jinak nevejde
   vedle loga, proto menší písmo a mezery. Od 1024 px platí gap 24px.
   ========================================= */
@media (min-width: 768px) and (max-width: 1023px) {
    .header {
        padding-right: 1.5rem;
    }

    .header__nav {
        gap: 16px;
    }

    .header__link {
        font-size: 1rem;
    }

    /* Logo o chlup menší (140 px), aby se menu na 768 px vešlo vedle něj */
    .header__img {
        max-width: 140px;
    }
}