/* Theme variables are now handled by theme-system.css */

html, body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* Critical for mobile */
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  /* Remove scroll-behavior: smooth from here if it causes mobile lag */
}

/* Performance optimizations for scroll animations - applied via JavaScript */

.show-on-scroll {
  transform: translate3d(0, 0, 0);
  will-change: transform, opacity;
  backface-visibility: hidden;
}

/* Optimize CSS animations and transitions for smooth scrolling */
/* Removed global transform rule that was causing layout issues */

/* Apply smooth scrolling only to html, and disable on mobile for performance */
html {
  scroll-behavior: smooth;
}

@media (max-width: 768px) {
  html {
    scroll-behavior: auto; /* Native scroll is smoother on mobile */
  }
}

/* Optimize transitions for better performance */
.swiper-container,
.swiper-slide,
.metric-card,
.event-card,
.update-card {
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

/* Optimize scroll-triggered opacity animations */
[data-scroll] {
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .rellax,
  .show-on-scroll,
  [data-scroll] {
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
}

/* Section padding is now handled in spacing-system.css */

.section-heading {
  max-width: 760px;
  margin: 0 auto var(--spacing-2xl);
  text-align: center;
}

.section-heading h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 3vw + 1rem, 3.75rem);
  margin-bottom: var(--spacing-md);
  letter-spacing: 1.4px;
}

.section-heading p {
  margin: 0;
  color: var(--text-secondary);
  font-size: clamp(1rem, 0.9rem + 0.25vw, 1.2rem);
}


/* /////////////Hero Section/////////////// */

.hero {
  width: 100%; /* Changed from 100vw */
  height: 100vh; /* Fallback for old browsers */
  height: 100dvh; /* Modern fix: Dynamic Viewport Height */
  background-image: url(./assets/home_parallax/Background.jpg);
  background-size: cover;
  background-position: center center;
  position: relative;
  z-index: 1;
  overflow: hidden; /* Critical to cut off the wide parallax layers */
  min-height: 600px;
  /* Performance fix for mobile painting */
  transform: translateZ(0);
  will-change: transform;
}

.img-container {
  width: 100%;
  height: 30%;
  z-index: 1;
  position: absolute;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  /* Hardware acceleration for parallax elements - only apply when needed */
}

.on-load img {
  -webkit-animation: appear 1400ms cubic-bezier(0.34, 1.56, 0.64, 1) 0s 1 normal;
  animation: appear 1400ms cubic-bezier(0.34, 1.56, 0.64, 1) 0s 1 normal;
}

@-webkit-keyframes appear {

  0%,
  40% {
    opacity: 0;
    -webkit-transform: translateY(30%) scale(0.5);
    transform: translateY(30%) scale(0.5);
  }

  100% {
    opacity: 1;
    -webkit-transform: translateY(0%) scale(0.5);
    transform: translateY(0%) scale(0.5);
  }
}

@keyframes appear {

  0%,
  40% {
    opacity: 0;
    -webkit-transform: translateY(30%) scale(0.5);
    transform: translateY(30%) scale(0.5);
  }

  100% {
    opacity: 1;
    -webkit-transform: translateY(0%) scale(0.5);
    transform: translateY(0%) scale(0.5);
  }
}

.img-container img {
  -webkit-transform: scale(0.5);
  -ms-transform: scale(0.5);
  transform: scale(0.5);
}

img[src="./assets/aerokleimgs/INThrust_1.png"] {
  position: absolute;
  top: 25vh;
}

.layer2 {
  width: 100%;
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 0;
  min-height: 40vh;
  object-fit: cover;
  object-position: bottom;
}

.layer1 {
  width: 100%;
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 0;
  min-height: 40vh;
  object-fit: cover;
  object-position: bottom;
}

.trees {
  width: 100vw;
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 2;
  min-height: 50vh;
  object-fit: cover;
  object-position: bottom;
}

/* Improved responsive positioning for parallax layers */
@media (max-width: 1250px) {
  .layer2 {
    bottom: 0;
    min-height: 45vh;
  }

  .layer1 {
    bottom: 0;
    min-height: 45vh;
  }

  .trees {
    bottom: 0;
    min-height: 55vh;
  }
}

