@font-face {
    font-family: "DM Sans";
    src: url("../fonts/dm-sans-latin-400-normal.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "DM Sans";
    src: url("../fonts/dm-sans-latin-500-normal.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: "DM Sans";
    src: url("../fonts/dm-sans-latin-600-normal.woff") format("woff");
    font-weight: 600;
    font-style: normal;
}

:root {
    --green: #1e9c3f;
    --bg: #ffffff;
}

* { box-sizing: border-box; }

body {
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: "DM Sans", sans-serif;
    font-weight: 500;
    background: var(--bg);
    color: var(--green);
    font-size: 19px;
    line-height: 1.6;
}

html { scroll-behavior: smooth; }

#angebot,
.species,
#kontakt {
    scroll-margin-top: 120px;
}

/* ===== GRID ===== */

.layout {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    max-width: 1600px;
    margin: 0 auto;
}

/* ===== SIDEBAR ===== */

.sidebar {
    grid-column: span 2;
    padding: 80px 40px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-inner h1 {
    font-size: 27px;
    font-weight: 500;
    margin-bottom: 40px;
    line-height: 1.2;
}

.sidebar nav a {
    display: block;
    margin-bottom: 8px;
    text-decoration: none;
    color: var(--green);
    font-weight: 500;
    font-size: 19px;
}

.sidebar nav a:first-child,
.sidebar nav a:last-child {
    padding-left: 18px;
}

.sidebar nav a:nth-child(n + 2):nth-child(-n + 7) {
    padding-left: 36px;
}

/* ===== BURGER ===== */

.burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--green);
    margin: 5px 0;
}

/* ===== CONTENT ===== */

.content {
    grid-column: span 6;
    padding: 0 0 80px 60px;
}

/* ===== HERO ===== */

.hero img {
    width: 100%;
    height: 72vh;
    max-height: 820px;
    min-height: 460px;
    display: block;
    object-fit: cover;
    object-position: center;
}

.intro {
    margin-top: 40px;
    max-width: 760px;
}

/* ===== MODULES ===== */

.species {
    margin-top: 160px;
}

.species-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 40px;
}

.species-text { grid-column: span 3; }

.species-text h2,
.species-text p:first-child,
.kontakt-text p:first-child {
    font-size: 27px;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.2;
}

.species:nth-of-type(even) .species-text {
    order: 2;
}

.species:nth-of-type(even) .species-image {
    order: 1;
}

.species-image { grid-column: span 3; }

.species-image img {
    width: 100%;
}

/* ===== ACCORDION ===== */

.accordion {
    margin-top: 40px;
}

.accordion-item {
    border-top: 1px solid var(--green);
}

.accordion-item:last-child {
    border-bottom: 1px solid var(--green);
}

.accordion-header {
    width: 100%;
    background: none;
    border: none;
    padding: 14px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    cursor: pointer;
    color: var(--green);
    text-align: left;
    transition: opacity 0.25s ease;
}

.accordion-meta {
    display: grid;
    grid-template-columns: minmax(170px, 240px) minmax(0, 1fr);
    gap: 16px;
    flex: 1;
    align-items: baseline;
}

.accordion-date,
.accordion-title {
    font-size: 19px;
    font-weight: 500;
    line-height: 1.2;
}

.accordion-header:hover {
    opacity: 0.7;
}

.accordion-item.active .accordion-header {
    opacity: 1;
}

.accordion-content {
    font-size: 18px;
    padding-right: 42px;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.accordion-content > *:first-child {
    margin-top: 0;
}

.accordion-content > *:last-child {
    margin-bottom: 0;
}

.accordion-item.active .accordion-content {
    padding: 0 0 18px;
}

.icon {
    position: relative;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.icon::before,
.icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 1.5px;
    background: var(--green);
    transform: translate(-50%, -50%);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.accordion-item.active .icon::after {
    opacity: 0;
}

/* ===== KONTAKT ===== */

.kontakt {
    margin-top: 200px;
    margin-bottom: -80px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 40px;
}

.kontakt-text { grid-column: span 2; }
.kontakt-image { grid-column: span 4; }

.kontakt-image img {
    width: 100%;
    display: block;
}

/* ========================================= */
/* ============== MOBILE =================== */
/* ========================================= */

@media (max-width: 900px) {

    body {
        font-size: 17px;
        line-height: 1.55;
    }

    .layout {
        display: block;
    }

    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        width: min(320px, 84vw);
        height: 100vh;
        background: white;
        padding: 84px 24px 32px;
        transition: left 0.3s ease;
        z-index: 1000;
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.08);
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar-inner h1 {
        font-size: 22px;
        margin-bottom: 24px;
    }

    .sidebar nav a,
    .sidebar nav a:first-child,
    .sidebar nav a:last-child,
    .sidebar nav a:nth-child(n + 2):nth-child(-n + 7) {
        padding-left: 0;
        font-size: 17px;
    }

    .burger {
        display: block;
        position: fixed;
        top: 18px;
        right: 18px;
        padding: 10px;
        background: rgba(255, 255, 255, 0.92);
        z-index: 1100;
    }

    .content {
        padding: 72px 18px 48px;
    }

    .hero img {
        height: auto;
        min-height: 0;
        max-height: none;
    }

    .intro {
        margin-top: 24px;
        max-width: none;
    }

    .species {
        margin-top: 72px;
    }

    .species-grid,
    .kontakt {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .kontakt {
        margin-top: 88px;
        margin-bottom: -60px;
    }

    .species-text p:first-child,
    .kontakt-text p:first-child,
    .sidebar-inner h1 {
        font-size: 22px;
    }

    .species-image img,
    .kontakt-image img {
        display: block;
    }

    .accordion {
        margin-top: 20px;
    }

    .accordion-header {
        padding: 12px 0;
        gap: 16px;
    }

    .accordion-meta {
        grid-template-columns: 1fr;
        gap: 6px;
        align-items: start;
    }

    .accordion-date,
    .accordion-title {
        font-size: 17px;
    }

    .accordion-content {
        font-size: 16px;
        padding-right: 0;
    }

    .icon {
        width: 16px;
        height: 16px;
        flex-basis: 16px;
    }

    .icon::before,
    .icon::after {
        width: 16px;
    }

    .species-text,
    .species-image,
    .kontakt-text,
    .kontakt-image {
        grid-column: span 1;
    }

    .species:nth-of-type(even) .species-text,
    .species:nth-of-type(even) .species-image {
        order: initial;
    }

}
