/* ===== HORIZONTAL SCROLL FIX ===== */

/* Prevent horizontal scrolling globally */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
}

/* Fix header horizontal scroll */
.header {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Fix navigation container */
.nav {
  overflow-x: hidden !important;
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Fix navigation logo area */
.nav__logo {
  overflow: hidden !important;
  max-width: none !important;
  flex-shrink: 0 !important;
}

/* Fix navigation menu */
.nav__menu {
  overflow-x: hidden !important;
  max-width: 100% !important;
}

/* Fix navigation list */
.nav__list {
  overflow-x: hidden !important;
  max-width: 100% !important;
  flex-wrap: wrap !important;
}

/* Fix navigation actions */
.nav__actions {
  overflow: hidden !important;
  flex-shrink: 0 !important;
  max-width: none !important;
}

/* Ensure all containers respect viewport width */
.container,
.hero__container,
.section,
.footer {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  box-sizing: border-box !important;
}

/* Fix any wide elements */
* {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Exception for elements that should be able to be wider */
.nav__logo img,
.nav__logo span,
.theme-toggle,
.nav__toggle {
  max-width: none !important;
}

/* Specific header layout fixes */
.header .container {
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 2rem !important;
  overflow-x: hidden !important;
}

/* Navigation responsive layout */
.nav {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  overflow-x: hidden !important;
}

/* Logo area should not cause overflow */
.nav__logo {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  flex-shrink: 0 !important;
  min-width: 0 !important;
}

/* Menu should be flexible */
.nav__menu {
  flex: 1 !important;
  display: flex !important;
  justify-content: center !important;
  min-width: 0 !important;
}

/* Actions should not cause overflow */
.nav__actions {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  flex-shrink: 0 !important;
  min-width: 0 !important;
}

/* Mobile specific fixes */
@media (max-width: 768px) {
  .header {
    overflow-x: hidden !important;
  }
  
  .nav {
    overflow-x: hidden !important;
    padding: 0.5rem 0 !important;
  }
  
  .nav__logo {
    font-size: 0.9rem !important;
    gap: 0.25rem !important;
  }
  
  .nav__logo img {
    max-height: 28px !important;
    max-width: 80px !important;
  }
  
  .nav__actions {
    gap: 0.25rem !important;
  }
  
  .theme-toggle {
    padding: 0.25rem !important;
    font-size: 0.9rem !important;
  }
  
  .nav__toggle {
    padding: 0.25rem !important;
    font-size: 1rem !important;
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .header .container {
    padding: 0 0.75rem !important;
  }
  
  .nav__logo {
    font-size: 0.8rem !important;
  }
  
  .nav__logo img {
    max-height: 24px !important;
    max-width: 60px !important;
  }
}

/* Debug: Hide any elements that might be causing overflow */
.nav__menu.show-menu {
  overflow-x: hidden !important;
}

/* Ensure grid layouts don't cause horizontal scroll */
.grid {
  overflow-x: hidden !important;
}

.features__container,
.cities__grid,
.hours__grid,
.footer__container {
  overflow-x: hidden !important;
}

/* Fix any potential flex issues */
.hero__actions,
.hero__features {
  overflow-x: hidden !important;
  flex-wrap: wrap !important;
}

/* Ensure buttons don't cause overflow */
.hero__button,
.btn {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Fix form elements */
.contact__form-input,
.contact__form-textarea,
.cities__search-input {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Scrollbar hiding for webkit browsers */
::-webkit-scrollbar {
  width: 0px !important;
  background: transparent !important;
}

/* Scrollbar hiding for Firefox */
html {
  scrollbar-width: none !important;
}

/* Force hide horizontal scrollbar */
body::-webkit-scrollbar:horizontal {
  display: none !important;
}

/* Additional safety measures */
.header, .nav, .container {
  position: relative !important;
}

.header::after {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
}
