/* Prevent padding from causing overflow */
*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  min-height: 100svh;            /* modern viewport unit, safe on mobile */
  display: flex;
  flex-direction: column;
  color: #000;
  background: #fff;
}

/* Header & menu (desktop aligned left, mobile uses dropdown) */
header {
  display: flex;
  align-items: center;
  justify-content: flex-start;    /* aligned (not centered) */
  padding: 1rem;
  position: relative;
  background: transparent;
  margin-bottom: 1rem;
}
  
  

  header button {
      margin-top: 1rem;
      padding: 0.8rem 1rem;
      background: #0077cc;
      color: #fff;
      border: none;
      border-radius: 4px;
      cursor: pointer;
  }

  header h1 {
      font-family: 'Poppins', sans-serif;
      font-size: 1.2em; /* 40px/16=2.5em */
      font-weight: normal;
      letter-spacing: 8px;
      text-align: center;
  }

  header h2 {
      font-family: 'Poppins', sans-serif;
      font-size: 0.8em; /* 40px/16=2.5em */
      font-weight: normal;
      letter-spacing: 2px;
  }
  
  h1 {
    margin: 0 0 0.5rem 0;
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem; /* 40px/16=2.5em */
    font-weight: normal;
    letter-spacing: 8px;
    text-align: center;
  }

    h2 {
        margin: 0 0 0.5rem 0;
        font-family: 'Poppins', sans-serif;
        font-size: 1.0rem; /* 40px/16=2.5em */
        font-weight: normal;
        letter-spacing: 1px;
        text-align: left;
    }
  .top-bar a:hover, .top-bar button:hover {
    background: #ccc;
  }

  section {
    background: #fff;
    padding: 0.75rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 20px;
  }

  section img {
    max-width: 100%;
    border-radius: 6px;
    margin-bottom: 1rem;
  }
  
.menu-toggle {
    display:none; /* hidden on desktop */
    background: none;
    border: none;
    font-size: 3rem;
    color:black;
    cursor: pointer;
    
    
    position: absolute;
    left: 1rem;
    top: 0rem;
}
  
  .menu-bar {
      display:block;
      justify-content:left; /* center on desktop */
      align-items:left;
      position:relative;
      margin-top:0.5rem;
      margin-bottom:0rem;
  }
  
  #navMenu ul {
    list-style: none;
    margin: 0;
    padding: 0rem;
    display: flex;                  /* desktop row */
  
  }

#navMenu a {
  padding: 0.5rem 2rem;
  color: black;
  text-decoration: none;
  font-weight: 500;
}

  #navMenu a:hover {
      background:#eee;
      border-radius:4px;
  }
  
/* Main area: vertically centered when there's extra height, but scrolls when taller */
.page-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1rem;
}

/* This block is what gets centered vertically when there is extra space */
.center-when-room {
  margin-block: auto;             /* pushes block to vertical center if there's room */
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;            /* keep inner content centered horizontally wrapper-wise */
  gap: 1rem;
}


  
main {
  width: 100%;
  max-width: 800px;               /* desktop reading width */
  margin: 0 auto;                 /* horizontal centering */
  text-align: left;
}

main img {
  display: block;
  max-width: 100%;                /* never exceed container */
  height: auto;
  margin-bottom: 1rem;
  border-radius: 6px;
}

main p {
  font-size: 1.1rem;
  line-height: 1.6;
  overflow-wrap: anywhere;        /* prevent long words/URLs from causing overflow */
  margin: 0;
}

main a {
  display: inline-block;
  margin-top: 1rem;
  color: blue;
  text-decoration: none;
}

#langBtn {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  cursor: pointer;
  align-self: center;             /* centered under content */
}

/* Mobile: hamburger + dropdown below, no overflow */
@media (max-width: 768px) {
    
    header {
        
        justify-content: flex-start;
    }
    
    .menu-toggle {
        display: block;
    }

    .menu-bar {
        justify-content:flex-start;
    }

    
  #navMenu ul {
    display: none;                       /* hidden until toggle */
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    background: #f9f9f9;
    width: 180px);             /* fit within viewport */
    border-radius: 4px;
    padding: 0.5rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);

  }

  #navMenu.active ul {
      
      display: flex;
  }

  #navMenu a {
    padding: 0.5rem 1rem;
    display: block;
    text-decoration:none;
    font-weight:500;
  }

  /* Title fits small screens nicely */
  /*h1 { font-size: 1.5rem; }*/

  /* Slightly smaller paragraph for tiny widths */
  @media (max-width: 400px) {
    main p { font-size: 1rem; line-height: 1.5; }
  }
}
