/* NautiApp - Master Stylesheet 
    Version: 3.8 (Ultra-Smooth Submenu Edition)
*/

:root {
    --nauti-blue: #005596;
    --nauti-bg: #f0f4f7;
    --nauti-white: #ffffff;
}

/* --- Basis & Layout --- */
body {
    background-color: var(--nauti-bg);
    margin: 0; 
    padding: 0;
    font-family: sans-serif;
    -webkit-font-smoothing: antialiased;
    color: #444;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--nauti-blue);
    line-height: 1.3;
}

.container {
    width: 85% !important;
    margin: 0 auto;
}

/* --- Header & Navigation --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center; 
    padding: 20px 0;
    position: relative;
    z-index: 1100; /* Erhöht, damit Hamburger und Menü immer oben liegen */
}

/* Brand-Einheit: Relativ für das absolute Logo */
.navbar-brand {
    display: flex;
    flex-direction: column; 
    align-items: center;
    position: relative; 
    color: var(--nauti-blue) !important;
    text-decoration: none;
    font-weight: bold;
}

.nauti-brand-text {
    font-size: 1.8rem;
    line-height: 1;
    display: inline-block;
}

.nauti-nav-logo {
    position: absolute;
    top: 100%;             
    left: 0;
    width: 100%;           
    height: auto;          
    margin-top: 15px;       /* Deine Einstellung: 15px */
    display: block;
    z-index: 100;          
}

/* Hamburger Icon Styling */
.menu-toggle {
    display: none; /* Nur auf Mobile sichtbar */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1200;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--nauti-blue);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.dropmenu ul {
    display: flex;
    list-style: none;
    margin: 0; 
    padding: 0;
}

.dropmenu ul li {
    position: relative;
}

.dropmenu ul li a {
    display: block;
    padding: 10px 20px;
    color: var(--nauti-blue) !important;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

/* --- Untermenü Logik (NautiApp Ultra-Smooth Desktop) --- */
.dropmenu ul li ul {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    display: block !important; 
    visibility: hidden;
    
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 2.0s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.4s ease, 
                visibility 0.4s;

    flex-direction: column !important;
    background-color: rgba(240, 244, 247, 0.05) !important; 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    min-width: 240px;
    z-index: 1000;
    border-top: 0px solid var(--nauti-blue);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    padding: 0; 
    margin: 0;
}

.dropmenu ul li ul.is-open {
    max-height: 600px; 
    opacity: 1;
    visibility: visible;
    padding: 10px 0 !important;
    border-top: 3px solid var(--nauti-blue) !important;
}

.dropmenu ul li ul li a {
    padding: 12px 25px;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(0,85,150,0.05);
    background: transparent;
}

.dropmenu ul li ul li a:hover {
    background-color: var(--nauti-blue);
    color: white !important;
}

/* --- Bilder --- */
#header-image {
    position: relative;
    background-size: cover;
    background-position: center;
    width: 100%;
    z-index: 1; 
}

.header-home, .header-sub { height: 226px; }

/* --- Content & Willkommenstext --- */
.main-welcome-content {
    margin-top: 100px; 
    margin-bottom: 50px;
    width: 100%;
    line-height: 1.6;
}

.main-welcome-content h1, 
.main-welcome-content h2, 
.main-welcome-content h3 {
    text-align: center !important;
}

.main-welcome-content p {
    text-align: left !important;
}

/* --- Nauti-Boxen System --- */
.nauti-grid {
    margin-top: 20px !important;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
    padding-bottom: 50px;
}

