/* Large Devices (Desktop) */
@media (max-width: 1200px) {
  #nav {
      padding: 0 50px;
  }

  #page1 h1 {
      font-size: 90px;
  }

  #page1 p {
      width: 70%;
  }

  #card-container {
      gap: 30px;
  }

  .card {
      width: 30%;
  }

  #page-3 {
      padding: 30px 50px;
  }

  #page-3 img {
      height: 400px;
      width: 500px;
  }
}

/* Medium Devices (Tablets) */
@media (max-width: 768px) {
  #nav {
      padding: 0 20px;
      height: 80px;
  }

  #nav img {
      height: 50px;
  }

  #nav ul {
      display: none; /* Consider adding a hamburger menu for mobile */
  }

  #page1 h1 {
      font-size: 60px;
  }

  #page1 h2 {
      font-size: 24px;
  }

  #page1 p {
      width: 90%;
      font-size: 16px;
  }

  #scroller h4 {
      font-size: 80px;
  }

  #aboutus {
      flex-direction: column;
      height: auto;
      padding: 50px 20px;
  }

  #about-us-in {
      width: 100%;
      margin: 30px 0;
  }

  #about-us-in h3 {
      font-size: 40px;
  }

  #card-container {
      flex-direction: column;
      height: auto;
      padding: 50px 0;
  }

  .card {
      width: 80%;
      height: 300px;
  }

  #green-div {
      flex-direction: column;
      height: auto;
      padding: 50px 20px;
  }

  #green-div h4 {
      width: 100%;
      font-size: 24px;
      line-height: 35px;
  }

  #green-div img {
      width: 30%;
      margin: 20px 0;
  }

  #page-3 {
      flex-direction: column;
      height: auto;
      padding: 50px 20px;
  }

  #page-3 img {
      width: 100%;
      height: auto;
  }

  .text-3 {
      width: 100%;
      padding: 30px 0;
  }

  #page-4 > p {
      width: 90%;
      font-size: 24px;
  }

  #page-5 {
      flex-direction: column;
      height: auto;
      padding: 50px 20px;
      gap: 30px;
  }

  #page-5 h1 {
      font-size: 40px;
      position: relative;
      margin-bottom: 30px;
  }

  .elem {
      width: 90%;
      height: 300px;
  }

  #fotter {
      height: auto;
      padding: 50px 20px;
  }

  #f1, #f2 {
      position: relative;
      left: 0;
      top: 0;
      margin: 20px 0;
  }

  #f2 li a {
      font-size: 24px;
  }
}

/* Small Devices (Mobile) */
@media (max-width: 480px) {
  #page1 h1 {
      font-size: 40px;
  }

  #page1 h1::before {
      font-size: 40px;
  }

  #page1 #arrow {
      height: 60px;
      width: 60px;
  }

  #page1 #arrow i {
      font-size: 30px;
  }

  #scroller h4 {
      font-size: 50px;
  }

  #aboutus img {
      height: 150px;
      width: 150px;
  }

  .card {
      width: 90%;
  }

  .overlay h4 {
      font-size: 24px;
  }

  .overlay p {
      font-size: 14px;
  }

  #page-4 > p {
      font-size: 18px;
      line-height: 28px;
  }

  #colon1, #colon2 {
      height: 30px;
  }

  .elem h4 {
      font-size: 30px;
  }

  #fotter p {
      font-size: 16px;
  }
}

/* Handle cursor only on desktop */
@media (max-width: 768px) {
  #cursor, #cursor-blur {
      display: none;
  }
}

/* Handle video background */
@media (max-width: 768px) {
  video {
      object-fit: cover;
      height: 100vh;
  }
}

/* Improve touch targets on mobile */
@media (max-width: 768px) {
  button, 
  .card,
  #f2 li a {
      padding: 12px;
      min-height: 44px;
  }
}

/* Add hamburger menu for mobile */
@media (max-width: 768px) {
  #nav {
      justify-content: space-between;
  }

  /* Add hamburger icon */
  .hamburger {
      display: block;
      cursor: pointer;
  }

  /* Style for mobile menu when active */
  #nav.active ul {
      display: flex;
      flex-direction: column;
      position: absolute;
      top: 80px;
      left: 0;
      width: 100%;
      background: rgba(0, 0, 0, 0.9);
      padding: 20px;
  }

  #nav.active ul li {
      margin: 10px 0;
  }
}

/* Improve performance on mobile */
@media (max-width: 768px) {
  * {
      -webkit-tap-highlight-color: transparent;
  }

  .card, .elem {
      transform: none !important;
  }
}