@media (max-width: 1050px) {
  .layer2 {
    bottom: 0;
    min-height: 50vh;
  }

  .layer1 {
    bottom: 0;
    min-height: 50vh;
  }

  .trees {
    bottom: 0;
    min-height: 60vh;
  }
}

@media (max-width: 950px) {
  @-webkit-keyframes appear {

    0%,
    40% {
      opacity: 0;
      -webkit-transform: translateY(30%) scale(0.4);
      transform: translateY(30%) scale(0.4);
    }

    100% {
      opacity: 1;
      -webkit-transform: translateY(0%) scale(0.4);
      transform: translateY(0%) scale(0.4);
    }
  }

  @keyframes appear {

    0%,
    40% {
      opacity: 0;
      -webkit-transform: translateY(30%) scale(0.4);
      transform: translateY(30%) scale(0.4);
    }

    100% {
      opacity: 1;
      -webkit-transform: translateY(0%) scale(0.4);
      transform: translateY(0%) scale(0.4);
    }
  }

  .img-container img {
    -webkit-transform: scale(0.4);
    -ms-transform: scale(0.4);
    transform: scale(0.4);
  }

  img[src="./assets/aerokleimgs/INThrust_1.png"] {
    position: absolute;
    top: 22vh;
  }

  .hero {
    height: 100vh;
    min-height: 600px;
  }

  .layer2 {
    bottom: 0;
    min-height: 50vh;
  }

  .layer1 {
    bottom: 0;
    min-height: 50vh;
  }

  .trees {
    bottom: 0;
    min-height: 60vh;
  }
}

@media (max-width: 750px) {
  @-webkit-keyframes appear {

    0%,
    40% {
      opacity: 0;
      -webkit-transform: translateY(30%) scale(0.3);
      transform: translateY(30%) scale(0.3);
    }

    100% {
      opacity: 1;
      -webkit-transform: translateY(0%) scale(0.3);
      transform: translateY(0%) scale(0.3);
    }
  }

  @keyframes appear {

    0%,
    40% {
      opacity: 0;
      -webkit-transform: translateY(30%) scale(0.3);
      transform: translateY(30%) scale(0.3);
    }

    100% {
      opacity: 1;
      -webkit-transform: translateY(0%) scale(0.3);
      transform: translateY(0%) scale(0.3);
    }
  }

  .layer2 {
    width: 150vw;
    left: -25%;
    bottom: 0;
    min-height: 50vh;
  }

  .layer1 {
    width: 160vw;
    left: -30%;
    bottom: 0;
    min-height: 50vh;
  }

  .trees {
    width: 150%;
    left: -25%;
    bottom: 0;
    min-height: 65vh;
  }

  .img-container img {
    -webkit-transform: scale(0.3);
    -ms-transform: scale(0.3);
    transform: scale(0.3);
  }

  .img-container {
    margin-top: 30px;
  }

  img[src="./assets/aerokleimgs/INThrust_1.png"] {
    position: absolute;
    top: 18vh;
  }
}

@media (max-width: 630px) {
  .trees {
    width: 125%;
    left: -15%;
    bottom: 0;
    min-height: 65vh;
  }
}

@media (max-width: 550px) {
  @-webkit-keyframes appear {

    0%,
    40% {
      opacity: 0;
      -webkit-transform: translateY(30%) scale(0.25);
      transform: translateY(30%) scale(0.25);
    }

    100% {
      opacity: 1;
      -webkit-transform: translateY(0%) scale(0.25);
      transform: translateY(0%) scale(0.25);
    }
  }

  @keyframes appear {

    0%,
    40% {
      opacity: 0;
      -webkit-transform: translateY(30%) scale(0.25);
      transform: translateY(30%) scale(0.25);
    }

    100% {
      opacity: 1;
      -webkit-transform: translateY(0%) scale(0.25);
      transform: translateY(0%) scale(0.25);
    }
  }

  .img-container img {
    -webkit-transform: scale(0.25);
    -ms-transform: scale(0.25);
    transform: scale(0.25);
  }

  .img-container {
    margin-top: 80px;
    height: 28%;
  }

  img[src="./assets/aerokleimgs/INThrust_1.png"] {
    position: absolute;
    top: 16vh;
  }

  .layer2 {
    bottom: 0;
    width: 170vw;
    left: -35%;
    min-height: 50vh;
  }

  .layer1 {
    bottom: 0;
    width: 180vw;
    left: -40%;
    min-height: 50vh;
  }

  .trees {
    width: 180%;
    left: -40%;
    bottom: 0;
    min-height: 70vh;
  }
}

