html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh; /* Use min-height instead of height */
  font-family: Arial, sans-serif;
  background-color: black;
  scroll-behavior: smooth;
  overflow-x: hidden; /* Prevent horizontal scroll */
}
section {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh; /* Use dynamic viewport height for mobile */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  box-sizing: border-box;
  position: relative;
}

section:last-of-type {
  min-height: auto; /* only take space it needs */
  padding: 30px 20px; /* smaller padding */
}

/* Navbar */
.navbar {
  width: 100%;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 10px 0;
}

.border {
  display: flex;
  gap: 15px;
  padding: 10px 20px;
  border-radius: 40px;
  border: 2px solid rgba(135, 0, 197, 0.7);
}

.navbar button {
  padding: 10px 20px;
  border: 2px solid rgba(135, 0, 197, 0.7);
  border-radius: 25px;
  background: rgba(0, 0, 0, 0.2);
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.navbar button:hover,
.navbar button.active {
  background: rgb(135, 0, 197);
  border-color: rgb(135, 0, 197);
  box-shadow: 0 0 12px rgb(135, 0, 197);
  transform: scale(1.05);
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 200;
}

.hamburger div {
  width: 25px;
  height: 3px;
  background: rgb(135, 0, 197);
  border-radius: 2px;
  transition: all 0.3s ease;
  position: relative;
  right: 0px;
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 40px;
  right: 15px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgb(135, 0, 197);
  border-radius: 10px;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  z-index: 150;
}

/* Fix for mobile rotation issues */
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh; /* Use min-height instead of height */
  font-family: Arial, sans-serif;
  background-color: black;
  scroll-behavior: smooth;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Improved section handling for mobile */
section {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh; /* Use dynamic viewport height for mobile */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  box-sizing: border-box;
  position: relative;
}

/* Ensure sections are visible during rotation */
@media (max-height: 500px) and (orientation: landscape) {
  section {
    min-height: auto;
    padding: 40px 20px;
    height: auto;
  }

  .hero {
    height: 100vh;
    height: 100dvh;
  }
}

/* Force sections to be visible on small screens */
@media (max-width: 768px), (max-height: 500px) {
  section {
    opacity: 1 !important;
    transform: none !important;
    display: flex !important;
  }

  .about .left,
  .about .right {
    opacity: 1 !important;
    transform: none !important;
  }

  .projects,
  .prices,
  .our-story,
  .support {
    opacity: 1 !important;
    transform: translateY(0) !important;
  }
}

/* Improve mobile menu for landscape */
@media (max-width: 768px) and (orientation: landscape) {
  .mobile-menu {
    max-height: 70vh;
    overflow-y: auto;
  }

  .hero-overlay h1 {
    font-size: 1.5rem;
    min-height: 2em;
  }
}

/* Better iframe handling on mobile */
@media (max-width: 768px) {
  iframe {
    pointer-events: auto; /* Allow interaction if needed */
  }

  .about .left iframe {
    height: 300px;
    max-width: 300px;
  }
}

/* Ensure cards are visible on all screens */
.cards {
  display: flex !important;
  visibility: visible !important;
}

/* Fix for very small screens */
@media (max-height: 400px) {
  section {
    padding: 20px 10px;
  }

  .projects-title,
  .prices-title,
  .our-story-title,
  .support-title {
    font-size: 2rem !important;
    margin-bottom: 20px !important;
  }
}

/* Improve mobile menu for landscape */
@media (max-width: 768px) and (orientation: landscape) {
  .mobile-menu {
    max-height: 70vh;
    overflow-y: auto;
  }

  .hero-overlay h1 {
    font-size: 1.5rem;
    min-height: 2em;
  }
}

@media (max-width: 768px) {
  .border {
    display: none;
  }
  .hamburger {
    display: flex;
  }
}

.hero {
  width: 100%;
  height: 100vh; /* Full viewport height */
  position: relative;
  overflow: hidden;
}

.hero iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  border: none;
  object-fit: cover;
}

/* Hero & About Section */
.hero,
.about {
  position: relative;
}

iframe {
  width: 100%;
  height: 100%;
  border: none;
  pointer-events: none;
  display: none;
  object-fit: cover;
}

