/* styles.css */
:root {
  --primary-color: #0047AB;
  --secondary-color: #FFD700;
  --background-color: #f0f4f8;
  --text-color: #333;
  --headline-color: #001f3f;
  --card-bg: #fff;
  --shadow-color: rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease-in-out;
}

/* Global resets and box-sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Body styling */
body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Container styling */
.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* Preloader Sliding Panels with Enhanced Texture */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
}

#preloader .panel {
  height: 100%;
  width: 50%;
  background-color: var(--primary-color);
  /* Adding a subtle diagonal stripe texture using a repeating linear gradient */
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.05) 10px,
    transparent 10px,
    transparent 20px
  );
  /* Inset shadow for depth */
  box-shadow: inset 0 0 20px rgba(0,0,0,0.1);
}

#preloader .panel.left {
  animation: slideLeft 1.2s ease forwards;
}

#preloader .panel.right {
  animation: slideRight 1.2s ease forwards;
}

@keyframes slideLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

@keyframes slideRight {
  0% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

/* Hero Section */
.hero {
  background: linear-gradient(150deg, var(--primary-color) 60%, var(--secondary-color) 60%);
  color: white;
  padding: 6rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
}
.hero h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 4.5rem;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}
.hero p {
  font-size: 1.3rem;
  margin-bottom: 2.5rem;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0.9;
}
.hero-image {
  position: absolute;
  bottom: -15%;
  left: 50%;
  transform: translateX(-50%) scale(1.3);
  width: 100%;
  max-width: 800px;
  opacity: 0.3;
  z-index: 1;
  transition: transform 4s cubic-bezier(.17, .67, .18, .98);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.hero:hover .hero-image {
  transform: translateX(-45%) scale(1.4);
}
.cta-button {
  display: inline-block;
  background-color: var(--secondary-color);
  color: var(--primary-color);
  padding: 1.2rem 2.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  transition: var(--transition);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border: 2px solid transparent;
}
.cta-button:hover {
  transform: translateY(-5px);
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.3);
  background-color: white;
  border-color: var(--secondary-color);
}

/* Features Section */
.features {
  padding: 5rem 0;
}
.section-title {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.8rem;
  font-family: 'Bebas Neue', sans-serif;
  color: var(--headline-color);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}
.feature-card {
  background-color: var(--card-bg);
  padding: 2.5rem;
  border-radius: 15px;
  box-shadow: 0 3px 10px var(--shadow-color);
  transition: var(--transition);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 15px;
  border: 3px solid transparent;
  transition: var(--transition);
  pointer-events: none;
}
.feature-card:hover::before {
  border: 3px solid;
  border-top-color: var(--secondary-color);
  border-right-color: var(--primary-color);
  border-bottom-color: var(--secondary-color);
  border-left-color: var(--primary-color);
}
.feature-card:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px var(--shadow-color);
}
.feature-icon {
  font-size: 3.5rem;
  color: var(--primary-color);
  margin-bottom: 1.2rem;
  transition: color 0.3s ease;
}
.feature-card:hover .feature-icon {
  color: var(--secondary-color);
}
.feature-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
  color: var(--headline-color);
  z-index: 3;
}
.feature-description {
  font-size: 1.05rem;
  text-align: center;
  color: var(--text-color);
  z-index: 3;
  opacity: 0.9;
}

/* Visualize the Game Section */
.visualize-game {
  padding: 6rem 0;
  background-color: var(--primary-color);
  color: white;
  text-align: center;
}
.visualize-game-title {
  margin-bottom: 3rem;
  font-size: 2.8rem;
  font-family: 'Bebas Neue', sans-serif;
}
.visualize-content {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
}
.visualize-text {
  max-width: 500px;
  text-align: left;
  margin: 1rem;
  padding: 1.5rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
}
.visualize-text ul {
  list-style-type: disc;
  margin-left: 1.5rem;
}
.visualize-text li {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}
.visualize-text h3 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}
.visualize-image {
  max-width: 500px;
  margin: 1rem;
}
.visualize-image img {
  border-radius: 15px;
  width: 100%;
  height: auto;
  display: block;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* How It Works Section */
.how-it-works {
  padding: 6rem 0;
  background-color: var(--background-color);
  text-align: center;
}
.how-it-works-title {
  margin-bottom: 3rem;
  font-size: 2.8rem;
  font-family: 'Bebas Neue', sans-serif;
  color: var(--headline-color);
}
.steps-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  counter-reset: step;
}
.step {
  padding: 2rem;
  background: var(--card-bg);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border-radius: 15px;
  position: relative;
  transition: all 0.5s cubic-bezier(.17, .67, .18, .98);
  text-align: left;
}
.step:hover {
  transform: rotate(1.5deg) scale(1.05);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Bebas Neue', cursive;
  color: white;
  background-color: var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 1rem;
  right: 1rem;
  transition: transform 0.4s ease, background-color 0.4s ease;
}
.step:hover::before {
  background-color: var(--secondary-color);
  transform: scale(1.1);
}
.step-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--headline-color);
  margin-bottom: 1rem;
  padding-left: 0.8rem;
}
.step-description {
  font-size: 1.05rem;
  color: var(--text-color);
  padding-left: 0.8rem;
}
.cta-container {
  margin-top: 2rem;
  text-align: center;
}

