body {
  margin: 0;
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: row;
  height: 100vh;
  background-color: #ecf0f1;
  color: #333;
  font-size: 14px;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background-color: #d3d3d3;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 20px;
  border-bottom: 1px solid #bbb;
  z-index: 100;
}

header img {
  height: 100px;
  width: auto;
}

nav {
  position: fixed;
  top: 120px;
  left: 0;
  bottom: 50px;
  width: 160px;
  background-color: #2c3e50;
  display: flex;
  flex-direction: column;
  padding-top: 5px;
}

nav a {
  color: white;
  text-decoration: none;
  display: block;
  padding: 10px 12px;
  text-align: left;
  font-size: 13px;
  transition: background 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

nav a:hover {
  background-color: #34495e;
}

.submenu {
  background-color: #1a252f;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.submenu.active {
  max-height: 200px;
}

.submenu a {
  font-size: 12px;
  padding-left: 25px;
  background-color: #1a252f;
}

.submenu a:hover {
  background-color: #1e2e3a;
}

main {
  margin-top: 120px;
  margin-left: 160px;
  padding: 20px;
  overflow-y: auto;
  padding-bottom: 80px;
  font-size: 14px;
}

main h1 {
  font-size: 24px;
  margin-top: 0;
}

main img {
  width: 40%;
  max-width: 600px;
  height: auto;
  display: block;
  margin: 20px 0;
  border-radius: 6px;
}

main p {
  font-size: 15px;
  line-height: 1.5;
}

footer {
  position: fixed;
  bottom: 0;
  left: 160px;
  right: 0;
  height: 50px;
  background-color: #2c3e50;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

@media (max-width: 768px) {
  nav {
    position: fixed;
    top: 120px;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-around;
    padding-top: 8px;
  }

  .submenu {
    position: fixed;
    top: 140px;
    left: 0;
    right: 0;
    background-color: #2c3e50;
    flex-direction: column;
    max-height: none;
    height: 0;
    transition: height 0.3s ease;
  }

  .submenu.active {
    height: 160px;
  }

  nav a, .submenu a {
    flex: 1 0 45%;
    text-align: center;
    padding: 8px 10px;
    font-size: 12px;
  }

  main {
    margin-left: 0;
    margin-top: 220px;
    font-size: 13px;
  }

  footer {
    left: 0;
  }

  main img {
    width: 60%;
  }
}

@media (max-width: 480px) {
  header {
    height: 100px;
  }

  header img {
    height: 80px;
  }

  main {
    margin-top: 200px;
    font-size: 13px;
    padding: 15px;
  }

  main h1 {
    font-size: 18px;
  }

  main img {
    width: 80%;
  }

  footer {
    height: 45px;
    font-size: 10px;
  }
}
/* Hide hamburger by default */
.hamburger-toggle {
  display: none; flex-direction: column; cursor: pointer; padding: 10px;
}
.hamburger-toggle span {
  height: 3px; width: 25px; background: #333; margin: 3px 0; transition: 0.3s;
}

/* Mobile hamburger (your existing menu hides) */
@media (max-width: 768px) {
   .hamburger {
  display: block !important; /* Force show */
  position: relative;
  z-index: 1001 !important; /* Above everything */
  flex-direction: column;
  justify-content: center;
  width: 30px;
  height: 25px;
  padding: 5px;
  cursor: pointer;
  background: transparent;
  border: none;
}

.hamburger span {
  display: block !important;
  height: 3px;
  width: 100%;
  background: #333 !important;
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

/* Desktop: hide hamburger */
@media (min-width: 769px) {
  .hamburger { display: none !important; }
}

/* Mobile: ensure it's visible */
@media (max-width: 768px) {
  .hamburger { 
    display: flex !important; 
    visibility: visible !important; 
  }
}

  
  nav ul, .navbar ul {
    position: fixed; 
    top: 0; left: 0; 
    width: 100%; 
    height: 100%; /* Changed from 100vh */
    transform: translateX(-100%);
    background: white;
    flex-direction: column;
    z-index: 999;
    padding: 80px 20px 20px;
    box-sizing: border-box;
    overflow-y: auto;
  }
  
  nav ul.active, .navbar ul.active {
    transform: translateX(0);
  }
}
/* iPhone Safari fixes */
@supports (padding: env(safe-area-inset-left)) {
  nav ul, .navbar ul {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
    padding-top: max(80px, env(safe-area-inset-top));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    height: 100dvh; /* Dynamic viewport height */
  }
}

/* Prevent body scroll when menu open */
body.menu-open {
  overflow: hidden;
  height: 100%;
  position: fixed;
  width: 100%;
}

