:root {
    --bg: #eaffdd;
    --surface: #ffffff;
    --surface-soft: #e6f2e5;
    --text: #1d2a22;
    --muted: #657064;
    --brand: #028b23;
    --brand-dark: #003f22;
    --accent: #cc0000;
    --line: #cfe4c4;
    --shadow: 0 18px 45px rgba(32, 55, 38, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(2, 139, 35, 0.12), rgba(234, 255, 221, 0) 340px),
        var(--bg);
    line-height: 1.6;
}

a,
a:link,
a:visited,
a:hover,
a:active {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

#container {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto;
}

#header {
    min-height: 220px;
    border-radius: 8px 8px 0 0;
    background:
        linear-gradient(90deg, rgba(0, 63, 34, 0.9), rgba(2, 139, 35, 0.26)),
        url("../images/header.jpg") center / cover no-repeat;
    position: relative;
    overflow: hidden;
}

#header::after {
    content: "VOS zemědělců, a.s.";
    position: absolute;
    left: clamp(24px, 5vw, 64px);
    bottom: clamp(24px, 4vw, 48px);
    max-width: 620px;
    color: #fff;
    font-size: clamp(2rem, 5vw, 4.4rem);
    font-weight: 800;
    line-height: 1.02;
}

#middle {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 28px;
    padding: 28px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--line);
    border-top: 0;
    box-shadow: var(--shadow);
}

#menu {
    width: auto;
    margin: 0;
    float: none;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}

#menu ul {
    position: sticky;
    top: 16px;
    margin: 0;
    padding: 10px;
    list-style: none;
    background: var(--brand-dark);
    border-radius: 8px;
    box-shadow: 0 14px 32px rgba(20, 56, 34, 0.18);
}

#menu ul li {
    display: block;
}

#menu ul li a {
    display: block;
    width: 100%;
    padding: 11px 13px;
    color: #fff;
    border: 0;
    border-radius: 6px;
    background: transparent;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

#menu ul li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    transform: translateX(3px);
}

#content {
    float: none;
    width: auto;
    margin: 0;
    position: relative;
    font-size: 1rem;
    font-weight: 400;
}

#cleaner {
    display: none;
}

#footer {
    width: auto;
    margin: 0;
    padding: 18px 28px;
    background: var(--brand-dark);
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 0 0 8px 8px;
}

#end {
    display: none;
}

.nadpis_logo {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    color: #fff;
}

.nadpis_1 {
    margin: 0 0 14px;
    padding: 0 0 12px;
    color: var(--brand-dark);
    background: transparent;
    border-bottom: 2px solid var(--line);
    font-size: clamp(1.45rem, 3vw, 2.2rem);
    font-weight: 800;
    line-height: 1.15;
}

.main_container,
.ram_zeleny,
.ram-cerveny {
    margin: 0 0 16px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(32, 55, 38, 0.07);
}

.main_container p:first-child,
.ram_zeleny p:first-child,
.ram-cerveny p:first-child {
    margin-top: 0;
}

.main_container p:last-child,
.ram_zeleny p:last-child,
.ram-cerveny p:last-child {
    margin-bottom: 0;
}

.ram_zeleny {
    color: var(--brand-dark);
    background: var(--surface-soft);
    font-size: 1rem;
    font-weight: 700;
}

.ram-cerveny {
    color: #7e1f1f;
    background: #fff0ec;
    border-color: #efb5a5;
    font-size: 1rem;
    font-weight: 700;
}

.info {
    width: 100%;
    margin: 0;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.info:last-child {
    border-bottom: 0;
}

.n1 {
    font-size: 1.12rem;
    font-weight: 800;
}

.foto {
    margin: 8px;
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(32, 55, 38, 0.16);
}

.pole,
.pole_cervene,
input,
textarea {
    max-width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px 10px;
    font: inherit;
}

.pole_cervene {
    background: #fff0ec;
    border-color: #cc6d5d;
}

.tlacitko {
    display: inline-block;
    margin: 4px 4px 4px 0;
    padding: 10px 16px;
    color: #fff;
    background: var(--brand);
    border: 0;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
}

#content > div[align="center"] img[src*="predel"] {
    display: none;
}

.back_m,
.back_b {
    position: static;
    width: 100%;
    height: 180px;
    margin: 0 0 16px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
}

table {
    max-width: 100%;
}

@media (max-width: 860px) {
    #container {
        width: min(100% - 20px, 760px);
        margin: 10px auto;
    }

    #header {
        min-height: 170px;
        border-radius: 8px 8px 0 0;
    }

    #middle {
        display: block;
        padding: 14px;
    }

    #menu {
        margin-bottom: 18px;
    }

    #menu ul {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
        gap: 4px;
    }

    #menu ul li a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .main_container,
    .ram_zeleny,
    .ram-cerveny {
        padding: 16px;
    }
}

@media (max-width: 520px) {
    #container {
        width: 100%;
        margin: 0;
    }

    #header,
    #footer {
        border-radius: 0;
    }

    #middle {
        border-left: 0;
        border-right: 0;
    }

    #menu ul {
        grid-template-columns: 1fr;
    }
}
