@import "../assets/bootstrap-icons/css/bootstrap-icons.min.css";

@font-face {
    font-family: 'Titan One';
    src: url('../assets/fonts/TitanOne-Regular.ttf');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Rubik Black';
    src: url('../assets/fonts/Rubik-Black.ttf');
    font-weight: 900;
    font-style: normal;
}

@font-face {
    font-family: 'Lato';
    src: url('../assets/fonts/Lato-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Lato';
    src: url('../assets/fonts/Lato-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Lato';
    src: url('../assets/fonts/Lato-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'Lato';
    src: url('../assets/fonts/Lato-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
}

/* ===========================
   CSS Base
   =========================== */
:root {
    --blue-dark: #235F84;
    --blue-light-100: #78B4DC;
    --blue-light-80: #93c3e3;
    --blue-light-60: #aed2ea;
    --blue-light-40: #c9e1f1;
    --blue-light-20: #e4f0f8;

    --orange: #F28E14;
    --orange-dark: #da8012;
    --orange-light-80: #f5a543;
    --orange-light-60: #f7bb72;
    --orange-light-40: #fad2a1;

    --beige: #FDF4E6;

    --font-display: 'Rubik Black', sans-serif;
    --font-main: 'Lato', sans-serif;

    --text-dark: #0b1d28;
    --text-muted: #4f7f9d;

    --transition-main: all 0.2s ease-in-out;
    --transform-y-main: translateY(-2px);

    --bs-primary: #235F84;
    --bs-primary-rgb: 35, 95, 132;
    --bs-link-color: #235F84;
    --bs-link-hover-color: #F28E14;

    --bs-body-font-family: 'Lato', sans-serif;
    --bs-body-font-size: 1.1rem;
    --bs-body-color: #123042;
    --bs-secondary-color: #415968;
    --bs-tertiary-color: #4f7f9d;

    --bs-heading-color: #123042;
}

body {
    line-height: 1.5;

    color: var(--text-dark);
    background-color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

section {
    min-height: 50vh;
    margin-bottom: 7rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
}
@media (max-width: 768px) {
    section {
        margin-bottom: 2rem;
    }
}


section:last-of-type {
    margin-bottom: 0;
}

img {
    object-fit: cover;
    object-position: center;
}

h2 {
    font-family: var(--font-display);
    color: var(--blue-dark);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.animated-link {
    position: relative;
    transition: color .3s ease-in-out;
    text-decoration: none;
    color: var(--orange-dark);

    &::before {
        content: '';
        position: absolute;
        top: 100%;
        width: 100%;
        height: 3px;
        background-color: var(--orange-dark);
        transform: scaleX(0);
        transition: transform .3s ease-in-out;
    }

    &:hover {
        color: var(--orange-dark);
    }

    &:hover::before {
        transform: scaleX(1);
    }


}

.bg-blue {
    background-color: var(--blue-light-100);

    .animated-link {
        color: var(--text-dark);

        &::before {
            background-color: var(--text-dark);
        }

        &:hover {
            color: var(--text-dark);
        }
    }
}

.bg-orange {
    background-color: var(--orange);

    h2 {
        color: var(--beige);
    }

    .animated-link {
        color: var(--text-dark);

        &::before {
            background-color: var(--text-dark);
        }

        &:hover {
            color: var(--text-dark);
        }
    }
}

.icon-base {
    i {
        font-size: 2rem;
        color: var(--orange);
        transition: var(--transition-main);


        &:hover {
            color: var(--orange-dark);
        }
    }
}

.image-full {
    position: relative;
    overflow: hidden;
    transition: var(--transition-main);

    &:hover {
        transform: var(--transform-y-main);
    }
}

.copyright-text {
    position: absolute;
    bottom: 8px;
    left: 12px;
    z-index: 5;

    font-size: 0.75rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 5px black;
}

/* ===========================
   Bootstrap Customizations
   =========================== */

.btn-primary {
    background-color: var(--orange);
    color: white;
    border: none;
    transition: var(--transition-main);
}

.btn-primary:hover {
    background-color: var(--blue-dark);
    transform: var(--transform-y-main);
}

/* ===========================
   Header and Logo
   =========================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: white;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.site-header.header--hidden {
    transform: translateY(-100%);
}

.site-header.header--scrolled {
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.12);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    flex-shrink: 0;
    z-index: 1001;
}

.logo img {
    height: 3rem;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-family: var(--font-display);
    color: var(--orange);
    font-size: 1.4rem;
    line-height: 1.1;
    margin: 0;
}

/* Nav */
.nav-list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    position: relative;
    display: inline-block;
    padding: 0.4rem 0.65rem;
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

/* Underline-Balken */
.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0.65rem;
    right: 0.65rem;
    height: 2px;
    background-color: var(--orange);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease-in-out;
}

.nav-link:hover {
    color: var(--orange-dark);
}

.nav-link:hover::before {
    transform: scaleX(1);
}

/* Active State */
.nav-link.is-active {
    color: var(--orange-dark);
}

.nav-link.is-active::before {
    transform: scaleX(1);
    background-color: var(--orange-dark);
}

/* ── Burger Button ──────────────────────────────────────── */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 4px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    height: 2px;
    background-color: var(--text-dark);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
    transform-origin: center;
}

/* Burger → X */
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Responsive ─────────────────────────────────────────── */


@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
        position: fixed; /* löst sich vom Header */
        top: 1rem;
        right: 1.5rem;
        z-index: 1100; /* über allem, auch über dem Nav-Overlay */
        background: white;
        border-radius: 8px;
        padding: 6px;
        width: 40px;
        height: 40px;
    }

    .main-nav {
        position: fixed;
        inset: 0;
        background: white;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        z-index: 1000;
    }

    .main-nav.nav--open {
        opacity: 1;
        pointer-events: all;
    }

    .nav-list {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .nav-link {
        font-size: 1.4rem;
        padding: 0.6rem 1rem;
    }

    .nav-link::before {
        left: 1rem;
        right: 1rem;
    }
}

/* ===========================
   Hero
   =========================== */

#home {
    position: relative;
    min-height: 500px;
    height: 70vh;
    display: flex;
    align-items: center;
    background-color: var(--beige) !important;
}

.hero-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("../assets/img/hero-image.png");
    background-size: cover;
    background-position: left;
    z-index: 1;
    /* Maske für den transparenten Auslauf nach rechts */
    mask-image: linear-gradient(to left, transparent 0%, black 60%);
    -webkit-mask-image: linear-gradient(to left, transparent 0%, black 60%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: left;
}

.hero-content-wrapper {
    z-index: 2;
}

/* Mobile Version */
@media (max-width: 767.98px) {
    #home {
        text-align: center;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .hero-image-container {
        mask-image: none;
        -webkit-mask-image: none;
        /*opacity: 0.3; !* Bild abdunkeln für bessere Lesbarkeit *!*/
    }

    .hero-content-wrapper {
        width: 100%;
    }

    .hero-content {
        text-align: center;
        background: rgba(255, 255, 255, 0.85); /* Etwas deckender für bessere Lesbarkeit */
        padding: 2rem 1.5rem;
        border-radius: 1rem;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); /* Schatten für Tiefe */
    }

}

/* Desktop Anpassung */
@media (min-width: 768px) {
    .hero-image-container {
        width: 70%; /* Bild nimmt nur einen Teil ein, läuft dann nach rechts aus */
    }

    .hero-content {
        text-align: right;
    }

    .hero-content .d-md-flex {
        justify-content: flex-end !important;
    }
}

h1 {
    font-family: var(--font-display);
    color: var(--blue-dark);
}


/* ===========================
   About & Map
   =========================== */
#about {
    .lead {
        color: var(--blue-dark);
        font-weight: 700;
    }
}

