:root {
    --green: #00783c;
    --green-dark: #005f2f;
    --orange: #ff840c;
    --ink: #14241c;
    --muted: #5f6d66;
    --line: #dbe7e1;
    --soft: #f5faf7;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: #fff;
    font-family: "Segoe UI", Arial, sans-serif;
}

.page-header {
    min-height: 88px;
    padding: 0 8%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    background: linear-gradient(105deg, #006331, #00783c 74%, #8bd7e7 135%);
}

.brand img {
    width: 178px;
    display: block;
}

nav {
    display: flex;
    gap: 34px;
    align-items: center;
}

nav a {
    position: relative;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

nav a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -16px;
    height: 4px;
    background: var(--orange);
}

.access-link {
    padding: 12px 22px;
    color: var(--green-dark);
    background: #fff;
    border-radius: 9px;
}

.hero {
    max-width: 1120px;
    margin: 0 auto;
    padding: 74px 24px 50px;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 54px;
    align-items: center;
}

.hero > div:first-child span {
    color: var(--orange);
    font-weight: 900;
    text-transform: uppercase;
}

.hero h1 {
    margin: 14px 0;
    color: var(--green-dark);
    font-size: clamp(44px, 6vw, 66px);
    line-height: 1;
}

.hero h1 strong {
    color: var(--orange);
}

.hero p {
    max-width: 600px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.8;
}

.hero-art {
    position: relative;
    min-height: 250px;
}

.hero-art img {
    position: absolute;
    width: 150px;
    height: 210px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 24px 40px rgba(0, 0, 0, .18);
}

.hero-art img:first-child {
    left: 60px;
    top: 20px;
    transform: rotate(-8deg);
}

.hero-art img:nth-child(2) {
    left: 172px;
    top: 0;
    transform: rotate(7deg);
}

.hero-art div {
    position: absolute;
    right: 18px;
    bottom: 14px;
    width: 150px;
    height: 150px;
    background: #e6f3ec;
    border-radius: 50%;
}

.search-area {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px 46px;
}

.search-row {
    display: grid;
    grid-template-columns: 1fr 148px;
    gap: 24px;
}

input,
.filters button,
.catalog-top button {
    min-height: 56px;
    padding: 0 22px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 9px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .04);
}

.search-row button {
    color: #fff;
    font-weight: 900;
    background: var(--green);
    border: 0;
    border-radius: 9px;
}

.filters {
    margin-top: 22px;
    display: flex;
    gap: 22px;
    align-items: center;
}

.filters button {
    min-width: 180px;
    text-align: left;
    font-weight: 800;
}

.filters a {
    color: var(--green);
    font-weight: 800;
    text-decoration: none;
}

.catalog {
    max-width: 1120px;
    margin: 0 auto 72px;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 42px;
}

aside {
    align-self: start;
    padding: 28px 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(0, 65, 32, .08);
}

aside h2 {
    margin: 0 0 18px;
    color: var(--green-dark);
    font-size: 16px;
    text-transform: uppercase;
}

aside a {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 12px;
    color: var(--ink);
    text-decoration: none;
    border-radius: 9px;
}

aside a.selected,
aside a:hover {
    background: #dff0e7;
}

aside strong {
    color: var(--muted);
    font-weight: 500;
}

.catalog-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 26px;
}

.catalog-top strong {
    color: var(--green);
}

.catalog-top button {
    min-height: 44px;
    font-weight: 800;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 46px 38px;
}

.book img {
    width: 160px;
    height: 226px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, .16);
    transition: transform .28s ease, box-shadow .28s ease;
}

.book:hover img {
    transform: translateY(-8px);
    box-shadow: 0 26px 42px rgba(0, 0, 0, .18);
}

.book h3 {
    margin: 16px 0 4px;
    max-width: 210px;
    font-size: 18px;
    line-height: 1.25;
}

.book p,
.book span {
    display: block;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

footer {
    padding: 16px;
    color: #fff;
    text-align: center;
    background: var(--green-dark);
}

@media (max-width: 850px) {
    .page-header,
    nav {
        flex-direction: column;
        padding: 18px;
    }

    .hero,
    .catalog {
        grid-template-columns: 1fr;
    }

    .hero-art {
        display: none;
    }

    .search-row,
    .books-grid {
        grid-template-columns: 1fr;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }
}
