* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
header {
    background-color: rgb(14, 24, 33);
    width: 100%;
    position: fixed;
    top:0;
    left: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
}

/* Site-Logo oben links */
.site-logo {
    color: white;
    font-family: sans-serif;
    font-size: 0.95em;
    font-weight: 600;
    text-decoration: none;
    padding: 15px 20px;
    white-space: nowrap;
    flex-shrink: 0;
}
.site-logo:hover {
    color: #ccc;
}

header nav {
    margin-left: auto;          /* schiebt Nav nach rechts */
}

header nav > ul {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    list-style: none;
    margin: 0;
    padding: 0;
}

header nav ul li {
    position: relative;
}

header nav ul li a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    font-family: sans-serif;
}

header nav ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #222;
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 150px;
    z-index: 100;
}

header nav ul ul li {
    width: 100%;
}

header nav ul li:hover > ul {
    display: block;
}

header nav ul ul ul {
    top: 0;
    left: 100%;
}

header nav ul li a:hover {
    background-color: #444;
}

header nav ul li:has(ul) > a .dropdown-toggle {
    display: inline-block;
    margin-left: 6px;
    font-weight: 600;
    transition: transform 0.3s;
    cursor: pointer;
    padding: 0 4px; /* grÃ¶ÃŸere KlickflÃ¤che */
}


header nav ul li.open > a .dropdown-toggle {
    transform: rotate(90deg);
}

/* Dropdown-Sichtbarkeit wird auf Desktop Ã¼ber :hover gesteuert (s.u.),
   auf Mobile Ã¼ber .open (im @media-Block) */



body {
    /* Dieser Wert muss der HÃ¶he deines Headers entsprechen */
 
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}


footer{
    position: relative;
    background-color:  rgb(14, 24, 33);
    width: 100%;
    bottom:0;
    left: 0;
    margin-left: 0;
    overflow: hidden;
    
}
footer nav{
     display: flex;
    flex-direction: row; 
    justify-content: left;
    list-style: none;
    margin: 0;
    padding: 0;
   bottom: 0;
} 
footer nav a{
    display: block;
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    font-family: sans-serif;}
footer nav a:hover{
    display: block;
   background-color: #444; 
}


main{
    max-width: 1000px;   /* Begrenzt die Breite auf groÃŸen Bildschirmen */
    margin: 0 auto;      /* Zentriert den Bereich horizontal */
    padding: 60px 20px;  /* Abstand nach oben/unten und links/rechts */
    width: 100%;         /* Nutzt auf kleinen Bildschirmen die volle Breite */
    flex: 1;
    font-family: sans-serif;
    
}
main h1{
    padding-top: 20px;
    padding-bottom: 30px;
}
main h2{
    padding-bottom: 15px;
    padding-top: 15px;
}
main section div{
   text-align: justify; 
   hyphens: auto;
}
main section  ul{
    padding-top: 10px;
    padding-left: 40px;
    padding-bottom: 10px;
}
main article{
   text-align: justify; 
   hyphens: auto; 
}

/*Startseite*/


