
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  font-family: Arial, sans-serif;
  background-color: #d8ddef;
  scroll-behavior: smooth;
}


header {
  font-family: "Arial Black", sans-serif;
  position: relative;
  width: 100%;
  background: url("kontaktbanner.png") center/cover no-repeat;
  color: black;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

nav a {
  color: black;
  text-decoration: none;
  font-weight: bold;
}

nav a:hover {
  color: navy;
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 25px;
  height: 20px;
  cursor: pointer;
}

.burger div {
  width: 100%;
  height: 3px;
  background-color: black;
  border-radius: 2px;
}

.sissejuhatus {
  font-size: 1.5rem;
  color: #333;
  margin: 2rem auto;
  text-align: center;
  max-width: 800px;
}

.sissejuhatus p {
  font-size: 1.2rem;
  line-height: 1.6;
  color: #555;
  padding: 0.5rem;
}

.slideshow {
  overflow: hidden;
  max-width: 1000px;
  margin: 2rem auto;
  height: 120px;
}

.carousel {
  display: flex;
  animation: scroll 25s linear infinite;
}

.text-note {
  flex: 0 0 250px;
  height: 100px;
  margin: 0 10px;
  background: #fffb8f;
  color: #333;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.8rem;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.3);
  transform: rotate(-2deg);
  font-size: 1rem;
}

.text-note:nth-child(even) {
  transform: rotate(2deg);
  background: #ffd966;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-1750px);
  }
}


.code-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 2rem auto;
}

.code-box {
  border-radius: 10px;
  padding: 1rem;
  color: white;
  font-family: "Courier New", monospace;
  min-height: 220px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.code-structure {
  background-color: #4caf50;
}
.code-headings {
  background-color: #2196f3;
}
.code-links {
  background-color: #ff5722;
}
.code-images {
  background-color: #9c27b0;
}
.code-lists {
  background-color: #ff9800;
}
.code-forms {
  background-color: #607d8b;
}

.code-comment {
  font-style: italic;
  color: #e0e0e0;
  margin-top: 0.5rem;
}


.contact-hero {
  position: relative;
  width: 100%;
  background: url("kontaktbanner.png") no-repeat center/cover;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  padding: 2rem;
}

.contact-hero .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
}

.contact-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  width: 100%;
}

.contact-content form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-content input,
.contact-content textarea {
  width: 100%;
  padding: 0.8rem;
  border: none;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.9);
  color: #000;
}

.contact-content button {
  padding: 1rem;
  border: none;
  border-radius: 5px;
  background: crimson;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.contact-content button:hover {
  background: darkred;
}

.site-footer {
  position: relative;
  width: 100%;
  min-height: 150px;
  margin-top: 2rem;
  background: url("hero_panner.jpg") no-repeat center/cover;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 1rem;
  color: gold;
  padding: 1rem;
}

.site-footer .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.footer-content {
  position: relative;
  z-index: 1;
  font-weight: bold;
  text-align: center;
}

.footer-card {
    max-width: 160px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

@media screen and (max-width: 768px) {
  .header-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .burger {
    display: flex;
    margin: 0.5rem 0;
  }

  #nav-links {
    flex-direction: column;
    width: 100%;
    display: none;
    gap: 0.8rem;
    padding: 1rem;
    background: none;
    position: absolute;
    top: 60px;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(6px);
  }

  #nav-links.show {
    display: flex;
  }

  #nav-links li a {
    font-size: 1rem;
    padding: 0.5rem 0;
    display: block;
    width: 100%;
  }

  .sissejuhatus {
    font-size: 1rem;
    padding: 1rem;
  }

  .sissejuhatus iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }

  .slideshow {
    height: auto;
    overflow-x: auto;
  }

  .carousel {
    display: flex;
    width: max-content;
    animation: none; 
    gap: 0.5rem;
  }

  .text-note {
    flex: 0 0 140px;
    height: auto;
    font-size: 0.8rem;
    padding: 0.4rem;
    margin-right: 0.5rem;
  }

  .code-container {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 1rem;
  }

  .code-box {
    min-height: 160px;
    font-size: 0.85rem;
    overflow-x: auto; 
  }

  .contact-hero {
    padding: 1rem;
    text-align: center;
  }

  .contact-content input,
  .contact-content textarea,
  .contact-content button {
    font-size: 0.9rem;
    width: 100%;
  }

  .site-footer {
    margin-top: 2rem;
    height: auto;
    padding: 1rem;
    text-align: center;
  }

  .footer-card {
    max-width: 120px;
  }
}