@media (max-width: 450px) {
  @-webkit-keyframes appear {

    0%,
    40% {
      opacity: 0;
      -webkit-transform: translateY(30%) scale(0.2);
      transform: translateY(30%) scale(0.2);
    }

    100% {
      opacity: 1;
      -webkit-transform: translateY(0%) scale(0.2);
      transform: translateY(0%) scale(0.2);
    }
  }

  @keyframes appear {

    0%,
    40% {
      opacity: 0;
      -webkit-transform: translateY(30%) scale(0.2);
      transform: translateY(30%) scale(0.2);
    }

    100% {
      opacity: 1;
      -webkit-transform: translateY(0%) scale(0.2);
      transform: translateY(0%) scale(0.2);
    }
  }

  .img-container img {
    -webkit-transform: scale(0.2);
    -ms-transform: scale(0.2);
    transform: scale(0.2);
  }

  .img-container {
    margin-top: 60px;
    height: 25%;
  }

  img[src="./assets/aerokleimgs/INThrust_1.png"] {
    position: absolute;
    top: 14vh;
  }

  .hero {
    height: 100vh;
    min-height: 650px;
    overflow: hidden;
  }

  .layer2 {
    bottom: 0 !important;
    top: auto !important;
    width: 250vw;
    left: -75%;
    min-height: 65vh;
  }

  .layer1 {
    bottom: 0 !important;
    top: auto !important;
    width: 270vw;
    left: -85%;
    min-height: 65vh;
  }

  .trees {
    bottom: 0 !important;
    top: auto !important;
    width: 270%;
    left: -85%;
    min-height: 85vh;
  }
}

/* //////////////////////////// */

.about {
  position: relative;
  z-index: 2;
}

.about-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.metric-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: var(--spacing-2xl) var(--spacing-lg);
  text-align: left;
  box-shadow: 0 16px 28px rgba(8, 12, 30, 0.35);
}

.metric-card h3 {
  margin: 0 0 var(--spacing-md);
  font-size: clamp(2.5rem, 2rem + 0.75vw, 3rem);
  color: var(--accent);
  font-family: var(--font-heading);
}

.metric-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}

.about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  justify-content: center;
  margin-top: var(--spacing-xl);
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.4px;
  transition: color 0.2s ease, transform 0.2s ease;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: 6px;
}

.primary-link {
  color: var(--accent);
}

.primary-link:hover {
  color: var(--accent-hover);
  transform: translateY(-2px);
}

.secondary-link {
  color: var(--accent-secondary);
}

.secondary-link:hover {
  color: var(--accent-hover);
  transform: translateY(-2px);
}

/* ///////////////////////// */

.swiper-container {
  width: 100vw;
  height: 70vh;
  margin: 0 auto;
  opacity: 0;
  -webkit-transform: translateY(30px);
  -ms-transform: translateY(30px);
  transform: translateY(30px);
}

.swiper-container[data-scroll="in"] {
  opacity: 1;
  -webkit-transform: translateY(0px);
  -ms-transform: translateY(0px);
  transform: translateY(0px);
  -webkit-transition: opacity 0.5s ease-out 0.3s,
    -webkit-transform 0.5s ease-out 0.3s;
  transition: opacity 0.5s ease-out 0.3s, -webkit-transform 0.5s ease-out 0.3s;
  -o-transition: opacity 0.5s ease-out 0.3s, transform 0.5s ease-out 0.3s;
  transition: opacity 0.5s ease-out 0.3s, transform 0.5s ease-out 0.3s;
  transition: opacity 0.5s ease-out 0.3s, transform 0.5s ease-out 0.3s,
    -webkit-transform 0.5s ease-out 0.3s;
}

