@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

body:has(#toggle:checked) .dark-effected-content p {
    color: white;
}
body:has(#toggle:checked) .dark-effected-content ul {
    color: white;
}
body:has(#toggle:checked) .dark-effected-content li {
    color: white;
}
body:has(#toggle:checked) .dark-effected-content strong {
    color: white;
}
body:has(#toggle:checked) .dark-effected-content h1, body:has(#toggle:checked) .dark-effected-content h2, body:has(#toggle:checked) .dark-effected-content h3, body:has(#toggle:checked) .dark-effected-content h4, body:has(#toggle:checked) .dark-effected-content h5, body:has(#toggle:checked) .dark-effected-content h6 {
    color: white;
}

/* Container für die Animation */
.nav-anim-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease-out, opacity 0.2s ease-out, transform 0.3s ease-out;
    opacity: 0;
    transform: translateY(-10px);
    overflow: hidden;
}

/* Wenn das Details-Element offen ist */
details[open] > .nav-anim-wrapper {
    grid-template-rows: 1fr;
    opacity: 1;
    transform: translateY(0);
}

/* Der eigentliche Inhalt im Wrapper braucht min-height: 0 für den Grid-Trick */
.nav-anim-content {
    min-height: 0;
}
/* LEVEL 0: Das Haupt-Dropdown schwebt über dem Content */
.nav-wrapper-absolute {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 250px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 9999;
    background: white; /* Weißer Hintergrund für das ganze Dropdown */
}

/* LEVEL 1+: Unter-Untermenüs (Akkordeon) */
.nav-wrapper-relative {
    position: relative; /* Schiebt die anderen Links innerhalb des Dropdowns nach unten */
    width: 100%;
}
/* Pfeil-Animation */
details summary span {
    transition: transform 0.3s ease;
}

details[open] summary span {
    transform: rotate(180deg);
}


body {
    transition: background-color 0.3s ease; /* Optional: smooth transition */
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

nav.nav-hidden ul li a,
nav.nav-hidden summary {
    pointer-events: none; /* Verhindert Klicks und das Aufklappen */
    cursor: default;
    user-select: none;
}

/* Optional: Damit man sieht, dass es inaktiv ist (z.B. für Tests) */
nav.nav-hidden summary {
    list-style: none; /* Entfernt das Standard-Dreieck, falls gewünscht */
}

.hero-light{
  z-index: -1; width: calc(100% + 20px); height: calc(100% + 20px); top: -10px; left: -10px; background-color: /*#ffcf3d*/rgb(var(--color-accent)); border-radius: 15px; position: absolute; filter: blur(1.5em);
}
/* Hide Article Metadata (Details, Author, Category, etc.) */
.article-info, 
.article-info-term, 
.article-details {
    display: none;
}

/* Hide Breadcrumbs */
.breadcrumb {
    display: none;
}

/* Optional: Hide the 'Details' header specifically if it persists */
dl.article-info dt.article-info-term {
    display: none;
}

/* Custom Logic and Animations */
.dark-effected {
    color: black; 
    transition: color 0.3s ease;
}

.dark-toggle {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9999;
    background: linear-gradient(90deg, #3ea6ff, #00b4ff);
    color: inherit;
    border: 1px solid rgba(0, 0, 0, 0.15);
    padding: 8px 12px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(2, 6, 23, 0.35);
    cursor: pointer;
    font-weight: 700;
    font-family: inherit;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.dark-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.25);
}

body:has(#toggle:checked) {
    background-color: #070a1a;
}

body:has(#toggle:checked) .dark-effected {
    color: white;
}

/* 1. Remove any hardcoded text visibility if you prefer */
#dark-toggle-text::after {
    content: "Dark"; /* Default state */
}

.dark-bg-effected{
  background: white;
}

/* 2. Change the text when the checkbox is checked */
body:has(#toggle:checked) #dark-toggle-text::after {
    content: "Light";
}

body:has(#toggle:checked) .dark-toggle {
    background-image: linear-gradient(90deg, #c83cff, #d261ff);
}

body:has(#toggle:checked) .card {
    background: #0b0f20;
    color: white;
}
body:has(#toggle:checked) .dark-bg-effected {
    background: #0b0f20;
    color: white;
}
body:has(#toggle:checked) .value {
    background: #0b0f20;
    color: white;
}

body:has(#toggle:checked) .hero-light {
    opacity: 0.2 !important;
}

#sidebar-active, #left-sidebar-active, .sub-toggle { display: none; }

/* Main Navigation Logic */
#sidebar-active:checked ~ .mobile-dropdown { 
    max-height: 85vh !important; 
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
}
#sidebar-active:checked ~ .overlay-nav { display: block !important; }

/* Left Sidebar Responsive Logic */
#left-sidebar-active:checked ~ .left-sidebar { 
    left: 0 !important; 
    box-shadow: 10px 0 30px rgba(0,0,0,0.2) !important;
}
#left-sidebar-active:checked ~ .overlay-sidebar { display: block !important; }

/* Remove default details arrow */
details summary { list-style: none; outline: none; }
details summary::-webkit-details-marker { display: none; }

/* Hover effects */
.nav-item:hover, .dropdown-item:hover { background-color: rgba(0, 0, 0, 0.05) !important; }

.revealable:hover, .value:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1) !important;
}
.gallery img:hover {
    transform: translateY(-6px) scale(1.03) !important;
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.18) !important;
}

