/* ============================================
                Font
============================================ */

@font-face {
  font-family: mainFont;
  src: url(../fonts/Open_Sans/static/OpenSans-Medium.ttf);
}

/* ============================================
                Global
============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: mainFont;
}

html {
  font-size: 62.5%;
}

/* ============================================
                Header
============================================ */

header {
  background-color: black;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5% 0 5%;
  height: 5vh;
  padding-top: 10px;
}

header div a img {
  height: 32px;
  width: 32px;
}

header span {
  background-image: url(/assets/img/menu.png);
  background-position: center;
  height: 50px;
  width: 50px;
  background-repeat: no-repeat;
  cursor: pointer;
}

/* =================================
                Sidebar
===================================*/

.sidenav {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.98);
  overflow-x: hidden;
  transition: 0.5s;
  padding-top: 60px;
}

.sidenav a {
  padding: 8px 8px 8px 32px;
  text-decoration: none;
  font-size: 25px;
  color: #818181;
  display: block;
  transition: 0.3s;
}

.sidenav a:hover {
  color: #f1f1f1;
}

.sidenav .closebtn {
  position: absolute;
  top: 0;
  right: 25px;
  font-size: 36px;
  margin-left: 50px;
}

#main {
  transition: margin-left 0.5s;
  padding: 20px 0 0 5%;
}

/* =================================
                Main
===================================*/

main {
  background-color: black;
  padding: 5.5%;
  color: white;
  height: 100vh; /* Später änder, Seite mit Inhalt füllen */
}

.border {
  display: flex;
  justify-content: space-between;
  border: 0.5px solid grey;
  padding: 30px;
}

.description {
  width: 40%;
}

.portfolio span {
  font-size: 1.3rem;
}

h2 {
  font-size: 4rem;
  padding-bottom: 5%;
}

h3 {
  cursor: pointer;
  font-size: 2.5rem;
  padding-bottom: 5%;
}

h3:hover {
  color: grey;
}

.description p {
  font-size: 1.3rem;
}

/* =================================
        Portfolio Section
===================================*/

.details {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  max-width: 1000px; /* damit es auf großen Screens nicht zu breit wird */
  height: auto; /* statt feste Höhe */
  max-height: 90vh; /* maximal 90% Bildschirmhöhe */
  overflow-y: auto; /* Scrollbar, falls der Inhalt wirklich höher wird */
  text-align: center;
  background-color: white;
  border-radius: 5px;
  box-shadow: 0 3rem 5rem rgba(0, 0, 0, 0.3);
  z-index: 10;
  color: black;
}

.details p:first-of-type {
  font-size: 2.5rem;
  padding: 20px 0;
}

.details p:last-of-type {
  font-size: 1.5rem;
  margin: 3%;
}

.banner {
  background-image: url('../img/california.png');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  height: 300px;
}

.banner-shop {
  background-image: url('../img/designShop.png');
}

.banner-css {
  background-image: url('../img/css_portfolio.png');
}

.banner-mowee {
  background-image: url('../img/mowee.png');
}

.banner-headphone {
  background-image: url('../img/headphone.png');
}

.used-tech {
  padding: 20px 0;
  font-size: 5rem;
}

.hidden {
  display: none;
}

.close-details {
  position: absolute;
  top: 1.2rem;
  right: 2rem;
  font-size: 3.5rem;
  color: #ab1b1b;
  cursor: pointer;
  border: none;
  background: none;
}

.blur {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  z-index: 5;
}

/* =================================
              BUTTONS
===================================*/
article a {
  position: relative;
  display: inline-block;
  padding: 1.5%;
  border-radius: 12px;
  color: white;
  background-color: black;
  text-decoration: none;
  margin: 1%;
  transition: transform 0.3s ease;
  overflow: hidden;
  z-index: 15;
}
article a:hover {
  transform: scale(1.05);
}

article a::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(to top, #555, #888);
  border-radius: 12px;
  z-index: -1;
  transition: height 0.4s ease;
  pointer-events: none;
}

article a:hover::before {
  height: 100%;
}

/* =================================
              Mobile
===================================*/

@media (max-width: 768px) {
  .border {
    flex-direction: column;
    border: none;
    padding: 0;
  }

  .portfolio article {
    border: 1px solid #444; /* dünner grauer Rahmen */
    border-radius: 12px; /* abgerundete Ecken */
    padding: 1rem;
    margin-bottom: 1.5rem;
    background: #111; /* dunkler Hintergrund */
  }

  .description {
    width: 100%;
    margin-bottom: 2rem;
  }

  .portfolio h3 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
  }

  /* Details nicht mehr Overlay, sondern unter dem Titel */
  .portfolio .details {
    position: static;
    transform: none;
    width: 100%;
    height: auto;
    margin-top: 0.5rem;
    background: transparent;
    color: #fff;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    display: block !important; /* immer sichtbar */
  }

  .portfolio .details p:first-of-type {
    font-size: 1.6rem;
    padding: 0.5rem 0;
  }

  .portfolio .details p:last-of-type {
    font-size: 1.2rem;
    margin: 0.5rem 0;
  }

  .portfolio .details .banner {
    height: 150px;
    border-radius: 8px;
    margin-bottom: 0.5rem;
  }

  .portfolio .details button.close-details,
  .blur {
    display: none; /* Close-Button & Blur ausblenden */
  }
}
