:root {
  --primary-font: "Bai Jamjuree", sans-serif;
  --text-color: #eeeeee;
  --text-color-muted: #666666;
  --bg-color: #000000;
  --border-color: #ffffff;
  --border-color-hover: #777777;
  --section-spacing: 50px;
}

html {
  scroll-behavior: smooth;
}

/* Base Styles */
body {
  overflow-x: hidden;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--primary-font);
  line-height: 1.5;
}

/* Layout */
.section {
  position: relative;
  width: 100vw;
  min-height: 60vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  text-align: center;
  z-index: 400;
}

/* Typography */
h1,
h2 {
  font-weight: 300;
  letter-spacing: -0.05em;
  line-height: 1.1;
  margin-bottom: 1.2rem;
}

h1 {
  font-size: min(5em, 9vw);
}

h2 {
  font-size: min(4em, 9vw);
}

strong {
  font-weight: 600;
}

p {
  font-size: 1.2rem;
  max-width: min(35em, 80vw);
  margin: 0 auto 1.2rem;
}

/* Components */
.rover {
  width: min(70vw, 300px);
  height: auto;
  margin-bottom: 2rem;
}

.globe-background {
  position: absolute;
  inset: 0;
  background: url("../assets/globe.png") center/max(90%, 1000px) no-repeat;
  z-index: 2;
  animation: fadeIn 1s ease-out;
}

#halo {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle, transparent 0%, var(--bg-color) 100%);
  z-index: 400;
}

#content {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Forms */
form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  width: min(35em, 60vw);
  margin: 1.2rem auto;
}

input,
textarea,
button {
  width: 100%;
  padding: 10px;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  font-size: 1.2rem;
  box-sizing: border-box;
}

textarea {
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
}

button {
  cursor: pointer;
  transition: all 0.3s ease;
}

button:hover {
  color: var(--border-color-hover);
  border-color: var(--border-color-hover);
}

/* Footer */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: calc(100% - 2em);
  padding: 1em;
  background-color: #00000077;
  border-top: #33333366 solid 1px;
  text-align: center;
  color: var(--text-color-muted);
  z-index: 500;
}

/* Links */
a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--border-color-hover);
}

footer a {
  color: var(--text-color-muted);
}

footer a:hover {
  text-decoration: underline;
}

/* Utilities */
.noselect {
  -webkit-user-select: none;
  user-select: none;
}

.links {
  margin-top: var(--section-spacing);
}

.logo {
  position: fixed;
  top: 30px;
  left: 30px;
  z-index: 1000;
}

.logo img {
  width: min(300px, 50vw);
  height: auto;
}

#backed-by {
  position: absolute;
  bottom: 30px;
  left: 30px;
  z-index: 1000;
  display: flex;
  align-items: center; /* vertical centering */
  justify-content: flex-start; /* left alignment */
  gap: 30px; /* space between items */
  padding-left: 20px; /* optional: adds some space from the left edge */
  flex-wrap: wrap; /* allow items to wrap to the next line if the parent is narrow */
}

#backed-by p {
  font-size: 1.2rem;
  margin: 0;
  flex: 1 1 auto; /* allow the paragraph to resize based on the parent width */
  white-space: nowrap; /* Prevent text wrapping */
}

#backed-by img {
  width: auto;
  object-fit: contain;
  max-width: 100%; /* ensure the image does not overflow the parent */
  flex: 1 1 auto; /* allow the image to resize based on the parent width */
}

.hero-section {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
}

#halo {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 0;
}

