/* =========================================================
   AVALION – main.css (clean, responsive, no duplicates)
   - 3-geteilter Header + Navbar (vh + clamp)
   - Kein Overlap
   - Main startet immer unter Header+Navbar
   - Footer bleibt am Ende (sticky footer)
   - Module: Dropdown, Landing, Index Cards, Bewerbung, Regeln, Map, Lore
========================================================= */

/* -------------------------
   CSS Variables
------------------------- */
:root{
  --gold: #c89a3a;
  --gold-soft: #9b7a2a;

  --text: #f4eddc;
  --text-muted: #b2a683;

  --bg: #050608;

  /* Top layout (percent-based) */
  --top-area: 25vh;          /* Header+Nav Gesamt (prozentual) */
  --header-share: 0.9;       /* Anteil Header */
  --nav-share: 0.1;          /* Anteil Nav */

  --header-h: calc(var(--top-area) * var(--header-share));
  --nav-h: calc(var(--top-area) * var(--nav-share));

  /* Sicherheitsgrenzen */
  --header-min: 120px;
  --header-max: 150px;
  --nav-min: 30px;
  --nav-max: 76px;

  /* Content width */
  --container: 1100px;
  --pad-x: 18px;

  /* Visuals */
  --card-radius: 16px;
  --panel-bg: rgba(10,10,10,0.70);
  --panel-bg-2: rgba(5,5,5,0.55);
  --panel-shadow: 0 18px 40px rgba(0,0,0,0.85);
}

/* -------------------------
   Base / Reset
------------------------- */
*{ box-sizing: border-box; }
html, body{ height: 100%; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: "Roboto", sans-serif;
  color: var(--text);
  background: var(--bg);
}