/* Hero Slideshow Animation */
:root { 
  --slide-time: 10s;
}
@keyframes slideShow {
    0% { opacity: 0; transform: scale(.98); pointer-events: none; }
    5%, 28% { opacity: 1; transform: scale(1); pointer-events: auto; }
    33.33%, 100% { opacity: 0; transform: scale(.98); pointer-events: none; }
}
.slide {
    animation: slideShow calc(3 * var(--slide-time)) infinite ease-in-out;
    opacity: 0;
}
.slide:nth-child(1) { animation-delay: 0s; }
.slide:nth-child(2) { animation-delay: var(--slide-time); }
.slide:nth-child(3) { animation-delay: calc(2 * var(--slide-time)); }

@media (max-width: 1500px) {
    .nav-link-desktop { display: none !important; }
    .open-sidebar-button, .close-sidebar-button { display: flex !important; }
    .open-left-sidebar-button { display: flex !important; }
    
    .left-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -300px !important;
        width: 280px !important;
        height: 100vh !important;
        z-index: 2000 !important;
        margin: 0 !important;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .main-content {
        width: 100% !important;
        margin-left: 2% !important;
    }

    .mobile-dropdown .dropdown-list { 
        position: static !important; 
        box-shadow: none !important; 
        padding-left: 20px !important; 
        background: transparent !important;
        width: 100% !important;
    }
    .mobile-dropdown::before {
        content: "";
        position: absolute;
        top: -10px;
        right: 25px;
        border-width: 0 10px 10px 10px;
        border-style: solid;
        border-color: transparent transparent rgba(255, 246, 166, 0.7) transparent;
    }
    .content-line {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 20px !important;
    }
    .features-grid {
        grid-template-columns: 1fr !important;
    }
    .recipe{
      flex-direction: column !important;
      align-items: center !important;
      gap: 20px;
    }
    .work{    
      width: 90% !important;
      margin: 0 !important;
    }
    .engridients{
      width: 90%!important;
    }
    .titelRecipe{
      display:flex!important;
      flex-direction:column!important;
      align-items:center!important;
    }
}

@media (min-width: 1400px) {
    .hero {
        background-size: 50% 100% !important;
        background-repeat: repeat-x !important;
    }
}

/* Hide Page Headings (Menu Titles) and Article Titles */
.page-header, 
h1, 
h2.item-title, 
[itemprop="name"] {
    display: none;
}

/* Hamburger Icon (Three Lines) */
/* .open-sidebar-button::after {
    content: '';
    display: block;
    width: 30px;
    height: 3px;
    background: #000;
    box-shadow: 0 10px 0 #000, 0 -10px 0 #000;
}*/

/* Modern Sidebar Logic (Works even if nested) */
body:has(#left-sidebar-active:checked) .left-sidebar {
    left: 0 !important;
    box-shadow: 10px 0 30px rgba(0,0,0,0.2) !important;
}

body:has(#left-sidebar-active:checked) .overlay-sidebar {
    display: block !important;
}

body:has(#sidebar-active:checked) .mobile-dropdown {
    max-height: 85vh !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
}

body:has(#sidebar-active:checked) .overlay-nav {
    display: block !important;
}


/* Fix Navigation Alignment on Mobile */
nav {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 75px !important;
}

/* Override the 100% width from the article's UL tags */
nav ul {
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 100%;
}

/* Draw Three Lines for Aktuelles button */
/* .open-left-sidebar-button::before {
    content: '';
    display: block;
    width: 25px;
    height: 3px;
    background: #000;
    box-shadow: 0 8px 0 #000, 0 -8px 0 #000;
    margin-right: 12px;
}*/

/* Ensure Logo/Welcome Text is centered and visible */
nav li:first-child {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start;
    gap: 10px;
}

/* Make both buttons behave the same */
.open-left-sidebar-button, 
.open-sidebar-button {
    display: flex !important;
    align-items: center !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    padding: 0 15px !important;
    height: 100% !important;
}

/* Force the Sidebar to slide even if nested */
#left-sidebar-active:checked ~ .left-sidebar,
body:has(#left-sidebar-active:checked) .left-sidebar {
    left: 0 !important;
}


/* --- DESKTOP NAVIGATION FIXES --- */

/* Hide mobile buttons by default on Desktop */
.open-sidebar-button, 
.open-left-sidebar-button {
    display: none !important;
}

/* Navigation Layout for Desktop */
nav {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 75px !important;
    padding: 0 20px !important;
}

/* Ensure the Welcome section stays on the left */
.welcome-section {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start;
    gap: 15px !important;
    margin-right: auto !important; /* Pushes everything else to the right */
}

/* Desktop Menu on the Right */
.nav-link-desktop {
    display: flex !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 100% !important;
}

/* --- MOBILE RESPONSIVE FIXES --- */
@media (max-width: 1500px) {
    /* Show mobile buttons only on smaller screens */
    .open-sidebar-button, 
    .open-left-sidebar-button {
        display: flex !important;
    }

    /*.main-content{
       margin-left: 0.5% !important;
    }*/
  
    /*.left-sidebar {
      padding: 0 !important;
    }*/

    /* Hide desktop links on mobile */
    .nav-link-desktop {
        display: none !important;
    }

    /* Center welcome message on mobile */
    .welcome-section {
        margin: 0 auto !important;
    }
    
    /* Logo size adjustment for mobile */
    .welcome-section img {
        height: 40px !important;
    }
    .welcome-section p {
        /*font-size: 12px !important;*/font-size: min(calc(4px + 1vw), 20px)!important;
    }
}


