/* ==========================================================
   1. GLOBAL STYLES & RESET
   ========================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    /* Abstand zum festen Kopfbereich bei Sprungmarken (#galerie, #kontakt) */
    scroll-padding-top: 150px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #2c1a12;
    background-color: #fcfbfa;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* "Zum Inhalt springen" für Tastatur- und Screenreader-Nutzer */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 2000;
    background: #2c1a12;
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 0 0 4px 4px;
    text-decoration: none;
    font-weight: 600;
}

.skip-link:focus {
    left: 10px;
}

main:focus {
    outline: none;
}

/* Sichtbarer Fokus für Tastaturbedienung */
a:focus-visible,
button:focus-visible {
    outline: 3px solid #55a630;
    outline-offset: 2px;
}

/* ==========================================================
   2. HEADER & NAVIGATION
   ========================================================== */
.navbar {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.logo-link {
    text-decoration: none;
}

.brand-logo {
    display: flex;
    flex-direction: column;
}

.combined-logo-svg {
    width: 280px;
    height: auto;
}

.tagline {
    font-size: 0.8rem;
    color: #666;
    margin-top: 2px;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: #2c1a12;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: #368020;
}

/* ==========================================================
   3. BUTTONS & LINKS
   (Farben abgedunkelt: weißer Text erreicht Kontrast > 4,5 : 1)
   ========================================================== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-primary {
    background-color: #a5551a;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #8f4614;
}

.btn-phone {
    background-color: #368020;
    color: #ffffff;
}

.btn-phone:hover {
    background-color: #2c6a1a;
}

/* Textlink "Zurück ..." am Seitenanfang */
.back-link {
    display: inline-block;
    margin-bottom: 14px;
    color: #a5551a;
    font-weight: 600;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

/* Bereich mit Button am Seitenende */
.page-actions {
    margin-top: 40px;
}

/* ==========================================================
   4. HERO SECTION (Desktop)
   ========================================================== */
.hero {
    background: linear-gradient(rgba(44, 26, 18, 0.65), rgba(44, 26, 18, 0.65)),
                url('images/hero.png') center / 85% no-repeat;
    background-color: #2c1a12; /* dunkle Fläche, falls das Bild nicht die ganze Breite füllt */
    color: #ffffff;
    padding: 90px 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px auto;
    opacity: 0.9;
}

/* ==========================================================
   5. SERVICES SECTION (Übersicht)
   ========================================================== */
.services {
    padding: 70px 0;
    text-align: center;
}

.services h3 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #2c1a12;
}

.section-intro {
    color: #666;
    margin-bottom: 40px;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 30px;
    text-align: left;
}

.card {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-top: 4px solid #55a630;
    display: flex;
    flex-direction: column;
}

.card .icon {
    margin-bottom: 20px;
}

.card h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #2c1a12;
}

.card p {
    color: #555;
    font-size: 0.95rem;
}

/* ==========================================================
   6. GALLERY SECTION & SUBPAGES
   ========================================================== */
.gallery-section {
    background-color: #f4efe6;
    padding: 70px 0;
    text-align: center;
}

.gallery-section.subpage {
    padding-top: 60px;
}

.gallery-section h3 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #2c1a12;
}

/* Vier Kacheln der Startseite passen in eine Reihe */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 30px;
    margin-top: 40px;
    text-align: left;
}

.gallery-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.card-image-wrapper {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background-color: #f9f6f0;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-caption {
    padding: 20px;
}

.gallery-caption h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #2c1a12;
}

.gallery-caption p {
    color: #555;
    font-size: 0.9rem;
}

/* ==========================================================
   6b. ÜBER UNS (dunkel hervorgehoben)
   ========================================================== */
.about {
    background-color: #2c1a12;
    color: #ffffff;
    border-top: 6px solid #55a630;
    padding: 80px 0;
    text-align: center;
}

.about h3 {
    font-size: 2.2rem;
    margin-bottom: 30px;
    color: #ffffff;
    overflow-wrap: break-word;
}

/* kleiner grüner Akzentbalken unter der Überschrift */
.about h3::after {
    content: "";
    display: block;
    width: 70px;
    height: 4px;
    background-color: #55a630;
    margin: 18px auto 0;
    border-radius: 2px;
}

.about-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #eee6dd;
}

.about-text .about-lead {
    font-size: 1.35rem;
    line-height: 1.6;
    font-weight: 600;
    color: #ffffff;
}

.about-text p + p {
    margin-top: 20px;
}

/* ==========================================================
   7. CONTACT SECTION
   ========================================================== */
.contact {
    padding: 70px 0;
    text-align: center;
}

.contact h3 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.contact-details {
    font-size: 1.1rem;
}

.contact-details p {
    margin: 8px 0;
}

.contact-details a {
    color: #a5551a;
    text-decoration: none;
}

.contact-details a:hover {
    text-decoration: underline;
}

/* ==========================================================
   8. RECHTLICHE SEITEN (Impressum, Datenschutz)
   ========================================================== */
.legal {
    max-width: 900px;
    padding-top: 50px;
    padding-bottom: 50px;
    min-height: 60vh;
}

.legal h2 {
    font-size: 2rem;
    color: #2c1a12;
    margin-bottom: 20px;
}

.legal h3 {
    font-size: 1.3rem;
    color: #2c1a12;
    margin: 30px 0 8px;
}

.legal h4 {
    font-size: 1.05rem;
    color: #2c1a12;
    margin: 18px 0 6px;
}

.legal p {
    margin-bottom: 10px;
}

.legal ul {
    margin: 8px 0 12px 20px;
}

.legal li {
    margin-bottom: 4px;
}

/* Buttons (.btn) behalten ihre eigene Schriftfarbe */
.legal a:not(.btn) {
    color: #a5551a;
}

/* ==========================================================
   9. FOOTER
   ========================================================== */
footer {
    background-color: #2c1a12;
    color: #ffffff;
    padding: 30px 0;
    text-align: center;
    font-size: 0.9rem;
}

footer a {
    color: #e8924f;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

/* ==========================================================
   10. RESPONSIVE DESIGN (MOBILGERÄTE)
   ========================================================== */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 20px;
    }

    /* Kopfbereich bleibt mobil nicht stehen und ist kompakter */
    .navbar {
        position: static;
        padding: 10px 0;
    }

    .logo-container {
        flex-direction: column;
        gap: 10px;
    }

    .brand-logo {
        align-items: center;
    }

    .combined-logo-svg {
        width: 220px;
    }

    .nav-links {
        margin: 0;
        gap: 18px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero {
        padding: 60px 0;
        background: linear-gradient(rgba(44, 26, 18, 0.7), rgba(44, 26, 18, 0.7)),
                    url('images/hero.png') center / cover no-repeat;
        background-color: #2c1a12;
    }

    /* Abschnitt "Ihr Tischler ..." kompakter */
    .about {
        padding: 50px 0;
    }

    .about h3 {
        font-size: 1.6rem;
        overflow-wrap: break-word;
    }

    .about-text {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .about-text .about-lead {
        font-size: 1.1rem;
        line-height: 1.55;
    }
}

/* ==========================================================
   11. REDUZIERTE BEWEGUNG (Systemeinstellung der Besucher)
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }

    .gallery-card:hover {
        transform: none;
    }
}