/* Global styles to prevent horizontal scrolling */
html {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  position: relative;
  margin: 0;
  padding: 0;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* Prevent horizontal overflow from fixed elements */
.bg-ornaments {
  max-width: 100vw;
  overflow-x: hidden;
  left: 0;
  right: 0;
}

/* Prevent all containers from causing horizontal scroll and hide scrollbars */
.container {
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* Hide scrollbars in containers */
.container::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Fix navbar on mobile to prevent overflow */
@media (max-width: 768px) {
  .navbar {
    margin-left: 0;
    margin-right: 0;
    margin-top: 10px;
    margin-bottom: 10px;
    width: calc(100% - 20px);
    max-width: calc(100vw - 20px);
    box-sizing: border-box;
  }
}

/* Ensure all sections don't overflow and hide scrollbars */
section {
  max-width: 100vw;
  overflow-x: hidden;
  overflow-y: hidden;
  box-sizing: border-box;
}

/* Hide scrollbars in sections */
section::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

section {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* Fix main container */
main {
  max-width: 100vw;
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
}

/* Hide scrollbar in main but keep scrolling */
main::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