/* Sticky-footer page layout */
body.app,
body.landing{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Utility container */
.container{
  width: min(var(--container), 92vw);
  margin: 0 auto;
}

/* -------------------------
   Background for inner pages
------------------------- */
body.app{
  background:
    radial-gradient(circle at center, rgba(0,0,0,0.20), rgba(0,0,0,0.75)),
    url("/images/bg-sword.jpg") center top / cover no-repeat,
    var(--bg);
}

/* =========================================================
   3-GETEILTER HEADER + NAVBAR (NO OVERLAP)
========================================================= */

/* wrapper */
.tri-header{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 2000;
}

/* Header row: 3 columns (leer | logo | serverinfo) */
.tri-header__row{
  height: clamp(var(--header-min), var(--header-h), var(--header-max));
  display: flex;
  justify-content: space-between;
  grid-template-columns: 1fr 1fr 1fr;

  background: rgba(5,5,5,0.45);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(200,154,58,0.35);
}

/* areas */
.tri-header__left{ 
  justify-self: start; 
  width: 33%;
  position: relative;
}

.tri-header__center{
  display: flex;
  justify-content: center;
  justify-self: center;
  align-items: center;
  height: 100%;
  width: 33%;
}
.tri-header__right{
  height: 100%;
  width: 33%;
}

.tri-header__right-top{
  display: flex;
  height: 50%;
  width: 100%;
  justify-content: flex-end;
  padding: 5px;
}

.tri-header__right-bottom{
  display: flex;
  height: 50%;
  width: 100%;
  bottom: 0;
  justify-content: flex-end;
  padding: 5px;
}

/* logo */
.tri-header__logo{
  height: 400%;
  width: auto;
  transform: translateY(0);
  transition: height .25s ease, transform .25s ease;
  margin-top: 5rem;
}

/* server info */
.server-info-box{
  padding: 0.45rem 1.1rem;
  border-radius: 10px;
  border: 2px solid rgba(200,154,58,0.50);
  background: rgba(20,20,20,0.65);
  max-width: fit-content;
  align-self: end;
  margin: 5px;

  font-family: "Cinzel", serif;
  color: var(--gold);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.server-info-box span{ color: var(--text); }

/* Link Tree Header rechts */
.header-linktree-social{
  width: 50px;
  height: 50px;
  padding: 0px;
  border-radius: 12px;
  /* border: 1px solid rgba(200,154,58,.45); */
  /* background: rgba(10,10,10,.5); */
  /* backdrop-filter: blur(4px); */
  transition: .25s;
  display:inline-flex;
  justify-content:center;
  text-decoration:none;  
  right: 10px;   
  z-index: 999;  
  align-items: center;
  position: relative;
}

.header-linktree-social img{
  width:100%;
  height:100%;
  object-fit:contain;
  pointer-events:none;
}

.header-linktree-social .tooltip{
  position:absolute;
  top: calc(50% + 20px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);

  opacity: 0;
  visibility: hidden;

  background: rgba(10,10,10,.9);
  border: 1px solid rgba(200,154,58,.55);
  padding: .35rem .6rem;
  border-radius: 6px;

  font-family: "Cinzel", serif;
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);

  pointer-events:none;
  transition: .15s;
  white-space: nowrap;
}

.header-linktree-social:hover .tooltip{
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Nav row */
.tri-nav{
  height: clamp(var(--nav-min), var(--nav-h), var(--nav-max));
  display: flex;
  align-items: center;

  background: rgba(10,10,10,0.45);
  backdrop-filter: blur(4px);
  border-bottom: 2px solid var(--gold);
}

#discord {
  margin-top: 1px;
}

.tri-nav__inner{
  width: min(var(--container), 92vw);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Nav list */
.nav-list{
  display: flex;
  gap: 3rem;
  align-items: center;
  justify-content: center;
  text-align: center;

  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item{ position: relative; }

/* Links */
.nav-link{
  position: relative;
  display: inline-block;
  min-width: 10rem;

  font-family: "Cinzel", serif;
  text-transform: uppercase;
  letter-spacing: 0.06rem;
  font-size: 0.9rem;

  color: var(--text-muted);
  text-decoration: none;
  background: transparent;
  border: 0;
  cursor: pointer;

  padding: 0.15rem 0;
}

.nav-link::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;

  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.18s ease;
  opacity: 0.9;
}

.nav-link:hover{
  color: var(--gold);
  text-shadow: 0 0 10px rgba(200,154,58,0.35);
}
.nav-link:hover::after{ transform: scaleX(1); }

/* -------------------------
   Dropdown (content-width, stable hover)
------------------------- */
.dropdown{
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  padding-top: 10px;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: opacity .15s ease, visibility .15s ease, transform .15s ease;
  z-index: 5000;
}

/* Hover-Bridge */
.nav-item.has-dropdown::after{
  content:"";
  position:absolute;
  left:-20px;
  right:-20px;
  top:100%;
  height:14px;
}

.nav-item:hover .dropdown,
.nav-item.open .dropdown{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dropdown-panel{
  display: inline-flex;
  flex-direction: column;
  padding: 10px 16px;

  background: rgba(10,10,10,0.82);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(200,154,58,0.22);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.85);
}

.dropdown-link{
  position: relative;
  display: block;
  padding: 8px 0;

  text-decoration: none;
  color: rgba(244,237,220,0.92);
  font-size: 0.9rem;
  font-family: "Roboto", sans-serif;
  white-space: nowrap;
}

.dropdown-link + .dropdown-link{ margin-top: 6px; }

.dropdown-link::after{
  content:"";
  position:absolute;
  left:0;
  bottom:2px;
  width:100%;
  height:2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin:left;
  transition: transform .18s ease;
  opacity:.9;
}

.dropdown-link:hover{
  color: var(--gold);
  text-shadow: 0 0 10px rgba(200,154,58,0.25);
}
.dropdown-link:hover::after{ transform: scaleX(1); }

/* -------------------------
   Main (always below header+nav)
------------------------- */
main{
  flex: 1 0 auto; /* sticky footer */
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);

  padding-top: calc(
    clamp(var(--header-min), var(--header-h), var(--header-max)) +
    clamp(var(--nav-min), var(--nav-h), var(--nav-max)) +
    18px
  );
}

/* -------------------------
   Footer (always at end)
------------------------- */
.site-footer{
  flex-shrink: 0;
  border-top: 1px solid rgba(200,154,58,0.25);
  background: rgba(5,5,5,0.45);
  backdrop-filter: blur(6px);
}

.footer-inner{
  width: min(var(--container), 92vw);
  margin: 0 auto;
  padding: 1rem var(--pad-x);

  display: flex;
  gap: 0.8rem;
  justify-content: center;
  align-items: center;

  color: rgba(244,237,220,0.70);
  font-size: 0.9rem;
}

.footer-inner a{
  color: rgba(244,237,220,0.70);
  text-decoration: none;
}
.footer-inner a:hover{
  color: var(--gold);
  text-decoration: underline;
}

/* =========================================================
   LANDING
========================================================= */
body.landing{
  overflow: hidden;
  cursor: pointer;
  background: var(--bg);
}

.landing .bg-video{
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  object-position: center;
  z-index: -2;

  opacity: 0;
  transition: opacity 1s ease-in-out;
  pointer-events: none;
}

.landing .bg-video.is-visible{
  opacity: 1;
}

.landing .video-overlay{
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(0,0,0,.55), rgba(0,0,0,.25)),
    linear-gradient(to bottom, rgba(0,0,0,.15), rgba(0,0,0,.25));
  z-index: -1;
}

