/* ==============================================
   ClariAssist  Gemeinsame Styles (Navbar & Footer)
   Einbinden: <link rel="stylesheet" href="/frontend/css/style.css">
   ============================================== */

/* 
   NAVBAR  Premium Version
    */

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(6, 12, 26, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/*  Logo  */
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  padding: 4px;
  border-radius: 40px;
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.1);
  transition: all 0.3s ease;
}

.logo:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
  transform: translateY(-1px);
}

.logo-img {
  height: 44px;
  width: auto;
  display: block;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 4px 8px rgba(59, 130, 246, 0.2));
}

.logo:hover .logo-img {
  transform: scale(1.05) rotate(-2deg);
}

/*  Nav Content Container  */
.nav-content {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 12px;
  margin-left: 24px;
}

/*  Hauptlinks  */
.menu {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.menu a {
  padding: 8px 18px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  border-radius: 40px;
  transition: all 0.25s ease;
  white-space: nowrap;
  position: relative;
  letter-spacing: 0.3px;
}

.menu a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 20px;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 4px;
  transition: transform 0.25s ease;
  opacity: 0;
}

.menu a:hover {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.1);
}

.menu a:hover::before {
  transform: translateX(-50%) scaleX(1);
  opacity: 1;
}

.menu a.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.15));
  border: 1px solid rgba(59, 130, 246, 0.2);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.menu a.active::before {
  transform: translateX(-50%) scaleX(1);
  opacity: 1;
  width: 30px;
  height: 3px;
}

/*  Auth Buttons  */
.nav-auth {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  margin-left: auto;
}

.nav-btn {
  padding: 10px 24px;
  border-radius: 40px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: none;
}

.nav-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.nav-btn:hover::before {
  width: 300px;
  height: 300px;
}

.nav-btn-ghost {
  color: #94a3b8;
  border: 1px solid rgba(59, 130, 246, 0.2);
  background: rgba(59, 130, 246, 0.03);
}

.nav-btn-ghost:hover {
  color: #ffffff;
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.15);
}

.nav-btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.nav-btn-primary:hover {
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.5);
  transform: translateY(-2px);
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.nav-btn-outline {
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.05);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.nav-btn-outline:hover {
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.2);
}

/*  Eingeloggter Zustand  */
.nav-auth--user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-user-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 500;
}

.nav-user-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  background: transparent;
  transition: color 0.2s, opacity 0.2s;
}

.nav-logout-btn:hover { opacity: 0.75; }

/*  Mobile Footer Links (nur mobil)  */
.nav-mobile-footer {
  display: none;
}

/*  Hamburger  */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 40px;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.nav-hamburger:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.4);
  transform: scale(1.05);
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: linear-gradient(90deg, #94a3b8, #60a5fa);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.nav-hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
  background: linear-gradient(90deg, #60a5fa, #3b82f6);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.nav-hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
  background: linear-gradient(90deg, #60a5fa, #3b82f6);
}


/* 
   FOOTER
    */

footer {
  position: relative;
  text-align: center;
  padding: 48px 32px 32px;
  color: #94a3b8;
  border-top: 1px solid rgba(59, 130, 246, 0.15);
  background: rgba(6, 12, 26, 0.8);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  font-size: 14px;
  margin-top: auto;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
}

footer::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40px;
  background: radial-gradient(ellipse at 50% 100%, rgba(59, 130, 246, 0.1), transparent 70%);
  pointer-events: none;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin: 24px 0 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: all 0.25s ease;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 40px;
  position: relative;
}

.footer-links a:hover {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.1);
}

.footer-copyright {
  font-size: 13px;
  color: #64748b;
  letter-spacing: 0.3px;
  padding-top: 16px;
  border-top: 1px solid rgba(59, 130, 246, 0.1);
  display: inline-block;
  padding-left: 24px;
  padding-right: 24px;
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px 16px;
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 40px;
  font-size: 12px;
  color: #60a5fa;
}

