@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap");

:root {
  --ff: "Open Sans", sans-serif;

  --primary--color: hsl(0, 0%, 100%);
  --secondary--color: hsl(0, 0%, 0%);
  --accent--color: hsl(195, 88%, 45%);
  --tertiary--color: hsl(22, 85%, 51%);
}
.darkmode{
  --primary--color: hsl(0, 0%, 26%);
  --secondary--color: hsl(0,0%,100%);
  --accent--color: hsl(213, 61%, 23%);
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-y: auto; /* Allows scrolling */
  scrollbar-width: none; /* Hides scrollbar */
}

body {
  overflow-y: auto; /* Allows scrolling */
  scrollbar-width: none; /* Hides scrollbar */
}

body::-webkit-scrollbar {
  display: none;
}

body {
  background-color: var(--primary--color);
  color: var(--secondary--color);
  font-family: var(--ff);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  font-size: clamp(14px, 1.5vw, 18px);
  padding: 0;
  gap: 20px;
  overflow-x: hidden;
  width: 100vw;
}
h1{
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1rem;
  font-size: clamp(24px, 5vw, 48px);
}

/* Nav-menu */
.logo-img{
  height: 120px;
  width: 140px;
}
nav {
  background-color: var(--accent--color);
  box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.1);
  width: 100vw;
  width: 100%;
  margin: 0;
  padding: 0;
}
nav ul {
  width: 100%;
  list-style: none;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  padding: 0;
}
nav li {
  height: 64px;
  border-right: dotted 1px;
  border-color: var(--secondary--color);
}
nav li:first-child{
  border: none;
}
nav a {
  height: 100%;
  padding: 0 clamp(10px, 3vw, 30px);
  text-decoration: none;
  display: flex;
  align-items: center;
  color: var(--secondary--color);
}
nav a:hover {
  background-color: var(--tertiary--color);
}
nav li:first-child {
  margin-right: auto;
}
.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: clamp(200px, 30vw, 250px);
  background-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  box-shadow: -10px 0 10px rgba(0, 0, 0, 0.1);
  list-style: none;
  display: none;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  color: var(--secondary--color);
  z-index: 100;
}
.sidebar li {
  width: 100%;
}
.sidebar a {
  width: 100%;
}
.menu-button {
  display: none;
}
@media (max-width: 800px) {
  .hideOnMobile {
    display: none;
  }
  .menu-button {
    display: block;
  }
  nav li{
    border: none;
  }
}
@media (max-width: 400px) {
  .sidebar {
    width: 100%;
  }
}

/* Dark Mode Toggle */
#theme-switch svg,
#theme-switch-mobile svg{
  fill: var(--secondary--color);
  width: clamp(16px, 3vw, 32px);
}

#theme-switch svg:last-child,
#theme-switch-mobile svg:last-child{
  display: none;
}
.darkmode #theme-switch svg:first-child,
.darkmode #theme-switch-mobile svg:first-child{
  display: none;
}
.darkmode #theme-switch svg:last-child,
.darkmode #theme-switch-mobile svg:last-child{
  display: block;
}

/* Footer */
footer{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: clamp(15px, 2vw, 20px);
  flex-wrap: wrap;
}
footer a{
  text-decoration: none;
  color: var(--secondary--color);
  font-size: clamp(14px, 1.5vw, 18px);
}
.footer-links{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Social Media Logos */
.socials-container{
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  /* margin-right: clamp(15px, 2vw, 20px); */
  gap: clamp(10px, 2vw, 20px);
  flex-wrap: wrap;
  z-index: 10;
  position: relative;
}
.socials-container a{
  background-color: var(--primary--color);
  padding: clamp(0.5em, 2vw, 1em);
  border-radius: 50%;
  height: clamp(48px, 8vw, 64px);
  width: clamp(48px, 8vw, 64px);
  display: grid;
  place-items: center;
  /* box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05); */
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
  transition: background-color 0.3s ease;
  position: relative;
}
.socials-container a:hover{
  background-color: var(--accent-color);
}
.socials-container a::before{
  content: attr(data-social);
  position: absolute;
  background-color: var(--accent-color);
  color: white;
  padding: 0.5em 1em;
  border-radius: 100px;
  transform: translateY(-30px) rotate(25deg);
  opacity: 0;
  transition: 200ms cubic-bezier(.42,0,.44,1.68);
}
.socials-container a::after{
  content: '';
  position: absolute;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 10px solid var(--accent-color);
  transform: translateY(0) rotate(25deg);
  opacity: 0;
  transition: 200ms cubic-bezier(.42,0,.44,1.68);
}
.socials-container a:hover::before{
  transform: translateY(-65px) rotate(0);
  opacity: 1;
}
.socials-container a:hover::after{
  transform: translateY(-42px) rotate(0);
  opacity: 1;
}

/* main coontent */
main{
  display: flex;
  flex-direction: column;
  /* justify-content: center; */
  /* align-items: center; */
  gap: 20px;
}
main ul {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  list-style: none;
  /* padding-left: clamp(10px, 5vw, 40px); Responsive spacing from the edge */
  margin: 0 auto;
  width: min(80%, 800px); /* Keeps it within 90% of the screen but max 800px */
}
main ul li {
  font-size: clamp(14px, 2vw, 20px); /* Responsive font size */
  line-height: 1.5; /* Improves readability */
  display: flex;  /* Enables flexbox */
  align-items: center; /* Centers icon and text */
  gap: 10px; /* Space between icon and text */
}
main ul li::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  background-image: url("../images/wrench_klein_1.png"); /* Replace with your icon */
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0; /* Prevents shrinking on smaller screens */
}
.img-g{
  display: flex;
  justify-content: center;
}
div img{
  width: min(80%, 800px);
  height: auto;
  border-radius: 5%;
}


