
:root {
    --forest: #173d30;
    --green: #27634b;
    --mint: #eaf2e9;
    --cream: #faf9f4;
    --ink: #20302b;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 75px;
}

body {
    color: var(--ink);
    background: var(--cream);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Навигация */

.navbar {
    background: var(--forest);
}

.navbar-brand {
    font-weight: 800;
    letter-spacing: .02em;
}

.nav-link {
    color: #e7f2e9 !important;
}

.nav-link:hover {
    color: #fff !important;
}

/* Главный экран */

.hero {
    background:
        linear-gradient(
            95deg,
            rgba(10, 37, 27, .92),
            rgba(15, 55, 37, .68)
        ),
        url('assets/forest.jpg') center/cover;

    min-height: 590px;
    display: flex;
    align-items: center;
    color: white;
}

.hero h1 {
    font-size: clamp(2.7rem, 6vw, 5rem);
    font-weight: 850;
    line-height: 1.05;
}

.hero p {
    max-width: 670px;
    font-size: 1.2rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: .15em;
    font-size: .82rem;
    font-weight: 800;
    color: #80c9a2;
}

/* Секции */

.section-pad {
    padding: 88px 0;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -.04em;
}

.bg-soft {
    background: var(--mint);
}

/* Кнопки */

.btn-forest {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

.btn-forest:hover {
    background: #1b4937;
    border-color: #1b4937;
    color: #fff;
}

/* Карточки */

.feature-card {
    height: 100%;
    border: 1px solid #dce7dd;
    border-radius: 18px;
    background: #fff;
    padding: 28px;
}

.feature-icon {
    font-size: 2rem;
}

/* Хронология */

.timeline {
    border-left: 3px solid #9bbba6;
    padding-left: 25px;
}

.timeline article {
    position: relative;
    margin-bottom: 26px;
}

.timeline article:before {
    content: '';
    position: absolute;
    left: -34px;
    top: 7px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--green);
    border: 3px solid var(--mint);
}

/* Галерея */

.gallery-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 15px;
    background: #dce6da;
}

.placeholder-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #cbdcca, #e9eee6);
    border-radius: 15px;
    aspect-ratio: 4/3;
    color: #496454;
    text-align: center;
    padding: 20px;
}

/* Карта */

/* Полноэкранная интерактивная карта */

#map {
    width: 100%;
    height: 100vh;
    height: 100dvh;
}

.map-placeholder {
    min-height: 340px;
    border-radius: 20px;
    background: repeating-linear-gradient(
        45deg,
        #e5ece3,
        #e5ece3 20px,
        #edf2eb 20px,
        #edf2eb 40px
    );
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
}

/* Кнопка возврата */

.back {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1000;

    display: inline-block;
    padding: 10px 18px;

    background: var(--forest);
    color: #fff;

    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;

    box-shadow: 0 3px 12px rgba(0, 0, 0, .2);
}

.back:hover {
    background: var(--green);
    color: #fff;
}

/* Сообщение о загрузке */

#notice {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;

    padding: 10px 18px;
    border-radius: 10px;

    background: #fff;
    color: var(--ink);
    box-shadow: 0 3px 12px rgba(0, 0, 0, .15);
}

/* Содержимое карточки дерева */

.balloon {
    width: 100%;
    max-width: 380px;
    max-height: 65vh;
    overflow-y: auto;

    font-family: inherit;
    color: var(--ink);
}

.balloon h3 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--forest);
}

.balloon .photo-label {
    margin: 14px 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: #64746b;
}

.balloon .photo {
    display: block;
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: contain;

    border-radius: 8px;
    background: #f0f2ee;
}

/* Галерея фотографий деревьев */

.tree-gallery {
    width: 100%;
}

.tree-gallery-slide {
    display: none;
    text-align: center;
}

.tree-gallery-slide.active {
    display: block;
}

.tree-gallery-slide img {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: contain;
    border-radius: 8px;
    background: #f0f2ee;
}

.tree-gallery-label {
    margin-top: 6px;
    font-size: 13px;
    color: #64746b;
}

.tree-gallery-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    gap: 12px;
}

.tree-gallery-controls button {
    border: 0;
    border-radius: 8px;
    background: var(--forest);
    color: white;
    padding: 8px 16px;
    cursor: pointer;
}

.tree-gallery-controls button:hover {
    background: var(--green);
}

.tree-gallery-counter {
    font-size: 14px;
    font-weight: 600;
}

/* Превью карты на главной странице */

.map-preview {
    width: 100%;
    height: 420px;
    overflow: hidden;

    border-radius: 16px;
    border: 1px solid #dce7dd;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

.map-preview iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 576px) {
    .map-preview {
        height: 300px;
        border-radius: 12px;
    }
}

/* Упрощённое отображение карты в iframe */

.map-preview-mode .back {
    display: none;
}


/* Мобильные устройства */

@media (max-width: 576px) {
    .back {
        top: 10px;
        left: 10px;
        padding: 8px 12px;
        font-size: 14px;
    }

    .balloon {
        max-width: 260px;
        max-height: 55vh;
    }

    .balloon .photo {
        max-height: 240px;
    }
}

/* Дополнительные элементы */

.small-note {
    font-size: .88rem;
    color: #64746b;
}

footer {
    background: var(--forest);
    color: #e3eee7;
}

footer a {
    color: #bde3c9;
}

a {
    color: var(--green);
}

/* Аккордеон */

.accordion-button:not(.collapsed) {
    background: #e8f1e9;
    color: var(--forest);
}
