/* === Global Theme Variables === */
:root {
  --bg-dark: #0b0c10;
  --text-light: #ffffff;
  --accent: #577BC1;
  --bg-light: #ffffff;
  --transition: 0.3s ease;
  background-color: var(--bg-dark);
  color: var(--text-light);
}

/* === Base Styles === */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-light);
  transition: background-color var(--transition), color var(--transition);
  scroll-behavior: smooth;
}

body > main {
  flex: 1;
}

body.home > main {
  scroll-snap-type: y mandatory;
}

body.home section.step {
  scroll-snap-align: start;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* === Header === */
header {
  position: sticky;
  top: 0;
  z-index: 1002;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #09122C; 
  color: #ffffff; 
  padding: 0 2rem 0 0;
  border-bottom: 1px solid #222;
  height: 60px;
}

/* === Logo === */
.logo a {
  display: inline-block;
  line-height: 0; /* Remove extra spacing around image */
}

.logo img {
  height: 60px;
  width: auto;
  display: block;
}

/* === Mobile Navigation === */
.menu-toggle {
  font-size: 1.5rem;
  color: #ffffff;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  transition: transform var(--transition);
  height: 60px; /* Match logo height */
  display: flex;
  align-items: center;
  padding: 0; /* Remove extra spacing */
  margin: 0;
}

.menu-toggle:hover {
  transform: scale(1.2);
}

nav {
  position: fixed;
  top: 0;
  right: -100%;
  height: 100%;
  width: 250px;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 2rem;
  transition: right var(--transition);
  z-index: 1000;
}

nav.open {
  right: 0;
}

nav a {
  color: white;
  margin: 1rem 0;
  font-size: 1.2rem;
}

/* === Desktop Navigation === */
@media (min-width: 768px) {
  nav {
    position: static;
    height: auto;
    width: auto;
    background: transparent;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    padding: 0;
    gap: 2rem;
    right: 0;
  }

  nav a {
    color: #ffffff;
    margin: 0;
    text-decoration: none;
    transition: color 0.2s ease;
  }

  nav a:hover {
    color: #FFE99A;
  }

  .menu-toggle {
    display: none;
  }
}

/* === Hero Section (Home) === */
.hero {
  background-color: var(--bg-dark);
  padding: 4rem 1.5rem;
  text-align: center;
}

.hero h4 {
  font-size: 1.5rem;
  margin: 0 auto;
  max-width: 800px;
}

/* === General Section Layout === */
.section {
  padding: 2.5rem 1.5rem;
}

/* === Homepage Scroll Steps === */
section.step {
  scroll-snap-align: start;
  position: relative;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
  overflow: hidden;
}

.step-title {
  font-size: 2.5rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease-out;
  z-index: 2;
  position: relative;
}

section.step::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1;
}

.step-title.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Homepage Background Images === */
body.home #step1 {
  background-image: url('../images/Payload.jpg');
}
body.home #step2 {
  background-image: url('../images/Matched.jpg');
}
body.home #step3 {
  background-image: url('../images/Rocket Launch Landscape.jpg');
}

/* === About Section with Logo Background === */
.about-section {
  position: relative;
  background-color: var(--bg-dark);
  overflow: hidden;
  padding: 2.5rem 1.5rem;
}

.about-section::before {
  content: "";
  background-image: url('/images/Orbital Match - V1.png'); /* Image path */
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.02;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

.about-text {
  position: relative;
  z-index: 1;
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  max-width: 750px;
  margin: 0 auto;
  line-height: 1.8;
  text-align: left;
}

/* === Form for Post Section === */
form {
  max-width: 700px;
  margin: 2rem auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background-color: var(--bg-light);
  color: var(--bg-dark);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

form input,
form select {
  font-size: 1.1rem;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  width: 100%;
  box-sizing: border-box;
}

form button {
  font-size: 1.2rem;
  padding: 1rem 2rem;
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  transition: background-color 0.3s ease;
}

form button:hover {
  background-color: #3c5fa1;
}

form button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* === CTA Section === */
#cta {
  background-color: #000;
  padding: 4rem 1.5rem 3rem;
  text-align: center;
}

.cta-inner {
  max-width: 800px;
  margin: 0 auto;
}

.cta-header {
  text-align: center;
  font-weight: bold;
  font-size: 2.25rem;
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cta-buttons a {
  background-color: var(--bg-light);
  color: var(--bg-dark);
  padding: 0.75rem 1.5rem;
  font-weight: bold;
  border-radius: 5px;
  border: none;
  transition: all var(--transition);
}

.cta-buttons a:hover {
  background-color: var(--bg-dark);
  color: var(--text-light);
  border: 1px solid var(--text-light);
}

/* === Footer === */
footer {
  background-color: var(--bg-light);
  color: var(--bg-dark);
  position: relative; /* Required for absolute center positioning */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 2rem;
  flex-wrap: wrap;
  font-size: 1rem;
  gap: 1rem;
}

.footer-left {
  display: flex;
  align-items: center;
}

.footer-logo {
  height: 28px;
  margin-right: 0.75rem;
}

.footer-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  white-space: nowrap;
}

footer .social-icons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  flex: 1;
  min-width: 120px;
}

footer .social-icons a {
  color: var(--bg-dark);
  font-size: 1.5rem;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

footer .social-icons a:hover {
  transform: scale(1.2);
  opacity: 0.7;
}

@media (max-width: 480px) {
  footer {
    flex-direction: column;
    align-items: center;
    padding: 1rem;
  }

  .footer-center {
    position: static;
    transform: none;
    margin: 0.5rem 0;
  }

  footer .social-icons {
    justify-content: center;
    width: 100%;
  }
}

/* === Team Page === */
.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.team-member {
  background-color: var(--bg-light);
  color: var(--bg-dark);
  border-radius: 8px;
  padding: 1.5rem;
  width: 280px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.team-member:hover {
  transform: translateY(-5px);
}

.team-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
}

.team-member h3 {
  font-size: 1.2rem;
  margin: 0.5rem 0 0.25rem;
}

.team-member .role {
  font-weight: bold;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.team-member .bio {
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Make “Meet the Team” white */
.section h2 {
  color: white !important;
}

/* In the modal, force the member’s name (h3) to be black */
.team-modal .modal-content h3 {
  color: black !important;
}

/* === Dark Mode Support === */
.dark-mode {
  background-color: #121212;
  color: #eeeeee;
}

.dark-mode footer {
  background-color: #181818;
  color: #eeeeee;
}

.dark-mode nav {
  background-color: #121212;
}

.dark-mode .cta-buttons a {
  background-color: #eeeeee;
  color: #121212;
}

.dark-mode .cta-buttons a:hover {
  background-color: #121212;
  color: #eeeeee;
  border: 1px solid #eeeeee;
}

.dark-mode footer .social-icons a {
  color: var(--text-light);
}

.dark-mode .footer-logo {
  filter: brightness(0) invert(1);
}