.swiper-slide {
  text-align: center;
  font-size: 18px;
  background: #000;
  color: whitesmoke;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.subs {
  background-color: black;
}

.subs h1 {
  /* position: absolute;
    z-index: 10; */
  width: 100%;
  background-color: #000;
  text-align: center;
  opacity: 0;
  -webkit-transform: translateY(10px);
  -ms-transform: translateY(10px);
  transform: translateY(10px);
  color: white;
  padding-bottom: 30px;
}

.subs h1[data-scroll="in"] {
  opacity: 1;
  -webkit-transform: translateY(0px);
  -ms-transform: translateY(0px);
  transform: translateY(0px);
  -webkit-transition: opacity 0.5s ease-out 0.2s,
    -webkit-transform 0.5s ease-out 0.2s;
  transition: opacity 0.5s ease-out 0.2s, -webkit-transform 0.5s ease-out 0.2s;
  -o-transition: opacity 0.5s ease-out 0.2s, transform 0.5s ease-out 0.2s;
  transition: opacity 0.5s ease-out 0.2s, transform 0.5s ease-out 0.2s;
  transition: opacity 0.5s ease-out 0.2s, transform 0.5s ease-out 0.2s,
    -webkit-transform 0.5s ease-out 0.2s;
}

.swiper-button-next {
  opacity: 0;
  -webkit-transform: translateX(20px);
  -ms-transform: translateX(20px);
  transform: translateX(20px);
}

.swiper-button-next[data-scroll="in"] {
  opacity: 1;
  -webkit-transform: translateX(0px);
  -ms-transform: translateX(0px);
  transform: translateX(0px);
  -webkit-transition: opacity 0.4s ease-out 0.3s,
    -webkit-transform 0.4s ease-out 0.2s;
  transition: opacity 0.4s ease-out 0.3s, -webkit-transform 0.4s ease-out 0.2s;
  -o-transition: opacity 0.4s ease-out 0.3s, transform 0.4s ease-out 0.2s;
  transition: opacity 0.4s ease-out 0.3s, transform 0.4s ease-out 0.2s;
  transition: opacity 0.4s ease-out 0.3s, transform 0.4s ease-out 0.2s,
    -webkit-transform 0.4s ease-out 0.2s;
}

.swiper-button-prev {
  opacity: 0;
  -webkit-transform: translateX(-20px);
  -ms-transform: translateX(-20px);
  transform: translateX(-20px);
}

.swiper-button-prev[data-scroll="in"] {
  opacity: 1;
  -webkit-transform: translateX(0px);
  -ms-transform: translateX(0px);
  transform: translateX(0px);
  -webkit-transition: opacity 0.4s ease-out 0.3s,
    -webkit-transform 0.4s ease-out 0.2s;
  transition: opacity 0.4s ease-out 0.3s, -webkit-transform 0.4s ease-out 0.2s;
  -o-transition: opacity 0.4s ease-out 0.3s, transform 0.4s ease-out 0.2s;
  transition: opacity 0.4s ease-out 0.3s, transform 0.4s ease-out 0.2s;
  transition: opacity 0.4s ease-out 0.3s, transform 0.4s ease-out 0.2s,
    -webkit-transform 0.4s ease-out 0.2s;
}

.swiper .row {
  height: 100%;
}

.swiper-slide .row p {
  width: 80%;
}

.swiper-slide .row .col-md-7 {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.swiper-slide .row img {
  -o-object-fit: cover;
  object-fit: cover;
  -webkit-transform: scale(0.6);
  -ms-transform: scale(0.6);
  transform: scale(0.6);
}

.swiper-slide .row .col-md-5 {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

@media (max-width: 1100px) {
  .swiper-slide .row p {
    font-size: 15px;
  }

  .swiper-slide .row img {
    -webkit-transform: scale(0.5);
    -ms-transform: scale(0.5);
    transform: scale(0.5);
  }
}

@media (max-width: 900px) {
  .swiper-slide .row p {
    font-size: 15px;
  }

  .swiper-slide .row img {
    -webkit-transform: scale(0.4);
    -ms-transform: scale(0.4);
    transform: scale(0.4);
  }
}

@media (max-width: 768px) {
  .image {
    height: 40vh;
  }

  .swiper-container {
    height: 70vh;
  }
}

@media (max-width: 500px) {
  .swiper-slide .row img {
    -webkit-transform: scale(0.3);
    -ms-transform: scale(0.3);
    transform: scale(0.3);
  }

  .swiper-slide .row p {
    font-size: 15px;
  }

  .swiper-slide .row h4 {
    font-size: 20px;
  }

  .swiper-container {
    height: 60vh;
  }
}

@media (max-width: 400px) {
  .swiper-slide .row img {
    -webkit-transform: scale(0.25);
    -ms-transform: scale(0.25);
    transform: scale(0.25);
  }

  .swiper-container {
    height: 65vh;
  }
}

.red {
  color: var(--accent);
}

/* /////////////////// */

/* @media(max-width: 560px){
    .video iframe{
        width: 95%;
        height: width;
    }
} */

/* /////////////////// */

.events {
  position: relative;
  z-index: 2;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--spacing-lg);
  max-width: 50%;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .events-grid {
    max-width: 100%;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin: 0;
  }
}

.event-card {
  background: linear-gradient(145deg, rgba(18, 30, 66, 0.9), rgba(6, 12, 30, 0.85));
  border-radius: 20px;
  padding: var(--spacing-xl) var(--spacing-lg);
  border: 1px solid var(--border-soft);
  box-shadow: 0 20px 36px rgba(4, 10, 26, 0.45);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.event-card h3 {
  margin: 0;
  font-family: var(--font-heading);
  letter-spacing: 0.6px;
  font-size: clamp(1.4rem, 1.2rem + 0.4vw, 1.875rem);
}

.event-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
}

.event-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.event-card ul li+li {
  margin-top: 8px;
}

.event-card .primary-link,
.event-card .secondary-link {
  align-self: flex-start;
}

/* /////////////////// */

.updates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--spacing-lg);
}

