/* Mobile first base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f0f2f5;
  background: url('images/placeholder-stationary-scroll.png') no-repeat center center fixed;
  background-size: cover;
  color: #222;
  line-height: 1.6;
  padding: 0 1rem;
}

header {
  background-color: #0d1b2a;
  color: #fff;
  padding: 1rem 0;
  position: fixed;            /* was sticky — needs fixed */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  text-align: center;
  transform: translateY(0);   /* initial position */
  transition: transform 0.2s ease-in, opacity 0.3s ease-in;
  will-change: transform;     /* performance hint */
}

header.show {
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}

header.hide {
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.2s ease-in, opacity 0.2s ease-in;
}

/* Make space for fixed header so content doesn’t jump under it */
main {
  padding-top: var(--header-height, 72px);
}

header h1 {
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}

nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

nav a:hover,
nav a:focus {
  background-color: #fca311;
  color: #0d1b2a;
}

main {
  max-width: 700px;
  margin: 2rem auto;
}

section {
  margin-bottom: 3.5rem;
}

section h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #0d1b2a;
  border-bottom: 3px solid #fca311;
  display: inline-block;
  padding-bottom: 0.2rem;
}

/* Remove background image from contact section */
#contact {
  background: #f0f2f5; /* matches the page background color */
  position: relative; /* for layering if needed */
  z-index: 1; /* ensures it’s above background */
  padding-top: 2rem;
  padding-bottom: 2rem;
  border-radius: 0;
}

#contact {
  background-color: #f0f2f5;
  box-shadow: 0 -10px 15px rgba(240, 242, 245, 0.9); /* subtle shadow on top */
  margin-top: 2rem;
}

.intro p {
  font-size: 1.1rem;
}

.services-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.service-item {
  background: #fff;
  padding: 1.4rem 1rem;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.service-item:hover,
.service-item:focus-within {
  transform: translateY(-5px);
  box-shadow: 0 7px 14px rgba(0,0,0,0.15);
}

.service-item h3 {
  margin-bottom: 0.7rem;
  color: #14213d;
  font-size: 1.2rem;
}

form {
  background: #fff;
  padding: 1.8rem;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

form label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 600;
  color: #0d1b2a;
  font-size: 0.95rem;
}

form input,
form textarea {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  font-family: inherit;
}

form button {
  background-color: #fca311;
  border: none;
  padding: 0.7rem 1.5rem;
  font-weight: 700;
  color: #0d1b2a;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  font-size: 1rem;
}

form button:hover,
form button:focus {
  background-color: #e68a00;
}

footer {
  text-align: center;
  padding: 1rem 0;
  background: #0d1b2a;
  color: #fff;
  font-size: 0.9rem;
}

/* Tablet and up */
@media (min-width: 700px) {
  body {
    padding: 0;
  }
  main {
    max-width: 900px;
  }
  .services-list {
    flex-direction: row;
    gap: 1.5rem;
  }
  .service-item {
    flex: 1 1 30%;
  }
  header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3rem;
    text-align: left;
  }
  nav {
    display: flex;
    gap: 2rem;
  }
}
