/* Global styles for the project */

/* Sujuv kerimine leheküljel */
html {
  scroll-behavior: smooth;
}

/* Põhistiilid: teksti pere, tausta värv */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f8f9fa;
}

/* Navigatsiooni riba - üleval olev menüü särtsu animatsiooniga */
.navbar {
  background: linear-gradient(135deg, #78acff, #377efa);
  background-size: 400% 400%;
  animation: ICE 18s ease infinite; /* Värvianimatsioon */
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  height: 100px;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

/* Logo - ujub kerge animatsiooniga ja kasvab hiirega üle */
.navbar img {
  height: 150px;
  width: auto;
  flex-shrink: 0;
  margin-top: 15px;
  padding: 0;
  animation: floatLogo 3s ease-in-out infinite; /* Logo ujuv efekt */
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease;
}

.navbar img:hover {
  transform: translateY(-3px) scale(1.1);
  transition: transform 0.5s ease;
}

.navbar button:active {
  transform: scale(0.97);
  transition: transform 0.1s ease;
}

.navbar::before,
.navbar::after {
  z-index: 0;
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  background: transparent;
  border: 16px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  animation: wave 25s linear infinite;
  opacity: 0.6;
  pointer-events: none;
}

.navbar::after {
  animation-duration: 32s;
  animation-direction: reverse;
  opacity: 0.4;
  border-color: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.navbar-brand {
  margin: 0;
  padding: 0 20px;
  font-size: 1.5rem;
  font-weight: bold;
  color: #efebeb;
}

.nav-links {
  display: flex;
  align-items: center;
  margin-left: auto;
  margin-right: 20px;
}

.nav-link {
  color: #efebeb;
  text-decoration: none;
  margin-left: 1rem;
  transition: all 0.35s ease;
}

.nav-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(0, 102, 255, 0.4);
  background: linear-gradient(135deg, #0052cc, #0088ff);
  border-radius: 16px;
}

.nav-link:active {
  transform: scale(0.97);
}

/* Otsingukast ja nupp */
.search {
  display: flex;
  align-items: center;
}

/* Otsingusisestus väli */
.search input {
  padding: 0.5rem;
  border: 1px solid #34373a;
  border-radius: 4px;
  margin-right: 0.5rem;
}

/* Otsingu nupp - sinikses gradiendiga ja hõõgusega */
.search button {
  padding: 0.75rem 1.5rem;
  background-color: #0000ff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  background: linear-gradient(135deg, #0066ff, #00aaff);
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(0, 102, 255, 0.3);
}

.search button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(0, 102, 255, 0.4);
  background: linear-gradient(135deg, #0052cc, #0088ff);
}

.search button:active {
  transform: scale(0.97);
}

main {
  text-align: start;
  padding: 90px 50px;
}

header {
  text-align: start;
  padding: 90px 50px;
}

/* Tervituse kast avaleheküljel - sinine gradient ja lainejate ringidega */
.welcome {
  text-align: center;
  padding: 2rem 1.5rem;
  background: linear-gradient(135deg, #78acff, #377efa);
  background-size: 400% 400%;
  animation: ICE 18s ease infinite; /* Värvianimatsioon */
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 10rem;
  margin-top: 5rem;
  color: rgb(245, 235, 235);
  border: 1px solid #34373a;
  position: relative;
}


.welcome::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  background: transparent;
  border: 16px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  animation: wave 25s linear infinite;
  opacity: 0.6;
  pointer-events: none;
}

/* Animatsioon: värvi muutus gradiendiga - "jäämeri" efekt */
@keyframes ICE {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Animatsioon: ringid pöörlevad ja liiguvad - "lainete" efekt */
@keyframes wave {
  from {
    transform: rotate(0deg) translate(0, 0);
  }
  to {
    transform: rotate(360deg) translate(30px, 40px);
  }
}

.welcome button {
  padding: 0.75rem 1.5rem;
  background-color: #0000ff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  background: linear-gradient(135deg, #0066ff, #00aaff);
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(0, 102, 255, 0.3);
}

.welcome button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(0, 102, 255, 0.4);
  background: linear-gradient(135deg, #0052cc, #0088ff);
}

.welcome button:active {
  transform: scale(0.97);
}

img {
  max-width: 400px;
  border-radius: 10px;
  padding: 40px;
}

.content {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  border: 1px solid #34373a;
  border-radius: 8px;
  padding: 20px;
  background: linear-gradient(135deg, #78acff, #377efa);
  background-size: 400% 400%;
  animation: ICE 18s ease infinite;
}

.content::before,
.content::after {
  content: "";
  position: absolute;
  width: 100px;
  height: 100px;
  background: transparent;
  border: 16px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  animation: wave 25s linear infinite;
  opacity: 0.6;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.content::after {
  width: 260px;
  height: 260px;
  border: 10px solid rgba(255, 255, 255, 0.08);
  animation-duration: 32s;
  animation-direction: reverse;
  opacity: 0.4;
  pointer-events: none;
}

.content1 {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border: 1px solid #34373a;
  border-radius: 8px;
  padding: 20px;
  background-color: #f8f9fa;
}

.content1 p {
  background-color: #ffffff;
  border-radius: 20px;
  padding: 1rem 1.2rem;
  margin: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  animation: fadeIn 0.75s ease-in-out;
}

.aos-item {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 1s ease,
    transform 1s ease;
  will-change: opacity, transform;
}

.aos-item.aos-visible {
  opacity: 1;
  transform: translateY(0);
}

.õpe h1 {
  margin-top: 10rem;
}

.õpe a {
  text-decoration: none;
  color: #34373a;
}

/* Teemade grid - 5 veeruga kuvapaigutus õppeteemade kartidele */
.box {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr)); /* 5 võrdsed veerud */
  gap: 40px;
  background: linear-gradient(135deg, #78acff, #377efa);
  background-size: 400% 400%;
  animation: ICE 18s ease infinite;
  padding: 30px;
  border: 1px solid #34373a;
  border-radius: 16px;
  align-items: start;
}

.box::before,
.box::after {
  content: "";
  position: absolute;
  width: 100px;
  height: 100px;
  background: transparent;
  border: 16px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  animation: wave 30s linear infinite;
  opacity: 0.6;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.box::after {
  width: 260px;
  height: 260px;
  border: 10px solid rgba(255, 255, 255, 0.08);
  animation-duration: 32s;
  animation-direction: reverse;
  opacity: 0.4;
  pointer-events: none;
}

/* Õppeteema kaart - suureneb hiire üle */
.topic {
  padding: 1rem;
  background-color: #ffffff;
  border: 1px solid #34373a;
  width: 230px;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: 0.3s ease; /* Sujuv ülemineku efekt */
  cursor: pointer;
}

.topic:hover {
  transform: scale(1.05);
}

.topic:active {
  transform: scale(0.95);
}

.topic img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  margin-bottom: 0.75rem;
  padding: 0;
}

.footer {
  position: relative;
  overflow: hidden;
  padding: 2rem 2rem;
  background: linear-gradient(135deg, #78acff, #377efa);
  background-size: 400% 400%;
  animation: ICE 18s ease infinite;
  border-top: 1px solid #4a4d53;
  text-align: center;
}

.footer::before,
.footer::after {
  content: "";
  position: absolute;
  width: 100px;
  height: 100px;
  background: transparent;
  border: 16px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  animation: wave 30s linear infinite;
  opacity: 0.6;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.footer::after {
  width: 260px;
  height: 260px;
  border: 10px solid rgba(255, 255, 255, 0.08);
  animation-duration: 32s;
  animation-direction: reverse;
  opacity: 0.4;
  pointer-events: none;
}

.footer p {
  margin: 0;
  font-size: 0.95rem;
  color: white;
}

/*sec*/

.teema {
  text-align: center;
  padding: 2rem 1.5rem;
  background: linear-gradient(135deg, #78acff, #377efa);
  background-size: 400% 400%;
  animation: ICE 18s ease infinite;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  color: rgb(245, 235, 235);
  margin-bottom: 10rem;
  margin-top: 5rem;
  border: 1px solid #34373a;
}

.teema::before {
  content: "";
  position: absolute;
  width: 100px;
  height: 100px;
  background: transparent;
  border: 16px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  animation: wave 25s linear infinite;
  opacity: 0.6;
  pointer-events: none;
}

.teema::after {
  animation-duration: 32s;
  animation-direction: reverse;
  opacity: 0.4;
  border-color: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

img {
  max-width: 800px;
  max-height: 400px;
  width: auto;
  height: auto;
  border-radius: 10px;
  padding: 40px;
  animation: fadeIn 0.75s ease-in-out forwards;
}

.welcome img {
  max-width: 800px;
  max-height: 400px;
  width: auto;
  height: auto;
  border-radius: 10px;
  padding: 40px;
  border: 1px solid #34373a;
}

.image-card {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 800px;
}

.image-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  padding: 0;
}

.image-card-text {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  padding: 1rem 1.2rem;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 12px;
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  animation: fadeIn 0.75s ease-in-out;
}

.back {
  display: flex;
  justify-content: flex-end;
  text-decoration: none;
}

.back button {
  padding: 0.75rem 1.5rem;
  background-color: #0000ff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  background: linear-gradient(135deg, #0066ff, #00aaff);
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(0, 102, 255, 0.3);
}

.back button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(0, 102, 255, 0.4);
  background: linear-gradient(135deg, #0052cc, #0088ff);
}

/* video */

.content {
  display: flex;
  gap: 30px; /* vahe video ja teksti vahel */
  padding: 60px;
}

/* teema ilmumine */

@keyframes fadeIn {
  from {
    opacity: 0;
    scale: 0.5;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}
