@font-face {
    font-family: 'MT-1';
    src: url('fonts/Montserrat-Italic-VariableFont_wght.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'MT-2';
    src: url('fonts/Montserrat-VariableFont_wght.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --green-olive: #33402f;
    --cream:  #f7f3ea;
    --green-soft: #5b6355;
}


*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    display: flex;
    font-family: 'MT-2';
    min-height: 100vh;
    background: var(--cream);
    color: var(--green-soft);
    line-height: 1.5;
    flex-direction: column;
}

a {
    position: relative;
    text-decoration: none;
    color: var(--cream);
}

.link-brand::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.link-brand:hover::after {
    transform: scaleX(1);
}

main {
    flex: 1;
}

.container {
    --bs-gutter-x: 10rem;
}

.stats {
    border-right: 1px solid var(--green-soft);
}

.stats:last-child {
    border-right: none;
}

@media (max-width: 576px) {
    .stats {
        border: none;
    }
}

.heading-1 {
    font-size: 36px;
}

.button {
    display: inline-block;
    background-color: var(--green-olive);
    color: var(--cream);
    padding: 12px 24px;
    border-radius: 1rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;

    border: none;
    font: inherit;
    -webkit-appearance: none;
    appearance: none;
}

.button:hover {
    background-color: var(--green-soft);
}

.category-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 1rem;
    text-decoration: none;
    color: var(--cream);
}

.category-card-img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.category-card:hover .category-card-img {
    transform: scale(1.05);
}

.category-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    background: linear-gradient(
        to top,
        rgba(51, 64, 47, 0.9) 0%,
        rgba(51, 64, 47, 0.4) 50%,
        rgba(51, 64, 47, 0) 100%
    );
    pointer-events: none;
}

.category-card-overlay h3 {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cream);
}

.category-card-overlay p {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.4;
    color: var(--cream);
}

.extra-category {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.extra-category.is-hidden {
    display: none;
}

.extra-category.is-visible {
    display: block;
    animation: fadeInUp 0.4s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.green-soft {
    color: var(--green-soft) !important;
}

.form-check-input {
    border-color: var(--green-soft);
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--green-olive);
    border-color: var(--green-olive);
}

.form-check-input:focus {
    border-color: var(--green-olive);
    box-shadow: 0 0 0 0.2rem rgba(51, 64, 47, 0.25);
}

.form-check-label {
    color: var(--green-soft);
    font-size: 14px;
    cursor: pointer;
}

.form-check-label a {
    color: var(--green-olive);
    text-decoration: underline;
}

.form-check-label a:hover {
    text-decoration: none;
}

.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(20px);
    z-index: 1000;

    display: flex;
    align-items: center;
    gap: 24px;

    width: min(720px, calc(100% - 32px));
    padding: 16px 20px;

    background-color: var(--green-olive);
    color: var(--cream);
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(51, 64, 47, 0.35);
    font-size: 14px;
    line-height: 1.4;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.cookie-banner.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.cookie-banner__text {
    flex: 1;
    color: var(--cream);
}

.cookie-banner__text a {
    color: var(--cream);
    text-decoration: underline;
}

.cookie-banner__text a:hover {
    color: white;
}

.cookie-banner__btn {
    flex-shrink: 0;
    background-color: var(--cream);
    color: var(--green-olive);
    padding: 10px 20px;
    white-space: nowrap;
}

.cookie-banner__btn:hover {
    background-color: white;
    color: var(--green-olive);
}

@media (max-width: 576px) {
    .cookie-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 12px;
        bottom: 16px;
    }
    .cookie-banner__btn {
        width: 100%;
    }
}

.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.gallery-grid .gallery-item {
    flex: 0 0 calc((100% - 4 * 0.6rem) / 5);
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-grid .gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.gallery-grid .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-grid .gallery-item:hover img {
    transform: scale(1.05);
}

/* Адаптив */
@media (max-width: 1199px) {
    .gallery-grid .gallery-item { flex: 0 0 calc((100% - 3 * 0.6rem) / 4); }
}
@media (max-width: 767px) {
    .gallery-grid .gallery-item { flex: 0 0 calc((100% - 2 * 0.6rem) / 3); }
}
@media (max-width: 479px) {
    .gallery-grid .gallery-item { flex: 0 0 calc((100% - 1 * 0.6rem) / 2); }
}
