/* tooplate-style.css (cleaned + Web3 search styles) */

/* Base */
body {
  font-family: "Open Sans", Helvetica, Arial, sans-serif;
  font-size: 19px;
  font-weight: 300;
  color: white;
  position: relative;
}

/* Style the video: 100% width and height to cover the entire window */
#bg-video {
  position: fixed;
  left: 50%;
  top: 50%;
  bottom: auto;
  right: auto;
  min-width: 100%;
  min-height: 100%;
  transform: translateX(-50%) translateY(-50%);
  z-index: -100;
  background-image: url(../img/tm-astro-bg.jpg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

h1 { font-size: 2.8rem; }

#tm-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url(../img/pop-bg.jpg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: -1;
  transition: all 0.3s ease;
}

#tm-bg:after {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#tm-wrap {
  display: flex;
  min-height: 100vh;
  align-items: stretch;   /* wichtig */
}

p {
  line-height: 1.9;
  letter-spacing: 1px;
}

.tm-main-content {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 50px 15px 0;
  position: relative;   /* WICHTIG */
}

.tm-main-content {
  padding-bottom: 20px;
}

.tm-site-header-col {
  display: flex;
  align-items: center;
}

.tm-site-header {
  margin: 10px;
  text-align: right;
  width: 100%;
}

.tm-nav ul {
  padding-left: 0;
  display: block;
}

.tm-nav li {
  list-style: none;
  display: inline-block;
  border: 1px solid white;
  float: left;
  margin: 10px;
}

.tm-nav-link {
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 165px;
  height: 165px;
  text-align: center;
  border: 1px solid white;
  cursor: pointer;
  position: relative;
}

.tm-nav-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
}

.fa-3x { font-size: 2.5em; }

.product {
  background: transparent;
  transition: all 0.3s ease;
}

.product:hover {
  background: #2c2a35;
  color: #a9a9a9;
}

.tm-nav-icon {
  display: block;
  margin-bottom: 25px;
}

/* Expanding Grid Items from Codrops */
.tm-page-title { font-weight: 300; }
.content { max-width: 370px; }
.grid { display: flex; flex-wrap: wrap; }
.grid__item { margin: 10px; }

.product {
  position: relative;
  cursor: pointer;
}

.product__bg {
  width: 100%;
  height: 100%;
  top: 0px;
}

.product__bg,
.product__description {
  opacity: 0;
  position: absolute;
}

.product__description {
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: none;
}

.tm-fa-close { font-size: 30px; }

.details {
  font-size: 1rem;
  width: 100%;
  height: 100%;
  bottom: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  pointer-events: none;
  padding: 15px;
  display: none;
}

.details > * {
  position: relative;
  opacity: 0;
}

.details--open { pointer-events: auto; }

.details__bg {
  width: 100%;
  max-width: 900px;
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
}