.landing .center{
  height: 100vh;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;
  padding: 2rem;
}

.landing .logo{
  width: min(520px, 85vw);
  filter: drop-shadow(0 0 30px rgba(0,0,0,.9));
  margin-bottom: 2rem;
}

.landing .status{
  font-family: "Cinzel", serif;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 0 10px rgba(0,0,0,.9);
}

.landing .socials{
  margin-top: 2.2rem;
  display:flex;
  gap: 1.4rem;
}

.landing .social{
  position: relative;
  width: 52px;
  height: 52px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(200,154,58,.45);
  background: rgba(10,10,10,.5);
  backdrop-filter: blur(4px);
  transition: .25s;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
}

.landing .social:hover{
  transform: translateY(-3px);
  box-shadow: 0 0 18px rgba(200,154,58,.7);
  border-color: var(--gold);
}

.landing .social img{
  width:100%;
  height:100%;
  object-fit:contain;
  pointer-events:none;
}

.landing .tooltip{
  position:absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);

  opacity: 0;
  visibility: hidden;

  background: rgba(10,10,10,.9);
  border: 1px solid rgba(200,154,58,.55);
  padding: .35rem .6rem;
  border-radius: 6px;

  font-family: "Cinzel", serif;
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);

  pointer-events:none;
  transition: .15s;
  white-space: nowrap;
}

