/* --- GRUNDLAGEN & RESET --- */
:root {
    --primary-color: #0071e3;
    --secondary-color: #1d1d1f;
    --background-color: #ffffff;
    --text-color: #1d1d1f;
    --light-gray: #f5f5f7;
    --border-radius: 20px;
    --transition-speed: 0.4s;
    --danger-color-bg: rgba(220, 53, 69, 0.15); /* NEU: Variable für Rot */
    --danger-color-text: #b02a37; /* NEU: Variable für Rot */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* KORRIGIERT: Verhindert horizontales Scrollen zuverlässig */
html, body {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- HELPER-KLASSEN --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- NAVIGATION --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color var(--transition-speed), backdrop-filter var(--transition-speed);
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-decoration: none;
}
.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
}
.nav-links li { margin-left: 30px; }
.nav-links a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: color var(--transition-speed);
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-speed) ease-out;
}
.nav-links a:hover::after { width: 100%; }

.cta-button {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}
.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 113, 227, 0.4);
}
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- HERO-BEREICH --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
    position: relative;
    color: white;
   background-image: url('../images/boot_WP1.png?auto=format&fit=crop&w=1932&q=80');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.hero-subcontent {
    margin-top: 6.5cm; /* nach Bedarf anpassen */
}
.hero-subcontent p {
    margin-bottom: 50px; /* kleiner Abstand zwischen Text und Button */
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(180, 180, 180, 0.2);
    z-index: 1; /* Muss 1 sein, damit es über dem bg-image aber unter dem content ist */
}
.hero-content {
    max-width: 800px;
    position: relative; /* Muss relativ sein, damit es über dem after-pseudo-element liegt */
    z-index: 2;
    animation: fadeInHero 2s ease-in-out;
}
@keyframes fadeInHero {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-top: 0cm;
    line-height: 1.2;
}
.hero p {
    font-size: 1.5rem;
    font-weight: 300;
    margin-top: 0px;
    color: #ffffff;
}
.hero-cta {
    background-color: white;
    color: var(--primary-color);
    padding: 15px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform var(--transition-speed), background-color var(--transition-speed);
}
.hero-cta:hover {
    transform: scale(1.05);
    background-color: var(--light-gray);
}

/* --- SEKTIONEN-STYLING --- */
section { padding: 100px 0; }
.section-title {
    text-align: center;
    margin-bottom: 60px;
}
.section-title h2 {
    font-size: 2.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}
.section-title p {
    font-size: 1.2rem;
    color: #6e6e73;
    max-width: 600px;
    margin: 0 auto;
}

/* --- VORTEILE-SEKTION --- */
#vorteile .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    text-align: center;
}
.feature-card {
    background: var(--light-gray);
    padding: 40px;
    border-radius: var(--border-radius);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}
.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}
.feature-card .icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}
.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}
.feature-card p {
    color: #6e6e73;
    line-height: 1.6;
}

/* --- BOOTE-SEKTION --- */
#boote { background-color: var(--light-gray); }
.boat-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 50px;
    margin-bottom: 80px;
}
.boat-card:nth-child(odd) .boat-image { order: 2; }
.boat-card:last-child { margin-bottom: 0; }
.boat-image img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    aspect-ratio: 16 / 10;
    object-fit: cover;
}
.boat-info .boat-type {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}
.boat-info h3 { font-size: 2.5rem; margin-bottom: 20px; }
.boat-info .boat-description { margin-bottom: 30px; color: #6e6e73; line-height: 1.7; }
.boat-specs { display: flex; gap: 30px; margin-bottom: 30px; }
.spec-item { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.spec-item i { color: var(--primary-color); font-size: 1.2rem; }
.price { font-size: 2rem; font-weight: 600; margin-bottom: 30px; }
.price span { font-size: 1rem; font-weight: 400; color: #6e6e73; }

/* --- EXTRAS-SEKTION --- */
.extras-container { display: flex; justify-content: center; gap: 40px; text-align: center; }
.extra-item {
    background: white;
    border: 1px solid #e5e5e5;
    padding: 30px;
    border-radius: var(--border-radius);
    width: 250px;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}
.extra-item:hover { transform: translateY(-10px); box-shadow: 0 10px 20px rgba(0,0,0,0.08); }
.extra-item img { width: 100%; height: 150px; object-fit: contain; margin-bottom: 20px; }
.extra-item h3 { font-size: 1.3rem; margin-bottom: 10px; }
.extra-item p { color: var(--primary-color); font-weight: 600; }

/* --- BUCHUNG-SEKTION --- */
#buchung { background: var(--light-gray); }

/* KORRIGIERT: Desktop-First Ansatz */
.booking-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Zwei Spalten als Standard für Desktop */
    align-items: start;
    gap: 60px;
    background: white;
    padding: 50px;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.booking-form .form-group { margin-bottom: 20px; }
.booking-form label { display: block; font-weight: 500; margin-bottom: 8px; }
.booking-form input, .booking-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
}
.booking-form .checkbox-group label { display: inline-block; margin-left: 10px; }

/* Kalender Styling */
.calendar-container { position: relative; }

.flatpickr-calendar {
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
    border-radius: var(--border-radius) !important;
    border: none !important;
    width: 100% !important;
}
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}
.flatpickr-day.inRange {
    background: rgba(0, 113, 227, 0.1) !important;
    box-shadow: -5px 0 0 rgba(0, 113, 227, 0.1), 5px 0 0 rgba(0, 113, 227, 0.1) !important;
    border-color: transparent !important;
}
.flatpickr-day.today {
    border-color: rgba(0, 113, 227, 0.5) !important;
}

/* KORRIGIERT: Einzelne, korrekte Regel für deaktivierte Tage */
.flatpickr-day.disabled {
    background-color: var(--danger-color-bg) !important;
    color: var(--danger-color-text) !important;
    text-decoration: line-through;
    cursor: not-allowed;
}

.price-summary {
    margin-top: 30px;
    padding: 20px;
    background-color: var(--light-gray);
    border-radius: 15px;
}
.price-summary h4 { font-size: 1.2rem; margin-bottom: 15px; }
#total-price { font-size: 1.8rem; font-weight: 600; color: var(--primary-color); }
#price-calculation { font-size: 0.9rem; color: #6e6e73; margin-top: 10px; line-height: 1.5; }

.submit-button {
    width: 100%;
    padding: 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-speed);
}
.submit-button:hover { background: #005bb5; }
#booking-success {
    display: none;
    margin-top: 20px;
    padding: 15px;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 10px;
    text-align: center;
}

