/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: "Comic Sans MS", cursive, sans-serif;
  font-size: 1.1rem;
  color: #333;
  overflow-x: hidden;
  overflow-y: auto;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background-color: #1a4a6e;
  background-image: url(../images/bg.png);
  background-size: 100% auto;
  background-position: center top;
  background-attachment: scroll;
  background-repeat: repeat-y;
}

h1, h2, h3, h4 {
  font-family: "Comic Sans MS", cursive, sans-serif;
}

/* Navigation */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 100vw;
  background: transparent;
  padding: 1rem 2rem;
  z-index: 1000;
  box-sizing: border-box;
}

.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: flex-end;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: #ffffff;
  font-weight: 600;
  font-size: 1.1rem;
  transition: color 0.3s;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.nav-links a:hover {
  color: #61bde4;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
}

/* Sections - Normal flow */
.section {
  min-height: 100vh;
  padding: 6rem 2rem 4rem 2rem;
  position: relative;
  width: 100%;
  max-width: 100vw;
  overflow: visible;
}

/* Fixed floating elements that stay in viewport */
.fixed-element {
  position: fixed;
  z-index: 100;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  overflow: visible;
}

/* Home Section */
#home {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.main-title {
  font-size: 4rem;
  color: #ffffff;
  text-align: center;
  margin-bottom: 2rem;
  z-index: 10;
  position: relative;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
}

.images-container {
  position: relative;
  width: 100%;
  height: 60vh;
  margin-top: 3rem;
}

.images-container img {
  position: absolute;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Image Positioning - FIXED in viewport */
.cloud-main {
  position: fixed;
  width: 600px;
  top: 50px;
  left: 5%;
  z-index: 1;
  opacity: 0.8;
}

.cloud-small {
  position: fixed;
  width: 400px;
  top: 350px;
  right: 5%;
  z-index: 1;
  opacity: 0.7;
}

.robo {
  position: fixed;
  width: 600px;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
}

.brain {
  position: fixed;
  width: 120px;
  top: 200px;
  left: 15%;
  z-index: 2;
}

.cube {
  position: fixed;
  width: 120px;
  top: 200px;
  right: 15%;
  left: auto;
  z-index: 2;
}

.shield {
  position: fixed;
  width: 100px;
  top: 500px;
  left: 10%;
  z-index: 3;
}

.balance {
  position: fixed;
  width: 100px;
  top: 550px;
  right: 10%;
  left: auto;
  z-index: 3;
}

/* About Section */
#about {
  padding: 6rem 2rem;
}

#about h2 {
  font-size: 3rem;
  color: #ffffff;
  margin-bottom: 2rem;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.about-content {
  max-width: 800px;
  margin: 0 auto 3rem auto;
  text-align: center;
  line-height: 1.8;
  color: #ffffff;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.about-images {
  position: relative;
  height: 300px;
  margin-top: 3rem;
}

.about-images img {
  position: absolute;
  animation: float 8s ease-in-out infinite;
}

.airship {
  width: 500px;
  top: -50px;
  right: 0;
  z-index: 2;
}

.drone {
  width: 400px;
  top: 100px;
  left: 0;
  z-index: 2;
}

/* FAQ Section */
#faq {
  padding: 6rem 2rem;
}

#faq h2 {
  font-size: 3rem;
  color: #ffffff;
  margin-bottom: 3rem;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.faq-content {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  gap: 0.5rem;
}

.faq-category h3 {
  font-size: 2rem;
  color: #ffffff;
  margin-bottom: 2rem;
  border-bottom: 2px solid #61bde4;
  padding-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.faq-item {
  margin-bottom: 0;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.faq-item:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.faq-question {
  font-size: 1.3rem;
  color: #144767;
  margin-bottom: 0;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: color 0.3s ease;
  padding: 0;
}

.faq-question:hover {
  color: #61bde4;
}

.faq-question-text {
  flex: 1;
  padding-right: 1rem;
}

.faq-icon {
  font-size: 1.8rem;
  font-weight: bold;
  color: #61bde4;
  transition: color 0.3s ease;
  line-height: 1;
  min-width: 30px;
  text-align: center;
}

.faq-item.active .faq-icon {
  color: #144767;
}

.faq-answer-wrapper {
  padding-top: 1rem;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.faq-answer {
  color: #555;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* Level Handbook Section */
#handbook {
  padding: 6rem 2rem;
}

#handbook h2 {
  font-size: 3rem;
  color: #ffffff;
  margin-bottom: 3rem;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.handbook-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding: 1rem;
}

.handbook-card {
  position: relative;
  width: 320px;
  min-width: 320px;
  max-width: 320px;
  height: 280px;
  min-height: 280px;
  max-height: 280px;
  cursor: pointer;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.card-front,
.card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
  border-radius: 15px;
  overflow: hidden;
}

.card-front {
  background: rgba(255, 255, 255, 0.95);
  opacity: 1;
  z-index: 2;
}

.card-back {
  background: #000000;
  opacity: 0;
  flex-direction: column;
  padding: 1.5rem;
  text-align: left;
  z-index: 1;
  border: 2px solid #00ff00;
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
  overflow-y: auto;
  justify-content: flex-start;
}

.handbook-card:hover .card-front {
  opacity: 0;
}

.handbook-card:hover .card-back {
  opacity: 1;
  z-index: 3;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
  display: block;
}

.card-back h3 {
  font-size: 1.2rem;
  color: #00ff00;
  margin-bottom: 0.8rem;
  text-shadow: 0 0 10px rgba(0, 255, 0, 0.8), 0 0 20px rgba(0, 255, 0, 0.4);
  font-weight: bold;
  text-align: center;
}

.card-back p {
  font-size: 0.85rem;
  color: #00ff00;
  line-height: 1.4;
  margin: 0;
  text-shadow: 0 0 5px rgba(0, 255, 0, 0.6);
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-title {
    font-size: 2rem;
  }
  
  #about h2,
  #faq h2,
  #handbook h2 {
    font-size: 2rem;
  }
  
  .nav-links {
    gap: 1rem;
  }
  
  .nav-links a {
    font-size: 0.9rem;
  }
  
  .images-container img {
    max-width: 40vw;
  }
  
  .robo {
    width: 300px;
    top: 50px;
  }
  
  .cloud-main {
    width: 250px;
    top: -50px;
  }
  
  .cloud-small {
    width: 200px;
  }
  
  .airship {
    width: 250px;
  }
  
  .drone {
    width: 200px;
  }
  
  .brain, .cube, .shield, .balance {
    width: 60px;
  }
  
  .handbook-card {
    width: 280px;
    min-width: 280px;
    max-width: 280px;
    height: 240px;
    min-height: 240px;
    max-height: 240px;
  }
  
  .card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .card-back {
    padding: 1.5rem;
  }
  
  .card-back h3 {
    font-size: 1.2rem;
  }
  
  .card-back p {
    font-size: 0.85rem;
  }
}