/* Info Box */
.info-box{
  background-color: var(--primary--color);
  color: var(--secondary--color);
  border: var(--tertiary--color) solid 4px;
  border-radius: 15px;
  width: min(80%, 800px);
  margin: auto;
  padding: 10px;
  font-weight: bold;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

/* Style the legend (icon placement) */
.info-icon {
  font-size: 20px;
  font-weight: bold;
  color: var(--tertiary--color);
  background-color: var(--primary--color); /* Match the box background */
  padding: 5px 10px;
  border-radius: 5px;
  background-color: var(--primary--color);
}

.info-box-succes{
  background-color: var(--primary--color);
  color: green;
  border: green solid 4px;
  border-radius: 15px;
  width: min(80%, 800px);
  margin: auto;
  padding: 10px;
  font-weight: bold;
  font-size:  32px;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

/* Style the legend (icon placement) */
.info-icon-succes {
  font-size: 32px;
  font-weight: bold;
  color: green;
  background-color: var(--primary--color); /* Match the box background */
  padding: 5px 10px;
  border-radius: 5px;
  background-color: var(--primary--color);
}

.info-box-error{
  background-color: var(--primary--color);
  color: red;
  border: red solid 4px;
  border-radius: 15px;
  width: min(80%, 800px);
  margin: auto;
  padding: 10px;
  font-weight: bold;
  font-size:  32px;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

/* Style the legend (icon placement) */
.info-icon-error {
  font-size: 32px;
  font-weight: bold;
  color: red;
  background-color: var(--primary--color); /* Match the box background */
  padding: 5px 10px;
  border-radius: 5px;
  background-color: var(--primary--color);
}
/* text impressum / datenschutz */

.wrapper{
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  width: 80%;
  overflow-wrap: break-word;
}

/* quiz card */

.card {
  background-color: var(--primary--color);
  color: var(--secondary--color);
  border-radius: 8px;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
  padding: 20px;
  width: min(80%, 800px);
  text-align: center;
  margin: 0 auto;
}

.card h2 {
  margin-bottom: 15px;
}

.card p {
  margin-bottom: 20px;
  font-size: 1.1em;
}

.button-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.button {
  padding: 15px 15px;
  margin-bottom: 10px;
  border: none;
  border-radius: 8px;
  background-color: var(--accent--color);
  color: var(--secondary--color);
  font-size: 1.1em;
  cursor: pointer;
  /* transition: background-color 0.3s; */
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 10px;
}

.button:hover {
  background-color: var(--tertiary--color);
}

.back-button {
  padding: 15px 15px;
  margin-top: 10px; 
  width: 40%; 
  display: flex;
  justify-content: center;
}

.progress-container {
  width: 100%;
  height: 8px; /* Adjust the height as needed */
  background-color: #e0e0e0; /* Light gray background */
  border-radius: 5px;
  margin-bottom: 20px; /* Space between progress bar and title */
}

.progress-bar {
  height: 100%;
  background-color: var(--tertiary--color); /* Blue progress color */
  border-radius: 5px;
}

.navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.selected {
  background-color: var(--tertiary--color);
}

/* form field */

form{
  width: min(400px, 100%);
  margin-top: 20px;
  margin-bottom: 50px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
form > div{
  width: 100%;
  display: flex;
  justify-content: center;
}
form label{
  flex-shrink: 0;
  height: 50px;
  width: 50px;
  background-color: var(--accent--color);
  fill: var(--secondary--color);
  color: var(--secondary-color);
  border-radius: 10px 0 0 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 500;
}
form input{
  box-sizing: border-box;
  flex-grow: 1;
  min-width: 0;
  height: 50px;
  padding: 1em;
  font: inherit;
  border-radius: 0 10px 10px 0;
  border: 2px solid var(--primary--color);
  border-left: none;
  background-color: var(--primary--color);
  transition: 150ms ease;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}
form input:hover{
  border-color: var(--accent--color);
}
form input:focus{
  outline: none;
  border-color: var(--tertiary--color);
}
div:has(input:focus) > label{
  background-color: var(--tertiary--color);
}
form input::placeholder{
  color: var(--secondary--color);
}
form div.incorrect label{
  background-color: #f06272;
}
form div.incorrect input{
  border-color: #f06272;
}