.footer-badge span {
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 10px #22c55e;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}


/* 
   RESPONSIVE
    */

/* Tablet (bis 1100px) */
@media (max-width: 1100px) {
  .nav-inner { padding: 0 24px; }
  .menu { gap: 4px; }
  .menu a { padding: 8px 14px; font-size: 14px; }
  .nav-auth { gap: 10px; }
  .nav-btn { padding: 8px 20px; font-size: 13px; }
}

/* 
   MOBILE MEN  komplett berarbeitet
    */
@media (max-width: 860px) {

  .nav-inner {
    padding: 0 20px;
    height: 64px;
  }

  .logo { padding: 4px; }
  .logo-img { height: 38px; }

  /* Hamburger anzeigen */
  .nav-hamburger { display: flex; }

  /*  Fullscreen Overlay  */
  .nav-content {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100dvh - 64px); /* dynamic viewport height  kein Chrome-Adressbar-Problem */
    
    background: rgba(4, 9, 20, 0.97);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    
    flex-direction: column;
    align-items: center;          /* zentriert horizontal */
    justify-content: flex-start;
    padding: 40px 24px 40px;
    gap: 0;
    margin-left: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    border-top: 1px solid rgba(59, 130, 246, 0.12);

    /* Versteckt */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  }

  .nav-content.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  /*  Hauptlinks: gro, vertikal, zentriert  */
  .menu {
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: unset;
    width: 100%;
    max-width: 320px;
    margin-bottom: 0;
  }

  .menu a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 28px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 16px;
    text-align: center;
    color: #94a3b8;
    background: rgba(59, 130, 246, 0.04);
    border: 1px solid rgba(59, 130, 246, 0.08);
    transition: all 0.2s ease;
    letter-spacing: 0.2px;
  }

  .menu a:hover,
  .menu a.active {
    color: #ffffff;
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.25);
    transform: none;
  }

  .menu a::before { display: none; } /* Uäline-Effekt aus auf Mobile */

  /*  Trennlinie zwischen Menu und Auth  */
  .nav-auth {
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 320px;
    margin-left: 0;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(59, 130, 246, 0.12);
    gap: 10px;
  }

  .nav-btn {
    width: 100%;
    padding: 15px 28px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    justify-content: center;
    border-radius: 14px;
    max-width: 320px;
  }

  /* Logout-Button auf Mobile */
  .nav-logout-btn {
    width: 100%;
    max-width: 320px;
    justify-content: center;
    padding: 15px 28px;
    border-radius: 14px;
    font-size: 16px;
  }

  /*  Eingeloggter User auf Mobile  */
  .nav-auth--user {
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 320px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(59, 130, 246, 0.12);
    gap: 10px;
    margin-left: 0;
  }

  .nav-user-name { max-width: 200px; }

  /*  Mobile Footer Links  */
  .nav-mobile-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(59, 130, 246, 0.08);
    width: 100%;
    max-width: 320px;
  }

  .nav-mobile-footer a {
    color: #475569;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 6px 14px;
    border-radius: 40px;
  }

  .nav-mobile-footer a:hover {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.08);
  }

  /* Footer Mobile */
  footer { padding: 40px 24px 28px; }
  .footer-links { gap: 20px; row-gap: 12px; }
  .footer-links a { font-size: 13px; padding: 4px 10px; }
}

/* Smartphone (bis 640px) */
@media (max-width: 640px) {
  .nav-inner {
    padding: 0 16px;
    height: 60px;
  }

  .logo-img { height: 34px; }
  .nav-hamburger { width: 42px; height: 42px; }
  .nav-hamburger span { width: 20px; }

  .nav-content {
    top: 60px;
    height: calc(100dvh - 60px);
    padding: 32px 20px 32px;
  }

  .menu a {
    padding: 14px 24px;
    font-size: 17px;
  }

  .nav-btn {
    padding: 14px 24px;
    font-size: 15px;
  }

  .footer-links {
    gap: 16px;
    flex-direction: column;
    align-items: center;
  }

  .footer-links a { font-size: 13px; padding: 8px 16px; }
  .footer-copyright { font-size: 12px; padding-left: 16px; padding-right: 16px; }
  .nav-mobile-footer { flex-direction: column; gap: 8px; align-items: center; }
  .nav-mobile-footer a { font-size: 12px; padding: 6px 12px; }
}

/* Sehr kleine Smartphones (bis 480px) */
@media (max-width: 480px) {
  .nav-inner {
    padding: 0 12px;
    height: 56px;
  }

  .logo-img { height: 30px; }
  .nav-hamburger { width: 38px; height: 38px; }
  .nav-hamburger span { width: 18px; }

  .nav-content {
    top: 56px;
    height: calc(100dvh - 56px);
    padding: 28px 16px 28px;
  }

  .menu a { padding: 13px 20px; font-size: 16px; }
  .nav-btn { padding: 13px 20px; font-size: 14px; }

  .footer-badge { font-size: 11px; padding: 4px 12px; }
  .footer-links { gap: 12px; }
  .footer-links a { font-size: 12px; padding: 6px 12px; }
  .footer-copyright { font-size: 11px; }
}
