/* ===== Variablen ===== */
:root {
    /* Farben */
    --color-primary: #CA1D1F;
    --color-primary-dark: #8b0000;
    --color-black: #000000;
    --color-dark: #1a1a1a;
    --color-gray: #333333;
    --color-light: #f5f5f5;
    --color-white: #ffffff;

    /* Schriftarten */
    --font-headline: 'Bebas Neue', sans-serif;
    --font-body: 'Hanuman', sans-serif;
}

/* ===== Grundlegende Stile ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
}

body {
    font-family: var(--font-body), serif;
    color: var(--color-black);
    display: flex;
    flex-flow: column;
    line-height: 1.6;
    min-height: 100%;
}

h1, h2, h3 {
    font-family: var(--font-headline), serif;
    color: var(--color-primary);
    margin: 1rem 0;
    font-weight: 700;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

p, a {
    font-weight: 400;
}

/* ===== Header & Navigation ===== */
header {
    background-color: var(--color-black);
    color: var(--color-white);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    width: 120px;
    height: auto;
    border-radius: 10px;
    margin-right: 1rem;
}

nav {
    width: 100%;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: var(--color-white);
}

nav ul {
    display: flex;
    justify-content: center;
    width: 100%;
    align-items: center;
    gap: 0.7rem;
    list-style: none;
}

a {
    text-decoration: none;
    transition: color 0.3s ease;
    color: var(--color-black);
}

nav ul li a {
    text-decoration: none;
    padding: 0.5rem 1rem;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

nav ul li a.active-link {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: 5px;
}

.hamburger {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
}

/* ===== Sektionen ===== */
section {
    margin-bottom: 2rem;
    padding: 4rem 2rem;

    p {
        max-width: 800px;
        font-size: 1rem;
        line-height: 1.6;
    }
}

#startseite p {
    background-color: rgba(255, 255, 255, 75%);
    padding: 30px;
    border-radius: 10px;
}

#startseite {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-image: url("img/kies.jpg");
}

/* ===== Karten & Service-Items ===== */
.card-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    margin-bottom: 1rem;
}

.service-content {
    display: flex;
    gap: 3rem;
}

.service-content img {
    max-width: 8rem;
}

.service-content p {
    text-align: left;
}

.service-item {
    margin-bottom: 3rem;
}

/* ===== Buttons ===== */
.submit-button, .call-button a {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 5px;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.call-button {
    all: unset;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.submit-button:hover, .call-button:hover {
    background-color: var(--color-primary-dark);
}

.hr-text {
    display: flex;
    align-items: center;
    text-align: center;
    width: 100%;
    margin: 2rem 0;
}

.hr-text::before,
.hr-text::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #000;
}

.hr-text::before {
    margin-right: 10px;
}

.hr-text::after {
    margin-left: 10px;
}

.hr-text span {
    white-space: nowrap;
    padding: 0 10px;
}

/* ===== Kontaktformular ===== */
.contact-form {
}

.contact-form input,
.contact-form textarea {
    background-color: var(--color-dark);
    color: var(--color-white);
    border: 1px solid var(--color-gray);
    border-radius: 5px;
    padding: 0.75rem;
}

.form-group {
    width: 100%;
    color: var(--color-white);
}

textarea, input {
    margin-bottom: 1rem;
    width: 100%;
    font-size: 1rem;
    color: var(--color-white);
}

button {
    width: 100%;
    font-size: 1.2rem;
}

/* ===== Footer ===== */
footer {
    background-color: var(--color-black);
    color: var(--color-white);
    padding: 2rem;
    margin-top: auto;
}

.footer-container {
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem;
}

.footer-business h4,
.footer-contact h4,
.footer-links h4,
.footer-social h4 {
    font-size: 1.2rem;
    color: #CA1D1F;
    margin-bottom: 0.5rem;
}

.footer-business p,
.footer-links ul li a {
    color: #ffffff;
    font-size: 1rem;
}

.footer-links ul li {
    list-style: none;
}

.footer-contact p a {
    color: #CA1D1F;
    text-decoration: none;
}

.footer-contact p a:hover,
.footer-links ul li a:hover {
    color: #fff;
}

.footer-social a {
    color: var(--color-primary);
    font-size: 1.5rem;
    margin-right: 1rem;
}

.footer-social a:hover {
    color: #8b0000;
}

.footer-text, .footer-text a {
    color: #ffffff;
    font-size: 0.4rem;
    text-decoration: none;
    margin-top: 1rem;
}

.footer-contact p, .footer-contact p a {
    font-size: 1rem;
}

.footer-text a:hover {
    color: #CA1D1F;
}

/* ===== Floating Action Button ===== */
.fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 0.8rem 1.5rem;
    border-radius: 60px;
    text-decoration: none;
    font-size: 1.8rem;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.fab:hover {
    background-color: #8b0000;
    transform: scale(1.1);
}

.fab i {
    font-size: 1.8rem;
}

.slideshow {
    padding-top: 2rem;
    margin: auto;
    max-width: 600px;
    position: relative;
    overflow: hidden;
}

.slide {
    display: none;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.slide img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.active {
    display: block;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    background-color: var(--color-primary);
}

.next {
    right: 0;
}

.carousel {
    position: fixed;
    background-color: rgb(255, 255, 255);
    width: 100%;
    height: 100%;
    z-index: 30;
    margin: auto;
    overflow: hidden;
    display: none;
}

.carousel.active {
    display: block;
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-item {
    min-width: 100%;

    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.card {
    margin: 0 auto;
    position: relative;
    width: 100%;
    max-width: 1400px;
    aspect-ratio: 16/9;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
}

.overlay.active {
    display: flex;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 45px;
    cursor: pointer;
    z-index: 100;
}

button.prev-card, button.next-card {
    position: absolute;
    top: 10px; /* Anchor to top of carousel */
    transform: none; /* Remove translate to avoid scrollbar interference */
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    background-color: var(--color-primary);
}

.prev-card {
    margin-top: 47vh;
    left: 10px;
    z-index: 31;
    width: 40px;
    height: 45px;
}

.next-card {
    margin-top: 47vh;
    right: 10px;
    z-index: 31;
    width: 40px;
    height: 45px;
}

#iron-link {
    color: var(--color-primary);
    text-decoration: underline;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

/* ===== Media Queries ===== */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    nav {
        display: none;
    }

    nav ul {
        flex-direction: column;
    }

    nav.active {
        display: flex;
        z-index: 20;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    header {
        position: sticky;
        z-index: 10;
        top: 0;
    }

    nav ul li {
        margin: 0.2rem;
    }

    nav ul li a {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    section {
        padding: 2rem;
    }

    p, a {
        line-height: 1.5rem;
        font-size: 1.7rem;
    }
}

@media (min-width: 600px) {
    .services-container, .section-group {
        display: grid;
        grid-template-columns: repeat(2, minmax(400px, 1fr));
    }

    .slideshow {
        padding-top: 5rem;
    }

    .prev, .next {
        margin-top: calc(3rem);
    }

    .impressionen-container {
        display: none;
    }
}