.landing .social:hover .tooltip{
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* =========================================================
   INDEX / CARDS
========================================================= */
.home-wrap{
  width: min(var(--container), 92vw);
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.home-head{ margin-bottom: 18px; }

.home-title{
  margin: 0 0 6px 0;
  font-family: "Cinzel", serif;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--gold);
  font-size: 1.15rem;
}

.home-subtitle{
  margin: 0;
  color: rgba(244,237,220,0.75);
  font-size: 0.95rem;
}

.home-grid{
  display: grid;
  gap: 18px;
}

.home-foot{
  margin-top: 16px;
  display:flex;
  justify-content:flex-end;
}

/* Card base */
.av-card{
  position: relative;
  border-radius: var(--card-radius);
  border: 2px solid rgba(200,154,58,0.45);
  background: var(--panel-bg);
  backdrop-filter: blur(10px);
  box-shadow: var(--panel-shadow);
  overflow: hidden;
}

/* Optional shine sweep */
.av-card--shine::after{
  content:"";
  position:absolute;
  top:-30%;
  left:-60%;
  width:40%;
  height:160%;
  pointer-events:none;

  background: linear-gradient(
    90deg,
    rgba(255,215,120,0.0),
    rgba(255,235,170,0.55),
    rgba(255,215,120,0.0)
  );

  transform: rotate(20deg);
  filter: blur(2px);
  opacity: 0.9;

  animation: av-shine-sweep 3.8s linear infinite;
}
@keyframes av-shine-sweep{
  0%   { left:-60%; }
  100% { left:140%; }
}

.av-card__content{ padding: 18px; }

.av-card__media{
  display: grid;
  place-items: center;
  padding: 18px;
}

.av-card__img{
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

.av-meta{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 12px;
}

.av-tag{
  font-family:"Cinzel", serif;
  text-transform: uppercase;
  letter-spacing:.10em;
  font-size: .72rem;
  color: var(--gold);
}

.av-date{
  font-size: .82rem;
  color: rgba(244,237,220,0.55);
}

.av-card__title{
  margin: 10px 0 10px;
  font-family:"Cinzel", serif;
  text-transform: uppercase;
  letter-spacing:.10em;
  color: rgba(244,237,220,0.92);
  font-size: 1rem;
}

.av-card__subtitle{
  margin: 0 0 8px;
  font-family:"Cinzel", serif;
  text-transform: uppercase;
  letter-spacing:.10em;
  color: rgba(244,237,220,0.85);
  font-size: .85rem;
}

.av-card__text{
  margin: 0 0 10px;
  color: rgba(244,237,220,0.78);
  line-height: 1.6;
  font-size: .95rem;
}

.av-link{
  display:inline-block;
  margin-top: 4px;
  font-family:"Cinzel", serif;
  text-transform: uppercase;
  letter-spacing:.08em;
  font-size: .85rem;
  color: var(--gold);
  text-decoration:none;
  position: relative;
  padding: .2rem 0;
}

.av-link::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-4px;
  width:100%;
  height:2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin:left;
  transition: transform .2s ease;
  opacity: .9;
}
.av-link:hover{ text-shadow: 0 0 10px rgba(200,154,58,0.35); }
.av-link:hover::after{ transform: scaleX(1); }

.av-list{
  margin: 0;
  padding-left: 18px;
  color: rgba(244,237,220,0.78);
  line-height: 1.6;
  font-size: .95rem;
}

/* Layout templates */
.av-card--lr{
  display:grid;
  grid-template-columns: 1fr 1.4fr;
}

.av-card--tbt{
  display:grid;
  grid-template-columns: 1.2fr 0.6fr 1.2fr;
  align-items: stretch;
}
.av-card--tbt .av-card__media .av-card__img{
  width: 90px;
  height: 90px;
  object-fit: contain;
  border-radius: 0;
}

.av-card--tr{
  display:grid;
  grid-template-columns: 1.6fr 0.9fr;
}
.av-card--tr .av-card__img{
  height: 240px;
  object-fit: contain;
  background: rgba(0,0,0,0.25);
}

/* Video embeds */
.av-video{
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(200,154,58,0.25);
  box-shadow: 0 12px 28px rgba(0,0,0,0.65);
}
.av-video--16x9{ aspect-ratio: 16 / 9; }
.av-video--9x16{ aspect-ratio: 9 / 16; }
.av-video--1x1 { aspect-ratio: 1 / 1; }
.av-video iframe{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* =========================================================
   Bewerbung
========================================================= */
.apply-wrap{
  width: min(var(--container), 92vw);
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.apply-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.apply-card{
  border-radius: var(--card-radius);
  border: 2px solid rgba(200,154,58,0.45);
  background: var(--panel-bg);
  backdrop-filter: blur(10px);
  box-shadow: var(--panel-shadow);
  overflow: hidden;
  min-height: 360px;
}

.apply-image{ display:grid; place-items:center; }
.apply-image-img{ width: 100%; height: 100%; object-fit: cover; display:block; }
.apply-text{ padding: 26px; }

.apply-title{
  font-family:"Cinzel", serif;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--gold);
  margin: 0 0 14px;
  font-size: 1.1rem;
}

.apply-paragraph{
  margin: 0 0 12px;
  color: rgba(244,237,220,0.80);
  line-height: 1.6;
  font-size: 0.95rem;
}

.apply-button{
  padding: 0.45rem 1.1rem;
  border-radius: 10px;
  border: 2px solid rgba(200,154,58,0.50);
  background: rgba(20,20,20,0.65);
  max-width: fit-content;
  align-self: end;
  margin: 5px; 	
  
  font-family: "Cinzel", serif;
  color: var(--gold);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
  text-decoration: none;
}

.apply-button a:visited{
  color: var(--gold);
  text-decoration: none;
}

.apply-button a:link{
  color: var(--gold);
  text-decoration: none;
}

/* =========================================================
   Regeln
========================================================= */
.rules-page{
  width: min(var(--container), 92vw);
  margin: 0 auto;
  padding: 15rem 0 3rem;
}

.rules-title-box{
  padding: 10px 18px;
  border: 1px solid rgba(200,154,58,0.45);
  border-radius: 14px;
  background: rgba(10,10,10,0.55);
  backdrop-filter: blur(6px);
}
.rules-title-box h1{
  margin: 0;
  font-family:"Cinzel", serif;
  font-size: 1.05rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
}

.rules-container{
  padding: 18px;
  border: 1px solid rgba(200,154,58,0.35);
  border-radius: 16px;
  background: rgba(5,5,5,0.45);
  backdrop-filter: blur(6px);
  display:flex;
  flex-direction:column;
  gap: 14px;
}

.rule-item{
  padding: 14px 16px;
  border: 1px solid rgba(200,154,58,0.25);
  border-radius: 12px;
  background: rgba(10,10,10,0.55);
}

.rule-item h2{
  margin: 0 0 6px;
  font-family:"Cinzel", serif;
  font-size: 0.95rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
}
.rule-item p{
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(244,237,220,0.9);
}

/* =========================================================
   Map
========================================================= */
.map-embed-wrap{
  width: min(1400px, 92vw);
  margin: 0 auto;
  padding: 3rem 0 2rem;
}

.map-embed-frame{
  position: relative;
  width: min(1400px, 100%);
  margin: 0 auto;
  height: calc(100vh - 200px);
  min-height: 560px;

  overflow: hidden;
  border: 2px solid rgba(200,154,58,0.9);
  border-radius: 16px;
  background: #000;
  box-shadow: 0 14px 35px rgba(0,0,0,0.85);
}

.map-embed-frame iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* =========================================================
   Lore
========================================================= */
.lore-wrap{
  width: min(1400px, 92vw);
  margin: 0 auto;
  padding: 2rem 0 2.5rem;
}

.lore-head a:visited{
  color: var(--gold);
  text-decoration: none;
}

.lore-head a:link{
  color: var(--gold);
  text-decoration: none;
}

.lore-head{
  padding: 0.45rem 1.1rem;
  border-radius: 10px;
  border: 2px solid rgba(200,154,58,0.50);
  background: rgba(20,20,20,0.65);
  max-width: fit-content;
  align-self: end;
  margin: 5px; 	
  
  font-family: "Cinzel", serif;
  color: var(--gold);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
  text-decoration: none;
}

.lore-frame{
  position: relative;
  width: 95%;
  height: calc(100vh - 220px);
  min-height: 600px;
  overflow: hidden;

  border: 2px solid rgba(200,154,58,0.9);
  border-radius: 16px;
  background: #000;
  box-shadow: 0 14px 35px rgba(0,0,0,0.85);
}

.lore-frame iframe{
  position: absolute;
  top: -260px;
  left: 50%;
  transform: translateX(-50%) scale(1.15);
  width: 1400px;
  height: 1800px;
  border: 0;
}

.dropdown-toggle {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.nav-burger {
  display: none;
}

@media (max-width: 900px) {
  .nav-burger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 14px;
  }

  .nav-burger span {
    width: 24px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
  }
}


/* =========================================================
   Responsive
========================================================= */
@media (max-width: 900px){
  .nav-list{ gap: 1.8rem; }

  .av-card--lr,
  .av-card--tbt,
  .av-card--tr{
    grid-template-columns: 1fr;
  }

  .av-card__img{ height: 220px; }
  .apply-grid{ grid-template-columns: 1fr; }
  .apply-card{ min-height: 300px; }
}

@media (max-width: 700px){
  /* Serverinfo verschwindet auf Mobile */
  .tri-header__right{ display: none; }

  .nav-list{
    gap: 1.1rem;
    flex-wrap: wrap;
  }

  .rules-title-box h1{ font-size: 1rem; }
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce){
  .av-card--shine::after{
    animation: none;
  }
}

/* Tablets + Mobile: Serverinfo ausblenden */
@media (max-width: 1024px){
  .tri-header__right{
    display: none !important;
  }
}

@media (max-width: 1024px){
  .tri-header__logo{
  height: 200%;
  width: auto;
  transform: translateY(0);
  transition: height .25s ease, transform .25s ease;
  margin-top: 12.5%;	
  }
}

@media (max-width: 700px){
  .tri-header__logo{
  height: 250%;
  width: auto;
  transform: translateY(0);
  transition: height .25s ease, transform .25s ease;
  margin-top: 13%;	
  }
}

@media (max-width: 400px){
  .tri-header__logo{
  height: 250%;
  width: auto;
  transform: translateY(0);
  transition: height .25s ease, transform .25s ease;
  margin-top: 13%;		
  }
}

@media (max-width: 1024px){
  .nav-link{
  min-width: 0;
  justify-content: unset;
  }
}

@media (max-width: 1024px){
  .tri-header__row{
  justify-content: unset;
  }
}

/* =========================================================
   MOBILE BURGER NAV PANEL
   - Default: unsichtbar
   - Open: Panel wie im Mockup
========================================================= */

@media (max-width: 900px) {
  /* Nav-Leiste selbst soll im "closed" Zustand nichts zeigen */
  .tri-nav {
    position: fixed;
    left: 0;
    right: 0;
    top: clamp(var(--header-min), var(--header-h), var(--header-max));
    z-index: 3000;

    /* wichtig: keine feste Höhe/kein sichtbarer Balken */
    height: auto;
    background: transparent;
    border-bottom: 0;

    pointer-events: none; /* solange geschlossen: keine Klicks */
  }

  /* Inner darf normal sein */
  .tri-nav__inner {
    width: 100%;
    padding: 0;
    display: block;
  }

  /* === DAS ist der eigentliche Trick: nav-list ist zu === */
  .nav-list {
    width: min(320px, 92vw);
    margin: 0 auto;

    /* closed state */
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0;

    /* Panel-Optik (wird beim Öffnen sichtbar) */
    background: rgba(10, 10, 10, 0.92);
    border: 2px solid rgba(200,154,58,0.55);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.75);

    /* statt horizontal: vertikal */
    display: flex;
    flex-direction: column;
    gap: 0;

    transition: max-height .25s ease, opacity .2s ease, padding .2s ease;
  }

  /* wenn offen: Panel aufklappen */
  .tri-nav.is-open {
    pointer-events: auto;
  }

  .tri-nav.is-open .nav-list {
    max-height: 70vh;      /* genug Platz fürs Menü */
    opacity: 1;
    padding: 14px 0;
    margin-top: 10px;      /* Abstand unter Header */
  }

  /* Links im Panel */
  .nav-link {
    width: 100%;
    display: block;
    text-align: left;

    padding: 14px 18px;
    min-width: unset;
    font-size: 1.05rem;
  }

  /* Trennlinien zwischen Items */
  .nav-list > li + li {
    border-top: 1px solid rgba(200,154,58,0.15);
  }
}

@media (max-width: 900px) {
  /* Burger muss über dem Logo liegen */
  .tri-header__left{
    position: relative;
    z-index: 5000;
  }

  .nav-burger{
    position: relative;
    z-index: 6000;
    pointer-events: auto;
  }

  /* Sehr wichtig: Logo soll keine Klicks "schlucken" */
  .tri-header__logo{
    pointer-events: none;
  }
}

/* ========== Mobile Dropdown als Overlay (zentriert, kein Shift) ========== */

@media (max-width: 900px) {

  /* Referenz für absolute Position */
  .nav-item.has-dropdown{
    position: relative;
  }

  /* Damit Overlay nicht abgeschnitten wird */
  .tri-nav.is-open .nav-list{
    overflow: visible;
  }

  .dropdown{
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    margin-top: 10px;

    width: min(280px, 86vw);
    display: none;
    z-index: 9999;
  }

  .nav-item.open .dropdown{
    display: block;
  }

  .dropdown-panel{
    width: 100%;
    border-radius: 12px;
  }
}