.details__bg--down { background: #2c2a35; }

.details__bg {
  padding: 50px;
  transform-origin: 0 0;
}

.details__close {
  position: absolute;
  top: 5px;
  right: 0;
  border: 0;
  background: none;
  margin: 1em;
  cursor: pointer;
  font-size: 0.85em;
  color: white;
  z-index: 1001;
}

/* Team */
.tm-reverse-sm { flex-direction: row; }

/* Our Work */
.tm-slider-img-link {
  padding-left: 10px;
  padding-right: 10px;
}

.slick-dots li button:before {
  font-size: 20px;
  color: white;
  opacity: 1;
}

.slick-dots {
  position: absolute;
  bottom: -40px;
  display: block;
  width: 100%;
  padding: 0;
  list-style: none;
  text-align: center;
}

.slick-dots li.slick-active button:before {
  opacity: 0.75;
  color: deepskyblue;
}

/* Contact */
.form-control {
  font-size: 1.1rem;
  border-radius: 0;
  border: none;
  background-color: #353541;
  color: white;
  padding: 0.75rem;
}

.form-control:focus {
  color: #cecece;
  background-color: #4d4c59;
  border-color: transparent;
}

.tm-col-email { padding-left: 0; }

.tm-btn-submit { background-color: #006599; }

.tm-btn-gray {
  background-color: #494752;
  color: white;
}

.tm-btn-gray:hover {
  background-color: #77757d;
  color: white;
}

.btn {
  padding: 0.5rem 2.4rem;
  font-size: 1.2rem;
  border-radius: 0;
}

.btn-primary { border-color: transparent; }

.btn-primary:hover {
  background-color: #0e7fb9;
  border-color: transparent;
}


.tm-text-highlight { color: white; }
.tm-text-highlight:hover { color: red; }


.tm-copyright-text {
  background-color: rgba(0, 0, 0, 0.6);
  display: inline-block;
  padding: 10px 30px;
}

a, button { transition: all 0.3s ease; }
a:hover, a:focus {
  text-decoration: none;
  outline: none;
}

p:last-child { margin-bottom: 0; }

/* -------------------------------------------------
   Web3 Search Bar (clean, global, not inside media)
   ------------------------------------------------- */

/* wrapper form: 22% of viewport width */
.web3-search {
  margin: 10px 0 8px;
  width: 22vw;          /* 22% der gesamten Seitenbreite */
  min-width: 300px;     /* nicht zu klein */
  max-width: 560px;     /* nicht zu breit */
  margin-left: auto;    /* passt zu text-align:right */
}

.web3-search__wrap{
  display: flex;
  align-items: stretch;
  width: 100%;
  border-radius: 999px;
  overflow: hidden;

  /* background passend zum Video */
  background: rgba(255, 165, 0, 0.14); /* minimal orange */
  border: 1px solid rgba(255, 165, 0, 0.22);

  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  box-shadow: 0 0 0 1px rgba(255,255,255,.05) inset;
}

.web3-search__input{
  flex: 1;
  padding: 12px 14px 12px 16px;
  border: 0;
  outline: none;
  background: transparent;

  color: rgba(111, 242, 232, 0.85);
  font-size: 18px;
  letter-spacing: .2px;
}

.web3-search__input::placeholder{
  color: rgba(111, 242, 232, 0.85);
}

.web3-search__btn{
  width: 54px;
  border: 0;
  cursor: pointer;

  color: #07192b;
  background: rgba(255, 165, 0, 0.20);

  transition: transform .08s ease, background .18s ease;
}

.web3-search__btn:hover{ background: rgba(255, 165, 0, 0.28); }
.web3-search__btn:active{ transform: scale(.98); }

.web3-search__wrap:focus-within{
  border-color: rgba(255, 165, 0, 0.55);
  box-shadow:
    0 0 0 1px rgba(255, 165, 0, 0.20) inset,
    0 0 18px rgba(255, 165, 0, 0.18);
}

/* Optional: invalid state (JS can toggle .is-invalid on input) */
.web3-search__input.is-invalid{
  box-shadow: 0 0 0 2px rgba(255, 80, 80, 0.35) inset;
}

/* sr-only helper (Bootstrap has this, but keep it safe) */
.sr-only{
  position:absolute;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  border:0;
}

footer {
  margin-top: auto;     /* DER Schlüssel */
  padding: 30px 0 20px;
  text-align: center;
}


/* ----------------------------------
   Responsive
   ---------------------------------- */

@media (min-width: 900px) {
  .container { max-width: 900px; }
}

@media (min-width: 767px) and (max-width: 991px), (max-width: 440px) {
  .tm-nav-link { width: 145px; height: 145px; }
}

@media (max-width: 767px) {
  .container { max-width: 450px; }
  .content { margin-left: auto; margin-right: 0; }
  .tm-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .grid { justify-content: flex-end; }
  .tm-col-email { padding-left: 15px; }
  .tm-reverse-sm { flex-direction: column-reverse; }

  /* Search bar on mobile: full width */
  .web3-search{
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
}

@media (min-height: 760px) {
  #tm-wrap {
    align-items: center;
  }
}

@media (max-width: 544px) {
  .tm-main-content { flex-direction: column; }
  .details__bg { padding: 55px 40px; }
  .slick-dots li button:before { font-size: 15px; }
}

@media (max-width: 419px) {
  .tm-nav-link { width: 120px; height: 120px; }
  .fa-3x { font-size: 2.2em; }
}

/* ================================
   LAYOUT RESET (Footer + Centering)
   ================================ */

/* 1) Wrap darf NICHT vertikal zentrieren, sonst floatet alles */
#tm-wrap{
  display: block !important;
  min-height: 100vh !important;
}

/* 2) Main ist normaler Dokumentfluss + hat unten Platz */
.tm-main-content{
  position: relative !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;

  min-height: 100vh !important;
  overflow: visible !important;

  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  padding: 50px 15px 30px !important;
}

/* 3) Inhalt (dein Container) bekommt wieder Landing-Zentrierung */
.tm-site-header-container{
  flex: 1 0 auto !important;
  display: flex !important;
  align-items: center !important;     /* Landing look */
  min-height: calc(100vh - 120px) !important;
}

/* 4) Footer ist Teil des Flows und kommt ans Ende */
footer{
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;

  margin-top: auto !important;        /* drückt nach unten */
  padding: 20px 0 10px !important;
  text-align: center !important;
}

/* 5) Wenn Höhe klein ist: KEIN Zentrieren, sondern oben starten */
@media (max-height: 760px){
  .tm-site-header-container{
    align-items: flex-start !important;
    min-height: auto !important;
  }
  .tm-main-content{
    padding-top: 30px !important;
  }
}
/* ================================
   FIX: Expanding "details" overlay
   (must sit above footer + centered)
   ================================ */

/* Das Overlay muss aus dem Flow raus */
.details{
  position: fixed !important;
  inset: 0 !important;              /* top/right/bottom/left = 0 */
  z-index: 5000 !important;         /* über footer + grid */
  pointer-events: none;             /* wie im Template gedacht */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* wenn offen -> klickbar */
.details--open{
  pointer-events: auto !important;
}

/* Hintergrund/Box muss scrollen dürfen, wenn Content groß */
.details__bg{
  max-height: calc(100vh - 120px) !important;
  overflow: auto !important;
}

/* Close-Button immer sichtbar */
.details__close{
  position: absolute !important;
  z-index: 5100 !important;
}
