/* ==========================================================
   SCHRIFTEN
   ========================================================== */
@font-face {
  font-family: 'SpaceMono';
  src: url('fonts/SpaceMono.woff2') format('woff2'),
       url('fonts/SpaceMono.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'RedHat';
  src: url('fonts/RedHat.woff2') format('woff2'),
       url('fonts/RedHat.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Garage';
  src: url('fonts/Garage.woff2') format('woff2'),
       url('fonts/Garage.otf') format('opentype');
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('fonts/Montserrat.woff2') format('woff2'),
       url('fonts/Montserrat.ttf') format('truetype');
  font-display: swap;
}

/* ==========================================================
   ALLGEMEIN
   ========================================================== */
html, body {
  margin: 0;
  padding: 0;
  background-color: #fff;
  text-align: center;
  overflow: hidden;
  height: 100vh;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

* {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

:focus-visible { outline: 3px solid #000957; outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ==========================================================
   HINTERGRUND
   ========================================================== */
#background {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 110vw;
  height: 110vh;
  background: url('images/hg_space.jpg') no-repeat center center / cover;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
  will-change: transform;
}

/* ==========================================================
   NAVIGATION
   ========================================================== */
nav { position: fixed; top: 0; left: 0; width: 100%; background-color: #f9f5e7; z-index: 100; }
nav ul {
  display: flex; justify-content: space-between; list-style: none;
  padding: 0; margin: 0; border-bottom: 2px solid #000957; height: 8vh; align-items: center;
}

nav ul li {
  flex: 1; text-align: center; border-right: 2px solid #000956; height: 100%;
  display: flex; align-items: center; justify-content: center;
}

nav ul li:last-child { border-right: none; }
nav ul li a {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  text-decoration: none; color: #000956; font-family: 'RedHat', serif; font-weight: bold;
  text-transform: uppercase; font-size: 1.2vw;
}

nav ul li a:hover { font-style: italic; }

/* ==========================================================
   HEADER
   ========================================================== */
header {
  position: fixed; top: 0; left: 0; width: 100%;
  display: flex; align-items: center; justify-content: flex-end;
  padding: 0; z-index: 500; height: 8vh;
}

@media screen and (min-width: 1025px) {
  html, body { overflow: auto; height: auto; }
  .menu-close { display: none; }
}

@media screen and (max-width: 768px) {
  body { padding-top: 0; margin: 0; }

  header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 0;
    padding: 0;
    height: 8vh;
  }

  nav {
    display: none;
    position: fixed;
    right: 0;
    width: auto;
    height: 100%;
    background-color: #f9ecda;
    text-align: center;
    z-index: 100;
  }

  nav.show { display: block; }
  nav ul { flex-direction: column; width: 100%; border-bottom: 0; }
  nav ul li { text-align: center; padding: 2vh; border-right: 0; }
  nav ul li a { font-size: 9vw; }
}

/* ==========================================================
   3D MODEL VIEWER
   ========================================================== */
.hotspot-button {
  background: #000957;
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 1em;
  cursor: pointer;
}

.progress-bar {
  width: 20%;
  height: 6px;
  background-color: #eee;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  border-radius: 3px;
  overflow: hidden;
}

.update-bar {
  background-color: #250c5c;
  width: 0%;
  height: 100%;
  transition: width 0.3s ease;
}

/* ==========================================================
   ROOMTOUR BUTTON
========================================================== */
#roomtour-btn {
    position: fixed;
    bottom: 3vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    
    background: #f9f5e7;
    color: #000957;
    border: 2px solid #000957;
    border-radius: 0;
    
    padding: 1rem 2.5rem;
    font-family: 'RedHat', serif;
    font-weight: bold;
    font-size: 1.2rem;
    text-transform: uppercase;
    
    cursor: pointer;
    
    box-shadow: 0.5vw 0.5vw 0 #000957;
    
    transition: transform 200ms ease, box-shadow 200ms ease;
}

#roomtour-btn:hover {
    transform: translate(-50%, 4px);
    box-shadow: 0.3vw 0.3vw 0 #000957;
    font-style: italic;
}

#roomtour-btn:active {
    transform: translate(-50%, 6px);
    box-shadow: 0.1vw 0.1vw 0 #000957;
}

#roomtour-btn:focus-visible {
    outline: 3px solid #000957;
    outline-offset: 4px;
}

/* Mobile Anpassungen */
@media (max-width: 768px) {
    #roomtour-btn {
        bottom: 2vh;
        padding: 0.8rem 2rem;
        font-size: 1rem;
        box-shadow: 0.8vw 0.8vw 0 #000957;
    }
    
    #roomtour-btn:hover {
        transform: translate(-50%, 4px);
        box-shadow: 0.5vw 0.5vw 0 #000957;
    }
}

@media (prefers-reduced-motion: reduce) {
    #roomtour-btn {
        transition: none;
    }
}