/* --- FOOTER --- */
footer { background-color: var(--secondary-color); color: #a1a1a6; padding: 60px 0 30px 0; }
.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    padding-bottom: 40px;
    border-bottom: 1px solid #424245;
}
.footer-about h3, .footer-links h3, .footer-contact h3 { color: white; font-size: 1.2rem; font-weight: 500; margin-bottom: 20px; }
.footer-about p { line-height: 1.7; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #a1a1a6; text-decoration: none; transition: color var(--transition-speed); }
.footer-links a:hover { color: white; }
.footer-contact p { margin-bottom: 10px; }
.social-icons { margin-top: 20px; }
.social-icons a { color: #a1a1a6; font-size: 1.5rem; margin-right: 15px; transition: color var(--transition-speed); }
.social-icons a:hover { color: var(--primary-color); }
.footer-bottom { text-align: center; padding-top: 30px; font-size: 0.9rem; }


/* --- STYLING FÜR CUSTOM SELECT & KALENDER-LOADER --- */
.custom-select-wrapper { position: relative; user-select: none; }
.custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 10px;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.custom-select-wrapper.open .custom-select-trigger {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.2);
}
.custom-select-trigger .fas { transition: transform 0.3s ease; }
.custom-select-wrapper.open .custom-select-trigger .fas { transform: rotate(180deg); }
.custom-options {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background-color: #fff;
    border-radius: 10px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}
.custom-select-wrapper.open .custom-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.custom-option { padding: 12px 15px; cursor: pointer; transition: background-color 0.2s; }
.custom-option:hover { background-color: var(--light-gray); }
.custom-option.selected { background-color: var(--primary-color); color: white; font-weight: 500; }
.calendar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--border-radius);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.calendar-container.loading .calendar-overlay { opacity: 1; visibility: visible; }
.loader {
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-gray);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }


/* --- RESPONSIVE DESIGN --- */
@media (max-width: 992px) {
    .hero h1 { font-size: 3rem; }
    .hero p { font-size: 1.2rem; }
    
    /* KORRIGIERT: Sorgt zuverlässig für eine Spalte auf Tablets und darunter */
    .booking-wrapper {
        grid-template-columns: 1fr;
        padding: 30px;
        gap: 40px;
    }

    .boat-card { grid-template-columns: 1fr; }
    
    /* NEU & KORRIGIERT: Zwingt das Bild bei ALLEN Bootskarten nach oben */
    .boat-card .boat-image { 
        order: -1; 
    }
    
    /* Die Desktop-Regel (.boat-card:nth-child(odd) .boat-image) wird hiermit überschrieben,
       da diese Media-Query später im Code steht. */
       
    .boat-image { margin-bottom: 30px; }
    .footer-content { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: right 0.5s ease-in-out;
    }
    .nav-links.nav-active { right: 0; }
    .nav-links li { margin: 20px 0; }
    .nav-links a { font-size: 1.5rem; }
    .menu-toggle { display: block; z-index: 1001; }
    
    .extras-container { flex-direction: column; align-items: center; }
    .extra-item { width: 80%; max-width: 300px; }
}

/* ======================================= */
/* --- LEGAL MODAL & FOOTER LINKS --- */
/* ======================================= */

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-legal-links a {
    color: #a1a1a6;
    text-decoration: none;
    margin-left: 20px;
    font-size: 0.9rem;
    transition: color var(--transition-speed);
}

.footer-legal-links a:hover {
    color: white;
}

.legal-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.legal-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.legal-modal-content {
    background-color: var(--background-color);
    width: 90%;
    max-width: 750px;
    max-height: 85vh;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.legal-modal-overlay.active .legal-modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid var(--light-gray);
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.modal-close-btn {
    font-size: 2rem;
    font-weight: 300;
    color: #a1a1a6;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s, transform 0.3s;
}

.modal-close-btn:hover {
    color: var(--secondary-color);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.legal-text-content h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.legal-text-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 25px;
    margin-bottom: 10px;
}

.legal-text-content p {
    line-height: 1.7;
    margin-bottom: 15px;
    color: #6e6e73;
}

.legal-text-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}
.legal-text-content a:hover {
    text-decoration: underline;
}

/* Responsive Anpassung für das Modal auf kleinen Bildschirmen */
@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .footer-legal-links a {
        margin: 0 10px;
    }
    .modal-header, .modal-body {
        padding: 20px;
    }


}