/* =========================================================
   PRODUCTS PAGE STYLES
   ========================================================= */

/* -----------------------------------------------
   Fixed Section Navigation - sits below the banner
------------------------------------------------- */
body.products-page .section-nav {
  position: fixed;
  top: 129px; /* banner height */
  left: 0;
  width: 100%;
  background: var(--nav-bg);
  z-index: 1000;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

body.products-page .section-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s, color 0.3s;
}

body.products-page .section-nav a:hover {
  opacity: 0.75;
  color: #00aaff;
}

/* -----------------------------------------------
   Page padding below fixed header + nav
------------------------------------------------- */
body.products-page {
  padding-top: 185px; /* banner + section nav */
}

/* -----------------------------------------------
   Section Layout
------------------------------------------------- */
body.products-page .section {
  padding: 4rem 1rem;
  max-width: 1100px;
  margin: 0 auto;
  scroll-margin-top: 185px; /* fixes anchor jump */
}

body.products-page section,
body.products-page section p,
body.products-page .portfolio-intro {
  text-align: left !important;
}

body.products-page .section h2,
body.products-page .section h3 {
  display: block !important;
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-bottom: 5px;
}

body.products-page .section h2 {
  border-bottom: 2px solid #00aaff !important;
  width: fit-content !important;
}

/* -----------------------------------------------
   Light background sections
------------------------------------------------- */
.light-bg {
  background-color: #f8f9fb;
}

/* -----------------------------------------------
   Approach Grid
------------------------------------------------- */
.approach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.approach-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 20px;
  text-align: left;
}

/* -----------------------------------------------
   Prototype & Project Cards
------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  padding: 20px;
  text-align: left;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.card h3 {
  margin-bottom: 12px;
  font-size: 1.25rem;
  color: var(--primary);
}

.card p {
  font-size: 1rem;
  line-height: 1.5;
  color: #333;
}

/* -----------------------------------------------
   Buttons
------------------------------------------------- */
.btn {
  display: inline-block;
  margin-top: 10px;
  background: #00aaff;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.3s;
}

.btn:hover {
  background: #0088cc;
}

/* =========================================================
   MOBILE NAVIGATION & HAMBURGER
   ========================================================= */
@media (max-width: 768px) {
  /* Hamburger toggle */
  .nav-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 25px;
    position: relative;
    z-index: 1500;
  }

  .nav-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: #fff;
    margin-bottom: 5px;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  /* Mobile nav dropdown */
  .nav {
    display: none;
    position: absolute;
    top: 60px; /* below mobile banner */
    left: 0;
    width: 100%;
    flex-direction: column;
    background-color: #222;
    padding: 10px 0;
    z-index: 1400;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    display: block;
    width: 100%;
    padding: 12px 20px;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    box-sizing: border-box;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: left;
    transition: background 0.3s, color 0.3s;
  }

  .nav a:first-child {
    border-top: none;
  }

  .nav a:hover {
    background-color: #333;
    color: #00aaff;
  }

  /* Fixed Section Nav adjustments */
  body.products-page .section-nav {
    top: 60px; /* adjust for mobile banner + spacing */
    gap: 12px;
    padding: 8px 0;
  }

  .banner-center {
    display: none;
  }

  .banner {
    height: 60px; /* mobile banner height */
  }

  .section {
    padding: 50px 5%;
  }

  .approach-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* -----------------------------------------------
   Responsive adjustments
------------------------------------------------- */
@media (max-width: 1000px) {
  body.products-page {
    padding-top: 160px;
  }
}

@media (max-width: 420px) {
  h2 {
    font-size: 1.4rem;
  }

  .card img {
    height: 150px;
  }
}