/* Desktop navbar styles - unchanged */
.navbar {
  position: fixed;
  top: 30px;
  right: 30px;
  z-index: 1000;
  width: auto;
  padding: 16px 32px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-links {
  display: flex;
  flex-direction: row;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  padding: 8px 16px;
  border-radius: 100px;
}

.nav-links li a:hover {
  background: rgba(255, 255, 255, 0.2);
}

.mobile-menu-btn {
  display: none;
}

/* Mobile styles */
@media (max-width: 1000px) {
  .navbar {
    left: auto;
    right: 20px;
    transform: none;
    width: auto;
    padding: 12px;
    border-radius: 50%;
  }

  .nav-container {
    justify-content: center;
  }

  .mobile-menu-btn {
    display: block;
    cursor: pointer;
    padding: 8px;
  }

  .hamburger {
    width: 20px;
    height: 16px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background: white;
    transition: all 0.3s ease;
  }

  .mobile-menu-btn.active .hamburger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .mobile-menu-btn.active .hamburger span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-btn.active .hamburger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-links {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 200px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 16px;
    border-radius: 16px;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  }

  .nav-links.active {
    opacity: 1;
    visibility: visible;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links li a {
    display: block;
    padding: 12px 24px;
    text-align: left;
    width: 100%;
    border-radius: 8px;
  }

  /* Animation for menu items */
  .nav-links.active li {
    animation: slideIn 0.3s ease forwards;
    opacity: 0;
  }

  .nav-links.active li:nth-child(1) {
    animation-delay: 0.1s;
  }
  .nav-links.active li:nth-child(2) {
    animation-delay: 0.2s;
  }
  .nav-links.active li:nth-child(3) {
    animation-delay: 0.3s;
  }
  .nav-links.active li:nth-child(4) {
    animation-delay: 0.4s;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.team-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2em;
  margin-top: 6em;
}

.team-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 250px;
}

.member-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 1em;
  box-shadow: 0 0 65px rgb(47, 45, 48);
}

.member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-member h3 {
  margin: 0.5em 0;
  font-size: 1.2rem;
  color: var(--text-color);
}

.team-member .position {
  color: var(--text-color);
  margin-bottom: 0.5em;
}

.social-links {
  display: flex;
  gap: 1em;
  margin-top: 0.5em;
}

.social-links img {
  width: 24px;
  height: 24px;
  transition: opacity 0.3s ease;
}

.social-links a:hover img {
  opacity: 0.7;
}

@media (max-width: 768px) {
  .team-member {
    width: 200px;
  }

  .member-photo {
    width: 150px;
    height: 150px;
  }
}

.content-wrapper {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  gap: 2rem;
  align-items: center;
  height: auto;
  overflow-y: auto;
}

.text-content {
  flex: 1;
  max-width: 50%;
}

.text-content h2 {
  margin-bottom: 2rem;
}

.text-body {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.image-content {
  flex: 1;
  max-width: 50%;
}

.image-content img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Mobile responsiveness */
@media screen and (max-width: 768px) {
  .content-wrapper {
    flex-direction: column;
    padding: 1.2rem;
    height: auto;
    margin: 4rem 0;
  }

  .section {
    padding: 2rem 0;
  }

  .text-content,
  .image-content {
    max-width: 100%;
  }

  .text-content {
    order: 1;
  }

  .image-content {
    order: 2;
  }
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.feature-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 1.2rem;
}

.feature-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.feature-column p {
  font-size: 1.2rem;
  text-align: justify;
}

/* Responsive adjustments */
@media screen and (max-width: 968px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 0 1.2rem;
  }
}

@media screen and (max-width: 576px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .feature-column {
    max-width: 400px;
    margin: 0 auto;
  }
}

#second-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4rem 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
  width: 100%;
}

.section-header h2 {
  font-size: min(4em, 9vw);
  margin-bottom: 1.2rem;
}

.features-wrapper {
  padding-top: 0; /* Remove top padding since header is separate */
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.feature-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 1.2rem;
}

.feature-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.feature-column h3 {
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
  font-weight: 500;
}

.feature-column p {
  font-size: 1.2rem;
  line-height: 1.6;
  color: #ccc;
  text-align: justify;
}

/* Responsive adjustments */
@media screen and (max-width: 968px) {
  #second-section {
    padding: 3rem 1.2rem;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 0 1.2rem;
  }
}

@media screen and (max-width: 576px) {
  #second-section {
    padding: 2rem 1.2rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .feature-column {
    max-width: 400px;
    margin: 0 auto;
  }

  .section-header {
    margin-bottom: 2rem;
  }
}

#solution .team-member p {
  text-align: justify;
}

#solution .team-member h3 {
  text-align: center; /* Keep headings centered */
}

#solution .member-photo img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  background: none;
  box-shadow: none;
  border: none;
}

#solution .member-photo {
  background: none;
  padding: 0;
  margin: 0;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

.section-container {
  padding: 4rem 0;
  text-align: center;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 12px 24px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 500;
  margin-top: 24px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.cta-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.cta-button svg {
  transition: transform 0.3s ease;
}

.cta-button:hover svg {
  transform: translateY(4px);
}