/* Spinner */
.spinner {
  position: absolute;
  width: 60px;
  height: 60px;
  border: 6px solid rgba(135, 0, 197, 0.3);
  border-top: 6px solid rgb(135, 0, 197);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 5;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Hero Overlay for typing text */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* dim background */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  z-index: 10;
  display: none; /* hidden on large screens */
}

.hero-overlay h1 {
  font-size: clamp(1rem, 5vw, 3rem);
  margin-bottom: 20px;
  min-height: 3em;
  line-height: 1.3;
}

.hero-overlay .hero-btn {
  padding: 12px 24px;
  background: rgb(135, 0, 197);
  border: none;
  border-radius: 25px;
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: 0.3s;
}

.hero-overlay .hero-btn:hover {
  background: rgb(170, 0, 255);
  transform: scale(1.05);
}

@media (max-width: 1454px) {
  .hero {
    background-image: url("assets/cover.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }
  .hero-overlay {
    display: flex;
  }
}

/* About Section fade-in */
.about {
  display: flex;
  flex-direction: row;
  opacity: 0;
}

.about.show {
  opacity: 1;
  transition: opacity 1s ease;
}

.about .left iframe {
  width: 100%;
  max-width: 500px; /* 👈 make Earth bigger */
  height: 800px; /* 👈 square shape for globe */
  border: none;
  object-fit: contain;
}

.about .left,
.about .right {
  width: 50%;
  height: auto; /* ✅ let them expand */
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  opacity: 0;
  transform: translateX(0);
  transition: all 1s ease;
}

.about .left {
  transform: translateX(-100px);
}
.about .right {
  transform: translateX(100px);
}
.about .left.show {
  opacity: 1;
  transform: translateX(0);
}
.about .right.show {
  opacity: 1;
  transform: translateX(0);
}

.about-title {
  width: 100%;
  height: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(90deg, white, rgb(120, 19, 187));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.about-title h1 {
  font-size: 70px;
  margin: 0;
}

.about .right .about-text {
  width: 90%;
  height: auto; /* ✅ remove fixed height */
  color: white;
  text-align: center;
}

@media (max-width: 768px) {
  .about .left iframe {
    width: 90%;
    height: 350px; /* smaller height on small screens */
  }

  .about-title h1 {
    font-size: 40px; /* smaller text to prevent overlap */
  }
}

@media (max-width: 900px) {
  .about {
    flex-direction: column;
    align-items: center;
  }
  .about .left,
  .about .right {
    width: 100%;
    text-align: center;
  }
}

/* 📱 Mobile/Tablet: stack column */
@media (max-width: 1389px) {
  .about {
    flex-direction: column;
  }

  .about .left,
  .about .right {
    width: 100%;
    height: 50%;
  }
}

/* Projects Section */
.projects {
  width: 100%;
  min-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;

  opacity: 0;
  transform: translateY(50px);
  transition: all 1s ease;
}

.projects.show {
  opacity: 1;
  transform: translateY(0);
}

.projects-title {
  font-size: 3rem;
  background: linear-gradient(90deg, white, rgb(135, 0, 197));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 40px;
  text-align: center;
}

.cards {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgb(135, 0, 197);
  border-radius: 20px;
  padding: 20px;
  width: 300px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(135, 0, 197, 0.5);
}

.card img {
  width: 100%;
  border-radius: 15px;
  margin-bottom: 15px;
}

.card p {
  color: white;
  margin-bottom: 15px;
  font-size: 16px;
}

.card-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 25px;
  background: rgb(135, 0, 197);
  color: white;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
}

.card-btn:hover {
  background: rgb(170, 0, 255);
  transform: scale(1.05);
}

/* Prices Section */
.prices {
  width: 100%;
  min-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  opacity: 0;
  transform: translateY(50px);
  transition: all 1s ease;
}

.prices.show {
  opacity: 1;
  transform: translateY(0);
}

.prices-title {
  font-size: 3rem;
  background: linear-gradient(90deg, white, rgb(135, 0, 197));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 40px;
  text-align: center;
}

.prices .cards {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.prices .card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 2px solid rgb(135, 0, 197);
  border-radius: 20px;
  padding: 20px;
  width: 300px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.prices .card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(135, 0, 197, 0.5);
}

.prices .card h2 {
  color: white;
  font-size: 24px;
  margin-bottom: 10px;
}

.prices .price {
  font-size: 28px;
  color: rgb(135, 0, 197);
  margin-bottom: 15px;
}

.prices .card ul {
  list-style: none;
  padding: 0;
  color: white;
  text-align: left;
  margin-bottom: 15px;
}

.prices .card ul li {
  margin-bottom: 8px;
}

.prices .card-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 25px;
  background: rgb(135, 0, 197);
  color: white;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
}

.prices .card-btn:hover {
  background: rgb(170, 0, 255);
  transform: scale(1.05);
}

/* Our Story Section */
.our-story {
  width: 100%;
  min-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  opacity: 0;
  transform: translateY(50px);
  transition: all 1s ease;
  padding: 60px 20px;
}

.our-story.show {
  opacity: 1;
  transform: translateY(0);
}

.our-story-title {
  font-size: 3rem;
  background: linear-gradient(90deg, white, rgb(135, 0, 197));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 40px;
  text-align: center;
}

.story-images {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.story-images img {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgb(135, 0, 197);
  box-shadow: 0 8px 25px rgba(135, 0, 197, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.story-images img:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 35px rgba(135, 0, 197, 0.6);
}

.story-text {
  max-width: 800px;
  text-align: center;
  color: white;
  font-size: 1.2rem;
  line-height: 1.7;
  margin: 0 auto;
  padding: 0 15px;
}

/* Support / Footer Section */
.support {
  width: 100%;
  opacity: 0;
  transform: translateY(50px);
  transition: all 1s ease;
  /* Remove this line: background: #000; */
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative; /* Add this */
  z-index: 1; /* Add this */
}

.support-container {
  position: relative;
  z-index: 2;
}

.support.show {
  opacity: 1;
  transform: translateY(0);
}

.support-title {
  font-size: 3rem;
  background: linear-gradient(90deg, white, rgb(135, 0, 197));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 40px;
  text-align: center;
}

.support-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
}

.support-cards .card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 2px solid rgb(135, 0, 197);
  border-radius: 20px;
  padding: 25px;
  width: 250px;
  text-align: center;
  margin: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.support-cards .card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(135, 0, 197, 0.5);
}

.support-cards .card h2 {
  color: white;
  font-size: 22px;
  margin-bottom: 10px;
}

.support-cards .card p {
  color: white;
  font-size: 16px;
  margin-bottom: 15px;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-bottom: 50px;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(135, 0, 197, 0.1); /* subtle transparent purple */
  box-shadow: 0 0 15px rgba(135, 0, 197, 0.2);
  transition: all 0.4s ease;
  position: relative;
}

.social-icons a::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(135, 0, 197, 0.2);
  top: 0;
  left: 0;
  filter: blur(8px);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.social-icons a:hover::after {
  opacity: 1;
}

.social-icons a .icon {
  width: 30px;
  height: 30px;
  fill: rgb(135, 0, 197);
  transition: transform 0.3s ease;
}

.social-icons a:hover .icon {
  transform: scale(1.3);
}

.support p.copyright {
  display: flex;
  justify-content: center;
  align-items: end;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
}

/* Responsive */
@media (max-width: 900px) {
  .support-cards {
    flex-direction: column;
    align-items: center;
  }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
  .projects {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: none !important;
    display: flex !important;
  }

  .projects .cards {
    display: flex !important;
    visibility: visible !important;
  }
}

/* Additional fallback for older Safari versions */
_::-webkit-full-page-media,
_:future,
:root .projects {
  opacity: 1;
  transform: none;
}

/* iOS-specific media query */
@media screen and (max-width: 768px) {
  .projects {
    min-height: auto;
    padding: 40px 0;
  }

  .projects .cards {
    flex-direction: column;
    align-items: center;
  }

  .card {
    margin-bottom: 20px;
    width: 90%;
    max-width: 300px;
  }
}

.ios-fallback {
  display: flex !important;
}

.stars-bg {
  position: relative;
  width: 100%;
  background: black;
  overflow: hidden;
  z-index: 0;
}

.stars-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: -1;
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  opacity: 0.8;
  animation: twinkle 2s infinite alternate;
  z-index: -1;
}

@keyframes twinkle {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* Ensure sections inside stars-bg have proper z-index */
.stars-bg section {
  position: relative;
  z-index: 1;
}

/* Make sure stars container covers all sections */
.stars-container {
  position: relative;
  width: 100%;
  min-height: 100vh;
}