.update-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: var(--spacing-lg);
  box-shadow: 0 18px 32px rgba(3, 6, 18, 0.4);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.update-card time {
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  display: block;
  margin-bottom: var(--spacing-sm);
  padding-bottom: var(--spacing-xs);
}

.update-card h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 1.1rem + 0.3vw, 1.6rem);
}

.update-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
}

.update-card .secondary-link {
  margin-top: auto;
}

/* Card actions spacing */
.card-actions {
  margin-top: auto;
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.card-actions a {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
}

/* /////////////////// */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1fr);
  gap: var(--spacing-2xl);
  align-items: start;
}

.contact-details h3,
.contact-form-wrapper h3 {
  font-family: var(--font-heading);
  margin: 0 0 var(--spacing-md);
  font-size: clamp(1.5rem, 1.3rem + 0.4vw, 2rem);
}

.contact-details ul {
  list-style: none;
  margin: 0 0 var(--spacing-lg);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.contact-details li {
  color: var(--text-secondary);
  font-size: 1rem;
}

.contact-details li span {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.contact-details a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

.contact-details a:hover {
  color: var(--accent-hover);
  transform: translateY(-1px);
}

/* Enhanced contact link styling for mailto and tel links */
.contact-details a[href^="mailto:"],
.contact-details a[href^="tel:"] {
  position: relative;
  padding: 2px 0;
}

.contact-details a[href^="mailto:"]:hover,
.contact-details a[href^="tel:"]:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent-hover);
  text-underline-offset: 4px;
}