#map {
    height: 500px;
    background: var(--blue-light-20);

    iframe {
        border-radius: 2rem 2rem 0 0;
        width: 100%;
        flex-grow: 1;
    }
}

.paragraph-emphasis {
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--blue-dark);
    transition: var(--transition-main);
    padding-left: 2rem;
    border-left: 4px solid var(--blue-dark);

}


/* ===========================
   Verkersversuch Section
   =========================== */

.fact-block {
    transition: var(--transition-main);
    background: var(--blue-light-20);
    flex: 1 1 0; /* alle drei gleich breit, können schrumpfen/wachsen */
    min-width: 0; /* verhindert Overflow bei langen Wörtern */

    &:hover {
        transform: var(--transform-y-main);
    }
}

/* Responsive: untereinander auf kleinen Screens */
@media (max-width: 992px) {
    #facts .d-flex {
        flex-direction: column;
        gap: 1.5rem !important;
    }
}

.rounded-circle {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: var(--blue-dark);

    i {
        color: white;
    }
}

.img-fluid {
    height: 100%;
}

.verkehrsversuch-layout {
    width: 100%;
    align-items: flex-start;
}

.vv-text-first {
    flex: 3 1 0;
    min-width: 0;
}

.image-full {
    flex: 2 1 0;
    min-width: 0;
}

