/* Base Layout & Metallic Silver Theme */
body {
  background: linear-gradient(135deg, #d8d8d8 0%, #b0b0b0 100%);
  color: #222;
  margin: 0;
  padding: 20px;
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Header Container Setup */
.header-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  background-color: #1a1a1a;
  border-bottom: 4px solid #ff6600; /* Professional Haulage Orange Accent */
  padding: 15px 20px;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

h1 {
  margin: 0;
  text-align: center;
  color: #ffffff;
  font-size: 2rem;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

h1 u {
  text-decoration-color: #ff6600;
  text-underline-offset: 6px;
}

/* Nav Container Positioning - pinned to the far right */
.nav-container {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

/* Hide the checkbox */
#menu-toggle {
  display: none;
}

/* Hamburger button styling */
.hamburger-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 6px 10px;
  background-color: #2c2c2c;
  border: 1px solid #ff6600;
  border-radius: 4px;
  transition: background 0.2s;
}

.hamburger-btn:hover {
  background-color: #ff6600;
}

.hamburger-btn:hover .menu-label,
.hamburger-btn:hover .bar {
  background-color: #1a1a1a;
  color: #1a1a1a;
}

/* "MENU" label above the bars */
.menu-label {
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1px;
  margin-bottom: 3px;
  text-transform: uppercase;
  color: #ff6600;
}

/* The three horizontal lines */
.bar {
  width: 24px;
  height: 3px;
  background-color: #e0e0e0;
  margin: 2px 0;
  border-radius: 2px;
  display: block;
}

/* Floating dropdown menu overlay */
.menu {
  display: none;
  position: absolute; 
  top: calc(100% + 10px); 
  right: 0;
  z-index: 1000; 
  list-style: none;
  padding: 0;
  margin: 0;
  background-color: #222222;
  border: 1px solid #ff6600;
  border-radius: 6px;
  width: 220px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.menu li a {
  display: block;
  padding: 12px 16px;
  color: #f0f0f0;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid #333;
  transition: background 0.2s, color 0.2s;
}

.menu li:last-child a {
  border-bottom: none;
}

.menu li a:hover {
  background-color: #ff6600;
  color: #1a1a1a;
}

/* Show menu when checkbox is checked */
#menu-toggle:checked ~ .menu {
  display: block;
}

/* Main Content Wrapper */
main {
  background-color: #ffffff;
  padding: 25px 30px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  margin-bottom: 15px;
  border-left: 5px solid #ff6600;
}

main p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #333333;
  max-width: 900px;
  margin: 0 auto 15px auto;
}

main h2 {
  color: #1a1a1a;
  border-bottom: 2px solid #ff6600;
  padding-bottom: 6px;
  margin-top: 0;
}

/* Image styling */
img {
  display: block;
  margin: 0 auto;
  width: 100%;
  max-height: 500px;
  flex: 1;
  min-height: 0;
  object-fit: cover;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  margin-bottom: 15px;
  border: 3px solid #1a1a1a;
  border-top: none;
}

/* Pins footer neatly to the bottom */
footer {
  background-color: #1a1a1a;
  color: #cccccc;
  text-align: center;
  padding: 15px;
  border-radius: 6px;
  border-top: 3px solid #ff6600;
  font-size: 0.9rem;
  box-shadow: 0 -4px 10px rgba(0,0,0,0.2);
  margin-top: auto;
}

footer a {
  color: #ff6600;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Mobile Responsiveness Fix */
@media screen and (max-width: 768px) {
  body {
    height: auto;
    min-height: 100vh;
    padding: 10px;
    display: block; /* Switches away from flex stretching on mobile */
  }
  
  .header-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
  }

  h1 {
    font-size: 1.3rem;
    margin: 0;
  }

  .nav-container {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
  }

  .menu {
    right: 0;
    width: 200px;
  }

  img {
    width: 100%;
    height: auto; /* Allows the image to scale naturally based on its aspect ratio instead of stretching */
    flex: none;
    max-height: none;
    margin-bottom: 10px;
  }
}