main h1.Startseite{
    background-image: url('Bilder/NGC7000.jpg') ;
    color: white;
    background-size: cover;
  width: 1000;
  height: 66vh;
  background-position: center;
  background-repeat: no-repeat;
 text-align: left;
 
  font-size: 3em;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 50vh;
  padding-right: 60vh;
}
main h1.Startseite span.sub{
    font-size: 0.4em;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.8);

}
main section div.Startseite p{
    padding-top: 100px;
}
main.Sternwarte section div.EinleitungSternwarte{
    padding-bottom: 10px;
    padding-right: 350px;
}
main.Sternwarte section div.news ul{
    color: black;
}
main.Sternwarte section div.links ul{
    display: flex;
    flex-direction: row; 
    justify-content: center ;
    list-style: none;
    margin: 0;
    padding: 0;
    padding-top: 40px;
    gap: 30px;
    width: 100%; 
}
main.Sternwarte section div.links ul li a.button {
    text-align: center;
    text-decoration: none;
    color: rgb(255, 255, 255);
    font-weight: 600;
    font-size: 1.1em;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
main.Sternwarte section div.links ul li{
    background-color: #b2aeae;
    flex: 1;
    height: 120px;
    display: flex;
    position: relative;
    overflow: hidden;
    background-size: cover;
}
/* Hintergrund Bilder hier in eigene Klassen einfÃ¼gen */

main.Sternwarte section div.links ul li:hover{
   background-color: rgba(0,0,0,0.5); 
   transition: background-color 0.2s ease;
} 

/*Galerie*/

main section div.Miniaturen ul {
    display: flex;
    flex-direction: column; 
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    padding-top: 20px;
    gap: 30px;
    width: 100%;
    height: auto;
}
main section div.Miniaturen ul li a.button {
    text-align: left;
    position: relative;
    z-index: 1;
    text-decoration: none;
    color: rgb(255, 255, 255);
    font-weight: 600;
    font-size: 1.5em;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
main section div.Miniaturen ul li {
    flex: none;
    height: 280px;
    display: flex;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
main section div.Miniaturen ul li::after {
    content: "";
    position: absolute;
    inset: 0;                              /* fÃ¼llt das ganze li aus */
    background-color: rgba(0, 0, 0, 0);   /* erstmal transparent */
    transition: background-color 0.3s ease;
}
main section div.Miniaturen ul li:hover::after {
    background-color: rgba(0, 0, 0, 0.3);
}
main section div.Miniaturen ul li.Nebel{
background-image: url("Bilder/NGC7000.jpg");
}
main section div.Miniaturen ul li.Galaxien{
background-image: url("Bilder/M31.jpg");

}
main section div.Miniaturen ul li.Polarlichter{
background-image: url("Bilder/PolarlichtMai.jpg");
}
main section div.Miniaturen ul li.Sterne{
background-image: url("Bilder/M45.jpg");
}
main section div.Miniaturen ul li.Milchstrasse{
background-image: url("Bilder/MilchstrasseBretagne.jpg");
background-position: center -500px;
}
main section div.Miniaturen ul li.Sonnensystem{
background-image: url("Bilder/Mond1.jpg");
}


/*Bilder in der Galerie*/

ul.Galerie li {
    display: flex;
    flex-direction: column;  /* Bild oben, Unterschrift unten */
}

ul.Galerie {
    display: grid;
    grid-template-columns: repeat(1 , 1fr);
    gap: 20px;       /* Abstand zwischen allen Bildern */
    list-style: none;
    padding: 0;
    padding-top: 20px;
}
ul.Galerie li img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Die Zeile die immer sichtbar ist */
ul.Galerie li details summary {
    padding: 20px 20px;
    background-color: #1a1a1a;
    color: white;
    cursor: pointer;
    font-weight: 600;
    list-style: none;        /* entfernt den Standard-Pfeil */
}

/* Eigener Pfeil */
ul.Galerie li details summary::after {
    content: "↓";
    float: right;
    transition: transform 0.3s;
}

/* Pfeil dreht sich wenn offen */
ul.Galerie li details[open] summary::after {
    transform: rotate(180deg);
}

/* Die Aufnahmedaten die aufklappt */
ul.Galerie li details .Aufnahmedaten {
    background-color: #2a2a2a;
    color: #ccc;
    padding: 10px 10px 10px 25px;
    margin: 0;
    font-size: 0.9em;
    line-height: 1.8;
}
.Aufnahmedaten li a.Astrobin,
.Aufnahmedaten li a.Astrobin:visited {
    color: #ffffff !important;
}

.Aufnahmedaten li a.Astrobin:hover {
    color: #ffffff !important;
}


/*Hamburger*/
/* â”€â”€ Hamburger-Button (nur sichtbar auf Mobile) â”€â”€ */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: fixed;
    top: 17px;
    right: 20px;
    z-index: 2000;
}
.hamburger span {
    display: block;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
/* X-Animation wenn offen */
.hamburger.is-open span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

/* Overlay-Verdunkelung hinter der Sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 900;
}
.sidebar-overlay.active {
    display: block;
}

/* â”€â”€ Mobile Styles â”€â”€ */
@media (max-width: 768px) {

    /* Hamburger einblenden */
    .hamburger { display: flex; }

    /* Header bekommt minimale Hoehe */
    header {
        height: 54px;
        display: flex;
        align-items: center;
    }

    /* Nav wird zur Sidebar */
    header nav {
        margin-left: 0;         /* Desktop-margin zuruecksetzen */
        position: fixed;
        top: 0;
        right: -280px;          /* versteckt rechts auÃŸerhalb */
        width: 260px;
        height: 100vh;
        background-color: rgb(14, 24, 33);
        z-index: 1500;
        overflow-y: auto;
        transition: right 0.3s ease;
        padding-top: 60px;      /* Platz fÃ¼r den X-Button */
    }
    header nav.sidebar-open {
        right: 0;
    }

    /* MenÃ¼-Liste vertikal stapeln */
    header nav > ul {
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
    }

    /* UntermenÃ¼s: statisch, leicht eingerÃ¼ckt */
    header nav ul ul {
        position: static;
        min-width: unset;
        background-color: rgba(255,255,255,0.05);
        padding-left: 15px;
    }
    header nav ul ul ul {
        left: unset;
        top: unset;
    }

    /* Hover-Dropdown deaktivieren â€” alles lÃ¤uft Ã¼ber .open */
    header nav ul li:has(ul) > ul {
        display: none;
    }
    header nav ul li:hover > ul {
        display: none;
    }
    header nav ul li.open > ul {
        display: block;
    }

    /* Links etwas kompakter */
    header nav ul li a {
        padding: 12px 20px;
    }

    /* Kein Hintergrund wenn Dropdown offen ist */
    header nav ul li.open > a {
        background-color: transparent;
    }

    /* Dropdown-Toggle auf Mobile groesser und besser tippbar */
    header nav ul li:has(ul) > a {
        display: flex;
        justify-content: space-between;
        align-items: stretch;
    }
    header nav ul li:has(ul) > a {
        position: relative;
    }
    header nav ul li:has(ul) > a::after {
        content: '';
        position: absolute;
        right: 75px;
        top: 20%;
        height: 60%;
        width: 1px;
        background: rgba(255,255,255,0.15);
    }
    header nav ul li:has(ul) > a .dropdown-toggle {
        display: flex;
        align-items: center;
        font-size: 1.2em;
        width: 52px;
        flex-shrink: 0;
        justify-content: center;
    }
    header nav ul li:has(ul) > a .dropdown-toggle:hover {
        background-color: transparent;
    }

    /* â”€â”€ Main-Content â”€â”€ */
    main {
        padding: 70px 15px 30px;  /* oben Platz fÃ¼r fixen Header */
    }

    /* Startseite Hero */
    main h1.Startseite {
        font-size: 2em;
        height: 50vh;
        padding-top: 35vh;
        padding-right: 0;
        align-items: flex-start;
        padding-left: 15px;
    }

    /* Sternwarte-Intro ohne den breiten rechten Abstand */
    main.Sternwarte section div.EinleitungSternwarte {
        padding-right: 0;
    }

    /* Sternwarte-Links: vertikal statt horizontal */
    main.Sternwarte section div.links ul {
        flex-direction: column;
        gap: 15px;
        padding-top: 20px;
    }
    main.Sternwarte section div.links ul li {
        height: 90px;
    }

    /* Galerie-Miniaturen: fixe HÃ¶he statt 2000px */
    main section div.Miniaturen ul {
        height: auto;
        gap: 15px;
    }
    main section div.Miniaturen ul li {
        height: 160px;
    }
    main section div.Miniaturen ul li a.button {
        font-size: 1.2em;
    }

    /* Bild-Galerie bleibt 1-spaltig â€” passt schon gut */
    ul.Galerie {
        gap: 15px;
    }

    /* Footer-Links umbrechen bei Bedarf */
    footer nav {
        flex-wrap: wrap;
    }
}