.contact-social {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.contact-social a {
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.contact-social a:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.contact-form {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: var(--spacing-xl);
  display: grid;
  gap: var(--spacing-lg);
  box-shadow: 0 22px 38px rgba(5, 9, 24, 0.45);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.form-group label {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea {
  font: inherit;
  padding: var(--spacing-md) var(--spacing-md);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(4, 10, 26, 0.65);
  color: var(--text-primary);
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(193, 0, 0, 0.25);
}

.join-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: 999px;
  border: none;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.join-btn:hover {
  transform: translateY(-2px);
  background: var(--accent-hover);
  box-shadow: 0 18px 32px rgba(193, 0, 0, 0.3);
}

.join-btn:active {
  transform: translateY(0);
}

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: var(--spacing-lg);
  }
}

@media (max-width: 640px) {
  .about-actions {
    flex-direction: column;
    align-items: center;
  }

  .updates-grid,
  .events-grid {
    gap: var(--spacing-md);
  }

  .metric-card {
    padding: var(--spacing-lg) var(--spacing-md);
  }

  .contact-form {
    padding: var(--spacing-lg);
  }
}

/* === Contact section color adjustments (issue: set black background and lighter form) === */
.contact {
  background-color: #000000;
  /* Pure black for the Contact AeroKLE section */
}

/* Lighter-than-black card for "Send Us a Note" */
.contact-form {
  background-color: #121212;
  /* Slightly lighter than section background for contrast */
  border-color: rgba(255, 255, 255, 0.08);
}

/* === About section background adjustment per request === */
.about {
  background-color: #000000;
  /* Pure black for the About Us section */
}

/* === Improve legibility of the red email link in Contact section === */
/* Softer red tone, larger size, and slightly heavier weight for readability */
.contact-details a[href^="mailto:"] {
  color: #ff1f1f;
  /* softer coral red (less harsh on black) */
  font-size: 1.2rem;
  /* larger for readability (meets AA as bold large text) */
  font-weight: 600;
  /* thicker glyphs reduce "spiky" feel */
  letter-spacing: 0.2px;
}

/* Keep the gentle underline but match the softer hover color */
.contact-details a[href^="mailto:"]:hover {
  color: #ff0000;
  text-decoration: underline;
  text-decoration-color: #ff0000;
  text-underline-offset: 4px;
}


/* === News & Events and Latest Updates backgrounds (set to pure black) === */
.events {
  background-color: #000000;
}

.updates {
  background-color: #000000;
}

/* === Align CTA/link colors to match current email styling === */
/* Apply to primary and secondary inline links (e.g., "Apply for the next cohort", "Register your interest") */
.primary-link,
.secondary-link {
  color: #ff1f1f;
  /* same as email default */
}

.primary-link:hover,
.secondary-link:hover {
  color: #ff0000;
  /* same as email hover */
}

/* Phone link color to match email styling */
.contact-details a[href^="tel:"] {
  color: #ff1f1f;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.contact-details a[href^="tel:"]:hover {
  color: #ff0000;
  text-decoration: underline;
  text-decoration-color: #ff0000;
  text-underline-offset: 4px;
}

/* Additional mobile fixes for very small screens */
@media (max-width: 400px) {
  .hero {
    height: 100vh;
    min-height: 650px;
  }

  .img-container {
    margin-top: 50px;
    height: 25%;
  }

  .img-container img {
    -webkit-transform: scale(0.18);
    -ms-transform: scale(0.18);
    transform: scale(0.18);
  }

  img[src="./assets/aerokleimgs/INThrust_1.png"] {
    top: 13vh;
  }

  .layer2 {
    bottom: 0 !important;
    top: auto !important;
    width: 260vw;
    left: -80%;
    min-height: 70vh;
  }

  .layer1 {
    bottom: 0 !important;
    top: auto !important;
    width: 280vw;
    left: -90%;
    min-height: 70vh;
  }

  .trees {
    bottom: 0 !important;
    top: auto !important;
    width: 280%;
    left: -90%;
    min-height: 90vh;
  }
}

@media (max-width: 375px) {
  .hero {
    height: 100vh;
    min-height: 650px;
  }

  .img-container {
    margin-top: 50px;
    height: 24%;
  }

  .img-container img {
    -webkit-transform: scale(0.17);
    -ms-transform: scale(0.17);
    transform: scale(0.17);
  }

  img[src="./assets/aerokleimgs/INThrust_1.png"] {
    top: 12vh;
  }

  .layer2 {
    bottom: 0 !important;
    top: auto !important;
    width: 280vw;
    left: -90%;
    min-height: 75vh;
  }

  .layer1 {
    bottom: 0 !important;
    top: auto !important;
    width: 300vw;
    left: -100%;
    min-height: 75vh;
  }

  .trees {
    bottom: 0 !important;
    top: auto !important;
    width: 300%;
    left: -100%;
    min-height: 95vh;
  }
}

/* Fix for landscape mobile orientation */
@media (max-width: 850px) and (max-height: 500px) {
  .hero {
    height: 100vh;
    min-height: 500px;
  }

  .img-container {
    margin-top: 40px;
    height: 35%;
  }

  .trees {
    bottom: 0;
    min-height: 50vh;
  }

  .layer1 {
    bottom: 0;
    min-height: 45vh;
  }

  .layer2 {
    bottom: 0;
    min-height: 45vh;
  }
}

/* Ensure proper overflow handling on mobile */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .hero {
    overflow: hidden;
    position: relative;
    min-height: 600px;
  }

  .layer1,
  .layer2,
  .trees {
    overflow: hidden;
    object-fit: cover;
    object-position: bottom;
  }
}

/* Fix mobile bottom gaps - ensure layers extend to bottom - REMOVED DUPLICATE */

/* Ensure all parallax layers have proper height on mobile */
@media (max-width: 768px) {

  .layer1,
  .layer2,
  .trees {
    min-height: 50vh;
    object-fit: cover;
    object-position: bottom;
  }

  .hero {
    position: relative;
    overflow: hidden;
    min-height: 600px;
  }
}

/* Extra wide mobile layers - REMOVED DUPLICATE */

/* Ensure no horizontal gaps on any mobile device */
@media (max-width: 768px) {

  .layer1,
  .layer2,
  .trees {
    min-width: 150vw;
    bottom: 0 !important;
    top: auto !important;
  }
}

/* Critical fix for 320px-450px range */
@media (max-width: 450px) and (min-width: 320px) {
  body {
    overflow-x: hidden;
  }

  .hero {
    height: 100vh;
    min-height: 650px;
    overflow: hidden;
    position: relative;
  }

  .layer1,
  .layer2,
  .trees {
    position: absolute;
    bottom: 0 !important;
    top: auto !important;
    object-fit: cover;
    object-position: bottom;
  }
}

/* Extra small devices (320px and below) */
@media (max-width: 320px) {
  .hero {
    height: 100vh;
    min-height: 700px;
  }

  .img-container {
    margin-top: 40px;
    height: 22%;
  }

  .img-container img {
    -webkit-transform: scale(0.15);
    -ms-transform: scale(0.15);
    transform: scale(0.15);
  }

  img[src="./assets/aerokleimgs/INThrust_1.png"] {
    top: 11vh;
  }

  .layer2 {
    bottom: 0 !important;
    top: auto !important;
    width: 300vw;
    left: -100%;
    min-height: 80vh;
  }

  .layer1 {
    bottom: 0 !important;
    top: auto !important;
    width: 320vw;
    left: -110%;
    min-height: 80vh;
  }

  .trees {
    bottom: 0 !important;
    top: auto !important;
    width: 320%;
    left: -110%;
    min-height: 100vh;
  }
}

/* Specific fix for 1920x1200 resolution */
@media (min-width: 1900px) and (min-height: 1180px) and (max-height: 1220px) {
  .hero {
    height: 100vh;
  }

  .layer2,
  .layer1,
  .trees {
    bottom: 0;
    min-height: 45vh;
  }
}
/* =====
==============================
   ADDITIONAL FIXES FOR SCROLL ISSUES
   Tablet and Mobile Viewport Fixes
   ================================= */

/* Tablet portrait and landscape fixes (1920x1200, iPad Pro, etc.) */
@media (min-width: 768px) and (max-width: 1920px) and (min-height: 900px) and (max-height: 1300px) {
  .hero {
    height: 100vh;
    min-height: 700px;
  }

  .layer2,
  .layer1 {
    bottom: 0;
    min-height: 45vh;
    width: 100%;
  }

  .trees {
    bottom: 0;
    min-height: 50vh;
    width: 100%;
  }
}

/* iPad Pro and similar tablets in portrait */
@media (min-width: 1024px) and (max-width: 1366px) and (orientation: portrait) {
  .hero {
    height: 100vh;
    min-height: 800px;
  }

  .layer2,
  .layer1,
  .trees {
    bottom: 0;
    width: 100%;
  }

  .layer2,
  .layer1 {
    min-height: 50vh;
  }

  .trees {
    min-height: 55vh;
  }
}

/* Ensure layers always anchor to bottom on all devices */
.hero .layer1,
.hero .layer2,
.hero .trees {
  position: absolute;
  bottom: 0;
  object-fit: cover;
  object-position: bottom;
}

/* Prevent parallax layers from creating gaps */
@media (max-width: 1920px) {
  .hero {
    position: relative;
    overflow: hidden;
  }

  .layer1,
  .layer2,
  .trees {
    bottom: 0 !important;
  }
}

/* Fix for ultra-wide and non-standard aspect ratios */
@media (min-aspect-ratio: 16/10) and (max-aspect-ratio: 21/9) {
  .hero {
    height: 100vh;
  }

  .layer2,
  .layer1 {
    min-height: 40vh;
  }

  .trees {
    min-height: 45vh;
  }
}

/* Specific fix for common tablet resolutions */
@media (width: 768px) and (height: 1024px),
       (width: 1024px) and (height: 768px),
       (width: 810px) and (height: 1080px),
       (width: 1080px) and (height: 810px),
       (width: 834px) and (height: 1194px),
       (width: 1194px) and (height: 834px) {
  .hero {
    height: 100vh;
    min-height: 700px;
  }

  .layer2,
  .layer1,
  .trees {
    bottom: 0;
  }
}

/* Ensure smooth scrolling doesn't interfere with parallax */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Performance optimization: disable parallax on low-end devices */
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .rellax {
    transform: none !important;
  }
}

