/* ---------------------------------------
   GLOBAL LAYOUT + FOOTER FIX
---------------------------------------- */

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: Arial, sans-serif;
  background: #f9f9f9;
  color: #333;

  /* Footer stays at bottom */
  display: flex;
  flex-direction: column;

  /* Safe-area support */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}

/* Main grows to fill space so footer stays down */
main {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  box-sizing: border-box;
}

/* ---------------------------------------
   HEADER
---------------------------------------- */

header {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #000; /* or #002244 */
  padding: 0 12px;
  box-sizing: border-box;
  position: relative;
  z-index: 10000;
}

.logo {
  height: 48px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* ---------------------------------------
   NAVIGATION
---------------------------------------- */

nav ul {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

nav a {
  color: white;
  text-decoration: none;
}

/* ---------------------------------------
   HERO + BUTTONS
---------------------------------------- */

.hero {
  padding: 2rem;
  text-align: center;
  background: #e0eafc;
}

.cta {
  text-align: center;
  margin: 2rem;
}

.button {
  background: #0055aa;
  color: white;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 5px;
}

.button.small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* ---------------------------------------
   FOOTER
---------------------------------------- */

footer {
  background: #002244;
  color: white;
  text-align: center;
  padding: 1rem;
}

/* ---------------------------------------
   COMPANY CARDS
---------------------------------------- */

.company-list {
  max-width: 900px;
  margin: 2rem auto;
  padding: 1rem;
  display: grid;
  gap: 1.5rem;
}

.company-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.company-card h2 {
  margin-top: 0;
  color: #002244;
}

.company-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.company-header h2 {
  margin: 0;
  line-height: 1.2;
}

.company-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
}

/* ---------------------------------------
   HAMBURGER MENU
---------------------------------------- */

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  position: relative;
  z-index: 10001;

  /* Force right alignment */
  order: 3;
  margin-left: auto;
}

/* ---------------------------------------
   MOBILE RESPONSIVE LAYER
---------------------------------------- */

@media (max-width: 768px) {

  /* Header layout */
  header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    height: 100px;
    padding: 0 1rem;
    position: relative;
    z-index: 10000;
  }

  .logo {
    max-height: 80px;
    order: 1; /* ensure logo stays left */
  }

  /* Hamburger button */
  .menu-toggle {
    display: block;
  }

  nav {
    width: 100%;
    position: relative;
    z-index: 10000;
    order: 2; /* nav stays between logo and hamburger */
  }

@media (max-width: 768px) {

  /* Hamburger button */
  .menu-toggle {
    display: block;
    order: 3;
    margin-left: auto;
    position: relative;
    z-index: 10001;
  }

  nav {
    width: 100%;
    position: relative;
    z-index: 10000;
    order: 2;
  }

  nav ul {
    display: flex;
    flex-direction: column;
    background: #002244;
    padding: 1rem 0;
    margin: 0;

    /* Anchor under header */
    position: absolute;
    top: 100%;
    right: 0;

    width: 70%; /* narrower menu */
    z-index: 9999;

    /* Start hidden (slide-in + slide-down) */
    transform: translateY(-20px) translateX(20px);
    opacity: 0;
    pointer-events: none;

    /* Smooth animation */
    transition:
      transform 0.35s ease,
      opacity 0.35s ease;

    /* Scrollable */
    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }

  /* When menu is open */
  nav ul.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) translateX(0);
  }
}


  nav a {
    padding: 0.75rem 0;
    font-size: 1.2rem;
    width: 100%;
    display: block;
  }

  /* Page headers */
  .page-header {
    padding: 1.5rem 1rem;
  }

  .page-header h1 {
    font-size: 1.8rem;
  }

  /* Body text */
  .about-content,
  .company-list {
    padding: 1rem;
  }

  p, li {
    font-size: 1rem;
    line-height: 1.55;
  }

  /* Company cards */
  .company-list {
    grid-template-columns: 1fr;
  }

  .company-card {
    padding: 1.25rem;
  }

  /* Buttons */
  .button,
  .button.small {
    width: 100%;
    text-align: center;
    padding: 0.9rem;
    font-size: 1rem;
  }

  /* Hero */
  .hero {
    padding: 2rem 1rem;
  }

  .hero h1 {
    font-size: 1.9rem;
  }

  .hero p {
    font-size: 1.1rem;
  }
}
