/* ===== Google Fonts Import ===== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,100..800;1,100..800&family=Damion&display=swap');

/* ===== Header ===== */
.mtc-header {
  width: 100%;
  background-color: #042b2f;
  padding: 20px 0;
  box-sizing: border-box;
}

/* ===== Header Container ===== */
.header-container {
  max-width: 1200px;
  margin: auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
}

/* ===== Logo + Brand Text ===== */
.logo-section {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 20px;
  transition: transform 0.3s ease;
}

.logo-link:hover {
  transform: scale(1.05);
}

.logo {
  height: 70px;
  width: auto;
  max-width: 100%;
  max-height: 70px; 
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  -ms-interpolation-mode: bicubic;
}

.brand-text {
  font-family: "Damion", cursive;
  font-size: 38px;
  color: #ffffff;
  font-weight: 400;
  line-height: 1.2;
}

/* ===== Navigation ===== */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 40px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 200;
  margin: 0;
  padding: 0;
  list-style: none;
  position: static;
  transform: none;
}

.nav-item {
  color: #ffffff;
  text-decoration: none;
  font-size: 16px;
  transition: transform 0.3s;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 200;
}

.nav-item:hover {
  transform: scale(1.1);
}

/* ===== Hamburger Button ===== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 20px;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: auto;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: white;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Hamburger Active State */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

body.menu-open {
    overflow: hidden;  /* Disable scrolling when the menu-open class is added to the body */
}

/* ===== Mobile Responsive (768px and below) ===== */
@media (max-width: 768px) {
  .header-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    position: relative;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    gap: 30px;
    width: 100vw;
    height: 100vh;
    text-align: center;
    background-color: #042b2f;
    margin: 0;
    padding: 0;
    
    /* Full-screen overlay positioning */
    position: fixed;
    top: 0;
    left: 0;
    transform: none;
    justify-content: flex-start;
    padding-top: 120px;
    
    /* Ensure it is on the top layer */
    z-index: 999;
  }

  .nav-menu.active {
    display: flex;
  }

  .hamburger {
    display: flex;
    order: 2;
    position: relative;
    z-index: 1000; /* Ensure the hamburger button is on the top layer */
  }

  .logo {
    height: 60px;
    max-width: min(200px, 50vw);
    max-height: 60px; 
  }

  .logo-section {
    order: 1;
    gap: 15px;
    flex-shrink: 0;
    position: relative;
    z-index: 1000; /* Ensure the logo is on the top layer */
  }

  .brand-text {
    font-size: 32px;
  }

  .nav-item {
    font-size: 18px;
    padding: 12px 20px;
    width: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    margin: 0 20px;
    border-radius: 6px;
  }

  .nav-item:hover {
    transform: scale(1.02);
    background-color: rgba(255, 255, 255, 0.15);
  }

  .logo {
    height: 60px;
  }
}

/* ===== Horizontal screen optimization ===== */
@media (max-width: 768px) and (orientation: landscape) {
  .nav-menu {
    padding-top: 100px;
    gap: 20px;
    justify-content: flex-start;
    overflow-y: auto;
  }

  .nav-item {
    padding: 10px 20px;
    font-size: 16px;
  }
}

/* ===== Further optimization for landscape mode ===== */
@media (max-width: 768px) and (orientation: landscape) and (max-height: 400px) {
  .nav-menu {
    padding-top: 80px;
    gap: 15px;
  }

  .nav-item {
    padding: 8px 16px;
    font-size: 15px;
  }
}

/* ===== Extra Small Screens (480px and below) ===== */
@media (max-width: 480px) {

  .logo {
    height: 50px;
    max-width: min(180px, 45vw);
    max-height: 50px;
  }

  .logo-section {
    gap: 10px;
  }
  
  .brand-text {
    font-size: 28px;
  }
  
  .logo {
    height: 50px;
  }
  
  .hamburger {
    width: 22px;
    height: 18px;
  }
  
  .nav-item {
    font-size: 16px;
    padding: 10px 16px;
  }

  /* Ultra-small screen portrait optimization */
  .nav-menu {
    padding-top: 100px;
    gap: 25px;
  }
}

/* ===== Retina/High DPI Display Optimization ===== */
@media 
only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and (min--moz-device-pixel-ratio: 2),
only screen and (-o-min-device-pixel-ratio: 2/1),
only screen and (min-device-pixel-ratio: 2),
only screen and (min-resolution: 192dpi),
only screen and (min-resolution: 2dppx) {
  .logo {
    image-rendering: crisp-edges;
  }
}

/* ===== Landscape mode optimization for ultra-small screens ===== */
@media (max-width: 480px) and (orientation: landscape) {
  .nav-menu {
    padding-top: 80px;
    gap: 15px;
  }

  .nav-item {
    padding: 8px 16px;
    font-size: 15px;
  }
}

/* ===== Ensures scroll lock when menu is open ===== */
@media (max-width: 768px) {
  body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
  }
}