/* Zweiter Absatz: auf Desktop unsichtbar (beide Absätze stecken im vv-text-first) */
.vv-text-second {
    display: none;
    flex: 3 1 0;
    min-width: 0;
}

@media (max-width: 992px) {
    .verkehrsversuch-layout {
        flex-direction: column;
        gap: 1.5rem !important;
    }

    .vv-text-first p:last-child {
        display: none; /* Mut-Absatz im ersten Block ausblenden */
    }

    .vv-text-second {
        display: block; /* Mut-Absatz als Flex-Child einblenden */
    }

    .image-full {
        width: 100%;
        min-height: 250px;

        img {
            width: 100%;
            height: 100%;
        }
    }
}


/* ===========================
   Willy Section
   =========================== */
#willy {
    background-image: url('../assets/img/bg-willy-mobil.png');
    background-position: top;
    background-repeat: no-repeat;
    background-size: cover;
    min-height: 518px;
    display: flex;
    align-items: flex-end;

    h2 {
        color: var(--blue-light-100);
        padding-bottom: 0.5rem;
    }

    p {
        color: white;
    }
}

.willy-flex {
    padding-bottom: 2rem;
    flex-direction: column;
    align-items: flex-start !important;
}

.willy-image {
    width: 50%;
    max-width: 270px;
}

.willy-content {
    width: 100%;
}

/* Ab lg: nebeneinander, unten ausgerichtet */
@media (min-width: 992px) {
    #willy {
        background-image: url('../assets/img/bg-willy.png');
        background-position: right;
        background-repeat: no-repeat;
        background-size: cover;
    }

    .willy-flex {
        flex-direction: row;
        align-items: flex-end !important;
    }

    .willy-image {
        width: 35%;
        max-width: 270px;
        padding-bottom: 10rem;
    }

    .willy-content {
        width: 60%;
    }
}

/* Ab xl: volle Höhe und größerer Abstand */
@media (min-width: 1200px) {

    .willy-flex {
        height: 100%;
    }

    .willy-content {
        height: 100%;

    }
}

/* ===========================
   Examples Section
   =========================== */
.image-example {
    height: 500px;
    width: 100%;
    position: relative;
    transition: var(--transition-main);

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

.image-example:hover {
    transform: var(--transform-y-main);
}

/* ===========================
   Support Section
   =========================== */

.feature-icon-small {
    width: 3.5rem;
    height: 3.5rem;
    padding: 0.25rem;
    background-color: var(--beige);
    border-radius: 50%;

    i {
        color: var(--orange-dark);
    }

    transition: var(--transition-main);;
}


/* ===========================
   Footer
   =========================== */

.site-footer {
    border-top: 1px solid var(--bs-border-color);
    padding: 1.5rem 2rem;
    margin-bottom: 1rem;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 576px) {
    .footer-inner {
        flex-direction: column;
        gap: 1.25rem;
    }

}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--bs-secondary-color);
    text-decoration: none;
}

.footer-logo {
    color: var(--bs-secondary-color);
    text-decoration: none;
    line-height: 1;
    transition: opacity 0.2s ease;
}

.footer-logo:hover {
    opacity: 0.7;
}

.footer-copy {
    font-size: 0.875rem;
    color: var(--bs-secondary-color);
}

.footer-nav {
    display: flex;
    gap: 1.25rem;
}

.footer-link {
    font-size: 0.875rem;
    color: var(--bs-secondary-color);
    text-decoration: none;
    position: relative;
    transition: color 0.2s ease;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--orange);
    transition: width 0.25s ease;
}

.footer-link:hover {
    color: var(--orange);
}

.footer-link:hover::after {
    width: 100%;
}

.footer-social {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.75rem;
}

.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid transparent;
    color: var(--bs-secondary-color);
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.footer-social-link i {
    font-size: 1.1rem;
    pointer-events: none; /* verhindert Hover-Flackern */
}

.footer-social-link:hover {
    color: var(--orange);
}

#impressum-content section {
    min-height: auto;
    margin-bottom: 2rem;
}

.uppercase {
    text-transform: uppercase;
}