/* Other Products Section */
.other-products {
  padding: 4rem 0;
  background-color: var(--background-color);
  text-align: center;
}
.other-products-title {
  font-size: 2.4rem;
  margin-bottom: 2rem;
  font-family: 'Bebas Neue', sans-serif;
  color: var(--headline-color);
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  justify-items: center;
}
.product-card {
  background-color: var(--card-bg);
  border-radius: 15px;
  box-shadow: 0 3px 10px var(--shadow-color);
  transition: var(--transition);
  overflow: hidden;
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px var(--shadow-color);
}
.product-link {
  text-decoration: none;
  color: inherit;
  display: block;
  padding: 1.5rem;
  height: 100%;
}
.product-image-container {
  position: relative;
  width: 100%;
  padding-top: 60%;
  overflow: hidden;
}
.product-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 71, 171, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: var(--transition);
}
.product-overlay-icon {
  color: white;
  font-size: 3rem;
}
.product-card:hover .product-overlay {
  opacity: 1;
}
.product-card:hover .product-image {
  transform: scale(1.1);
}
.product-name {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--headline-color);
  margin: 0.5rem 0;
}
.product-description {
  font-size: 1rem;
  color: var(--text-color);
}

/* FAQ Section */
.faq {
  padding: 4rem 0;
  background-color: var(--background-color);
}
.faq-title {
  text-align: center;
  font-size: 2.4rem;
  margin-bottom: 2rem;
  font-family: 'Bebas Neue', sans-serif;
  color: var(--headline-color);
}
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.faq-item {
  background-color: var(--card-bg);
  border-radius: 15px;
  box-shadow: 0 3px 10px var(--shadow-color);
  transition: var(--transition);
}
.faq-item:hover {
  box-shadow: 0 6px 20px var(--shadow-color);
}
.faq-question {
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  padding: 1.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--headline-color);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}
.faq-question i {
  transition: transform 0.3s ease;
}
.faq-question.active i {
  transform: rotate(180deg);
}
.faq-answer {
  padding: 0 1.5rem 1.5rem;
  display: none;
  font-size: 1.05rem;
  color: var(--text-color);
  line-height: 1.6;
}
.faq-item.active .faq-answer {
  display: block;
}

/* Updated Nonprofit Section */
.nonprofit {
  padding: 4rem 2rem;
  background: linear-gradient(135deg, var(--background-color) 0%, #ffffff 100%);
  text-align: center;
  border-top: 4px solid var(--primary-color);
  margin-top: 2rem;
}
.nonprofit-title {
  font-size: 2.6rem;
  font-family: 'Bebas Neue', sans-serif;
  color: var(--headline-color);
  margin-bottom: 1rem;
}
.nonprofit p {
  font-size: 1.15rem;
  color: var(--text-color);
  line-height: 1.8;
  max-width: 900px;
  margin: 0 auto 1rem;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem 0;
  background-color: var(--background-color);
  border-top: 1px solid #ddd;
  color: var(--text-color);
  font-size: 0.9rem;
}
.footer-cta {
  display: inline-block;
  margin-left: 1rem;
  background-color: var(--secondary-color);
  color: var(--primary-color);
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  transition: var(--transition);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border: 2px solid transparent;
}
.footer-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.3);
  background-color: white;
  border-color: var(--secondary-color);
}

/* Top Navigation Bar */
.top-nav {
  background-color: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}
.top-nav-content {
  display: flex;
  justify-content: flex-start;
  padding: 1.2rem 1.5rem;
}

.nav-list {
  list-style: none;
  display: flex;
  margin-right: 0;
  margin-left: 0;
}

.nav-list li {
  margin-right: 1.5rem;
  margin-left: 0;
}
.nav-list a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  display: block;
}
.nav-list a:hover {
  color: var(--secondary-color);
}

/* Mobile Nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  z-index: 300;
}
.nav, .nav-toggle {
  display: inline-flex;
  align-items: center;
}

/* Hamburger */
.hamburger {
  width: 30px;
  height: 3px;
  background-color: var(--primary-color);
  display: block;
  border-radius: 4px;
  transition: var(--transition);
}
.hamburger::before,
.hamburger::after {
  content: '';
  width: 30px;
  height: 3px;
  background-color: var(--primary-color);
  display: block;
  position: relative;
  border-radius: 4px;
  transition: var(--transition);
}
.hamburger::before {
  top: -10px;
}
.hamburger::after {
  top: 10px;
}
/* Active state for toggle (X icon) */
.nav-toggle.active .hamburger {
  background-color: transparent;
}
.nav-toggle.active .hamburger::before {
  transform: rotate(45deg) translate(7px, 7px);
}
.nav-toggle.active .hamburger::after {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  /* Hide hero text on mobile */
  .hero h1,
  .hero p {
    display: none;
  }

  /* Mobile Navigation */
  .nav-toggle {
    display: block;
    margin-left: auto;
    padding: 0;
  }
  
  .nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 200;
    display: block;
  }
  
  .nav.active {
    transform: translateX(0);
  }
  
  .nav-list {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    margin: 0;
    padding: 0;
  }
  
  .nav-list li {
    margin: 1rem 0;
    width: 100%;
    text-align: center;
    border-bottom: none;
  }
  
  .nav-list a {
    display: block;
    padding: 1rem;
  }
  
  /* Adjust hero image for mobile */
  .hero-image {
    bottom: -5%;
    transform: translateX(-50%) scale(1.1);
  }
}

@media (max-width: 480px) {
  .top-nav-content {
    padding: 0.8rem 1.5rem;
  }
  .hero h1 {
    font-size: 3rem;
  }
  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}