.nauti-box {
    width: 400px;
    height: auto;
    background: var(--nauti-white);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.nauti-box img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.nauti-box-content {
    padding: 25px !important;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.nauti-box-content img { display: none !important; }

.nauti-box-content h3 {
    text-align: center !important;
    margin-top: 5px !important;
    margin-bottom: 25px !important;
    font-size: 1.5rem;
}

.nauti-box-content p {
    text-align: left !important;
    line-height: 1.6;
    color: #444;
    hyphens: auto;
    word-break: break-word;
}

.nauti-btn {
    background: var(--nauti-blue);
    color: white !important;
    padding: 15px;
    text-align: center;
    margin-top: auto; 
    text-decoration: none;
    font-weight: bold;
    border-radius: 0 0 12px 12px; 
    align-self: stretch; 
}

/* ============================================================
    MOBILE OPTIMIERUNG (Neu: Hamburger & Smooth Overlay)
   ============================================================ */

@media screen and (max-width: 768px) {
    .container { width: 92% !important; padding: 0 10px !important; }

    .menu-toggle { display: flex; } /* Zeige Hamburger */

    /* Navigation als Overlay */
    .dropmenu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(240, 244, 247, 0.98);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        z-index: 1050;
        border-bottom: 3px solid var(--nauti-blue);
        
        /* Smooth Aufblättern Logik - Deine Einstellung: 2.0s */
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: max-height 2.0s cubic-bezier(0.4, 0, 0.2, 1), 
                    opacity 0.4s ease;
    }

    /* Zustand wenn offen */
    .dropmenu.is-active {
        max-height: 100vh;
        opacity: 1;
        visibility: visible;
        padding: 20px 0;
    }

    /* Hamburger Animation zu 'X' */
    .menu-toggle.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .menu-toggle.open span:nth-child(2) { opacity: 0; }
    .menu-toggle.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    /* Logo & Text auf Mobile */
    .nauti-brand-text { font-size: 1.4rem !important; }
    
    body { font-size: 16px !important; }
    
    .main-welcome-content h1 { font-size: 1.7rem !important; }
    .main-welcome-content p { font-size: 1.1rem !important; line-height: 1.5 !important; }

    .nauti-grid { gap: 25px !important; margin-top: 10px !important; }

    .nauti-box { width: 100% !important; min-width: 100% !important; margin-bottom: 20px !important; }
    .nauti-box img { height: 200px !important; }

    .main-welcome-content { margin-top: 40px !important; }
    .header-home, .header-sub { height: 180px !important; }

    .dropmenu ul { flex-direction: column; width: 100%; }

    /* Mobile Untermenüs - JETZT AUCH SMOOTH */
    .dropmenu ul li ul {
        position: static !important;
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        border-left: 4px solid var(--nauti-blue);
        margin-left: 20px;
        background: transparent !important;
        box-shadow: none !important;
        overflow: hidden;
        /* Zeitfaktor angepasst auf 2.0s für maximale Smoothness */
        transition: max-height 2.0s cubic-bezier(0.4, 0, 0.2, 1), 
                    opacity 0.8s ease;
    }

    .dropmenu ul li ul.is-open {
        max-height: 800px; /* Genug Platz für die Unterpunkte */
        opacity: 1;
        visibility: visible;
        padding: 10px 0 !important;
    }
}

/* --- Buttons & Info --- */
.btn-inline {
    display: inline-block;
    background-color: var(--nauti-blue);
    color: white !important;
    padding: 10px 22px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 6px;
    font-size: 1rem;
    margin-left: 10px;
    transition: background 0.3s ease;
    vertical-align: middle;
    border: none;
}

.btn-inline:hover { background-color: #003d6b; text-decoration: none; }

.update-info {
    font-size: 0.9rem;
    color: #777;
    font-style: italic;
    border-top: 1px solid #eee;
    padding-top: 10px;
    margin-top: 20px;
}

#gdpr-cookie-notice { background-color: #dee6ed !important; border-top: 4px solid #005596 !important; color: #333 !important; }
#gdpr-cookie-notice .button { background-color: #005596 !important; color: white !important; border-radius: 4px !important; padding: 10px 25px !important; font-weight: bold; }
#gdpr-cookie-notice a { color: #005596 !important; text-decoration: underline; }
