html, body {
    height: 100%;
}

:root {
    font-size: clamp(15px, 0.9vw + 0.6rem, 18px);
}

body {
    margin: 0;
    font-family: "Segoe UI", sans-serif;
    background: #7fa28a;
    color: #444;
    text-align: center;
    font-size: 1rem;
    line-height: 1.6;

    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

/* HEADER */
.top-bar {
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    min-height: 200px;
    padding: 15px;
    box-sizing: border-box;
}

/* LOGO */
.banner img {
    height: 170px;
    max-width: 100%;
}

/* NAV */
nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* LINKS */
nav a {
    text-decoration: none;
    color: #3a3a3a;
    font-weight: bold;
    cursor: pointer;
    font-size: clamp(0.95rem, 1vw + 0.25rem, 1.05rem);
}

nav a:hover {
    color: #c9a24a;
}

h1 {
    font-size: clamp(2.1rem, 4vw, 3.2rem);
    line-height: 1.05;
    margin: 0 0 0.8em;
}

h2 {
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    line-height: 1.2;
}

h3 {
    font-size: clamp(1.3rem, 2vw, 1.9rem);
    line-height: 1.3;
}

p,
footer p,
.tab p {
    font-size: clamp(1rem, 1vw + 0.1rem, 1.05rem);
}

/* DROPDOWN */
.dropdown {
    position: relative;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    text-align: left;
    box-shadow: 0px 8px 20px rgba(0,0,0,0.15);
    border-radius: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(5px);
    transition: all 0.25s ease;
    z-index: 999;
}

.dropdown-content a {
    display: block;
    padding: 12px 15px;
    color: #333;
    font-weight: normal;
    font-size: 14px;
}

.dropdown-content a:hover {
    background: #f2f2f2;
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Allow programmatic open for touch devices */
.dropdown-content.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Focus styles for keyboard users */
a:focus,
.menu-toggle:focus,
.top-button:focus {
    outline: 3px solid #c9a24a;
    outline-offset: 2px;
}

/* BUTTON */
.top-button {
    position: relative;
    padding: 10px 16px;
    background: #6b8f71;
    color: white;
    border-radius: 6px;
    text-decoration: none; /* normales Unterstreichen ausschalten */
}

.top-button::after {
    content: "";
    position: absolute;
    left: 12%;
    right: 12%;
    top: 52%;
    height: 3px;
    background: red;
}

/* INSTAGRAM */
.insta {
    font-size: 18px;
}

/* HAMBURGER */
.menu-toggle {
    display: none;
    background: #6b8f71;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 18px;
    cursor: pointer;
}

/* CONTENT */
.tab {
    display: none;
    padding: 5px 20px;
    max-width: 900px;
    margin: auto;
    box-sizing: border-box;
}

.tab.active {
    display: block;
}

/* BILDER */
img.content {
    width: 90%;
    max-width: 600px;
    height: auto;
    margin: 20px auto;
    border-radius: 12px;
    display: block;
}


.hundebild {
    max-width: 1000px;
}

img.content.hundebild {
    /* Avoid negative margins that introduce horizontal overflow; keep the image centered */
    width: 100%;
    max-width: 1000px;
    margin: 20px auto;
}


.bachbild {
    width: 90%;
    max-width: 700px;
    display: block;
    margin: 20px auto;
    border-radius: 12px;
    height: auto;
}

.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    padding: 50px 20px;
    flex-wrap: wrap;
}

.hero-image {
    width: 320px;
    height: 320px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;

    border: 15px solid #b89d86;
    box-shadow: -20px 15px 0 #4b2e2b;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.hero-text {
    max-width: 500px;
    text-align: left;
}

/* HIGHLIGHT */
.highlight-box {
    border: 2px solid #d8c8a5;
    background-color: #faf7f0;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    font-style: italic;
}

/* FOOTER */
footer {
    background: #e6b8a2;
    padding: 30px;
    border-top: 3px solid #c9a24a;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    margin-top: auto;
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    color: #444;
    text-decoration: none;
    margin: 0 10px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #6b8f71;
}

footer p {
    margin: 0;
    color: #555;
}

/* ========================= */
/* MOBIL UND TABLET          */
/* ========================= */

@media (max-width: 1000px) {

    body {
        text-align: center;
    }

    main {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .top-bar {
        flex-direction: column;
        gap: 15px;
    }

    .banner img {
        width: 80%;
        max-width: 320px;
        height: auto;
    }

    .menu-toggle {
        display: block;
    }

    /* Ensure the header/nav sits above page content on small screens to avoid overlap */
    .top-bar { position: relative; z-index: 2000; }
    #mainNav.show { position: relative; z-index: 2100; }

    #mainNav {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    #mainNav.show {
        display: flex;
        align-items: center;
    }

    #mainNav a,
    #mainNav .dropdown {
        width: 100%;
        text-align: center;
        display: block;
        padding: 10px;
        box-sizing: border-box;
    }

    /* Untermenüs auf Mobilgeräten einfach anzeigen */
    .dropdown-content {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: block;
        box-shadow: none;
        border-radius: 0;
        min-width: auto;
    }

    /* Make nav and dropdown items have consistent background and tappable size */
    #mainNav { background: white; width: 100%; box-sizing: border-box; padding: 6px 0; }
    #mainNav a {
        display: block;
        width: 100%;
        padding: 12px 16px;
        box-sizing: border-box;
        text-align: center;
        min-height: 44px;
        word-break: break-word;
        white-space: normal;
    }
    #mainNav .dropdown > a {
        padding: 12px 16px;
        word-break: break-word;
        white-space: normal;
    }
    .dropdown-content { background: white; }
    .dropdown-content a {
        display: block;
        padding: 12px 16px;
        text-align: center;
        border-top: 1px solid #f0f0f0;
        min-height: 44px;
        word-break: break-word;
        white-space: normal;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        gap: 30px;
        align-items: center;
        justify-content: center;
    }

    .hero-image {
        width: 260px;
        height: 260px;
    }

    .hero-text {
        max-width: 100%;
        text-align: center;
        margin: 0 auto;
    }

    /* Maskierung auf Handys deaktivieren */
    .hero-image img {
        mask-image: none;
        -webkit-mask-image: none;
    }

    .tab {
        padding: 10px;
        text-align: center;
        margin: 0 auto;
    }

    img.content,
    .bachbild {
        width: 95%;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
}

/* Very small screens: tighten spacing and reduce hero weight */
@media (max-width: 420px) {
    .top-bar {
        padding: 8px 10px;
        gap: 10px;
        min-height: auto;
    }

    .banner img {
        width: 70%;
        max-width: 180px;
    }

    .hero {
        padding: 18px 12px;
        gap: 16px;
    }

    .hero-image {
        width: 180px;
        height: 180px;
        border-width: 8px;
        box-shadow: none;
    }

    .hero-text {
        padding: 12px;
        text-align: center;
    }

    .hero-text h1 { font-size: 1.4rem; line-height: 1.2; }

    .tab { padding: 8px 12px; }

    #mainNav a { font-size: 15px; padding: 10px 12px; }

    .top-button { padding: 8px 12px; font-size: 15px; }

    img.content { margin: 14px auto; }

    footer { padding: 20px; }

    .footer-links { gap: 8px; }
}