/* ==============================================
   MOBILE STABILIZATION PATCH
   Paste this at the very bottom of index.css
   ============================================== */
@media (max-width: 1024px) {
  /* 1. Enable parallax on mobile but with reduced motion */
  .rellax {
    will-change: transform;
  }

  /* 2. Lock layers to the bottom securely */
  .layer1,
  .layer2,
  .trees {
    position: absolute;
    bottom: 0 !important;
    top: auto !important;
    left: 50% !important; /* Center the image */
    transform: translateX(-50%) !important; /* Center alignment */
    width: auto !important; /* Stop the 250vw width causing issues */
    min-width: 100%; /* Ensure it covers width */
    min-height: 60vh; /* Ensure it covers height */
    max-width: none !important;
    object-fit: cover;
  }

  /* 3. Adjust specific layer sizing for depth */
  .trees {
    z-index: 3;
    min-height: 70vh; /* Trees need to be taller */
  }

  /* 4. Fix the Hero Container on Mobile */
  .hero {
    height: 100dvh; /* Use dynamic height */
    min-height: 600px; /* Fallback for older browsers */
    overflow: hidden;
  }

  /* 5. Fix the Logo/Title Image Position */
  .img-container {
    position: absolute;
    top: 30%; /* distinct from parallax layers */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: auto;
    z-index: 10;
  }

  .img-container img {
    /* Simplify the transform to just scaling */
    transform: scale(0.35);
  }
}

/* Extra tweak for very small phones to prevent image overlap */
@media (max-width: 480px) {
  .trees { min-height: 50vh; }
  .layer1 { min-height: 40vh; }
  .layer2 { min-height: 40vh; }
  .img-container img {
    transform: scale(0.25);
  }
}