/* Mobile Anpassungen */
@media (max-width: 768px) {
    #roomtour-btn {
        bottom: 2vh;
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    #roomtour-btn .icon {
        font-size: 1.3rem;
    }
}

/* Reduzierte Animation für Nutzer mit prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    #roomtour-btn {
        animation: none;
    }
}

/* ==========================================================
   DESKTOP MENÜ
   ========================================================== */
@media screen and (min-width: 1025px) {
  nav ul { overflow: visible; }

  nav ul li {
    position: relative;
    transform: none !important;
    box-shadow: none;
    transition: box-shadow 200ms ease;
  }

  nav ul li:hover {
    box-shadow: 0.25vw 0.25vw 0 black;
  }

  nav ul li > a {
    position: relative;
    display: flex;                 
    align-items: center;
    justify-content: center;
    height: 100%;
    transition: transform 200ms ease;
    will-change: transform;
  }
  nav ul li:hover > a,
  nav ul li > a:focus-visible {
    transform: translateY(4px);    
  }

  nav ul li:active > a { transform: translateY(2px); }
}

@media (prefers-reduced-motion: reduce) {
  nav ul li, nav ul li > a { transition: none !important; }
}

/* ==========================================================
   MOBILES MENÜ
   ========================================================== */
.mobile-nav-btn { display: none; }

@media (max-width: 768px) {
  .mobile-nav-btn {
    position: fixed;
    right: 6vw;
    top: 3vh;
    width: 11vw;
    height: 11vw;
    padding: 0;
    background: #f9f5e7;
    border: 2px solid #000957;
    border-radius: 0;             
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1002;               
    transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
    box-shadow: 0.5vw 0.5vw 0 #000957;
  }

  .mobile-nav-btn:focus-visible { outline: 3px solid #000957; outline-offset: 3px; }

  .mobile-nav-btn .plus {
    position: relative;
    width: 20px;
    height: 20px;
    transition: transform 250ms ease;
    transform-origin: center;
    z-index: 1002;               
  }

  .mobile-nav-btn .line {
    position: absolute;
    background: #000957;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0.3vw 0.3vw 0.4vw rgba(0,0,0,0.4);
  }

  .mobile-nav-btn .horizontal { width: 26px; height: 4px; }
  .mobile-nav-btn .vertical   { width: 4px; height: 26px; }

  .mobile-nav-btn[aria-expanded="true"] .plus { transform: rotate(45deg); }

  .mobile-menu-close {
    position: absolute;
    top: 3vh;
    right: 6vw;
    width: 11vw;
    height: 11vw;
    padding: 0;
    background: #f9f5e7;
    border: 2px solid #000957;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1020;
    box-shadow: 0.5vw 0.5vw 0 #000957;
    transition: transform 200ms ease, box-shadow 200ms ease;
  }

  .mobile-menu-close:active {
    box-shadow: 0.3vw 0.3vw 0 #000957;
  }

  .mobile-menu-close .close-icon {
    font-size: 3rem;
    line-height: 1;
    color: #000957;
    font-weight: 400;
    text-shadow: 0.2vw 0.2vw 0.3vw rgba(0,0,0,0.4);
  }

  #mobileMenu {
    position: fixed;
    inset: 0; 
    background: #f9f5e7;
    border: none;
    box-shadow: none;
    z-index: 1010;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 220ms ease, transform 220ms ease;
    overflow: hidden;
    display: block;
  }

  body.menu-open #mobileMenu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  #mobileMenu .inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2rem;
  }

  #mobileMenu nav {
    display: block !important; 
    position: relative;
    background: transparent;
    border: none;
  }

  #mobileMenu nav ul {
    display: flex !important; 
    flex-direction: column;
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
    border: none;
    height: auto;
    align-items: center;
  }

  #mobileMenu nav li {
    top: 5rem;
    margin: 0;
    border: none;
    height: auto;
    display: block;
    padding: 0.5rem 1em;
    position: relative;
  }

  #mobileMenu nav li:last-child a {
    font-size: 1em;
    padding: 1rem 0rem;
  }

  #mobileMenu nav a {
    text-decoration: none;
    color: #000957;
    font-family: 'SpaceMono', serif;
    font-weight: 800;
    text-transform: uppercase;
    font-size: clamp(1rem, 6vw, 6rem);
    display: block;
    padding: 0.5rem 0rem;
  }

  #mobileMenu nav a:hover {
    font-style: italic;
  }

  #mobileMenu nav li::after {
    content: "*";
    position: absolute;
    font-family: 'SpaceMono', serif;
    left: 50%;
    transform: translateX(-50%);
    color: #000957;
    opacity: 1;
    font-size: 1rem;
  }

  #mobileMenu nav li:last-child::after {
    display: none;
  }

  #nav-placeholder nav { 
    display: none !important; 
  }
}

@media (max-width: 768px) {
  body.menu-open { 
    overflow: hidden; 
  }
}