/* ================================
   MOBILE / TABLET LAYOUT
   ================================ */

html {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: Arial, sans-serif;
  touch-action: pan-y;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
  background-attachment: scroll;
  padding-bottom: 90px;
  box-sizing: border-box;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("assets/images/background1.jpg") no-repeat center center;
  background-size: cover;
  z-index: -1;
}

/* Dynamic viewport height for newer browsers */
@supports (height: 100dvh) {
  html, body {
    min-height: 100dvh;
  }
}

/* Hide scrollbars but allow scroll */
*::-webkit-scrollbar { 
  display: none; 
}
* { 
  scrollbar-width: none; 
  -ms-overflow-style: none; 
}

/* Logo */
.logo {
  width: 30vw;
  max-width: 300px;
  min-width: 120px;
  margin: 20px auto 10px 20px;
  display: block;
}

/* Headings */
h1 { 
  text-align: center; 
  font-size: 0.9rem; 
  margin-top: 10px; 
  color: #131313; 
}

h2 { 
  text-align: center; 
  font-size: clamp(0.5rem, 0.9vw, 0.65rem);
  color: #131313; 
  margin: 4px 0; 
  font-weight: bold;
  padding: 0 10px;
  box-sizing: border-box;
}

h3 { 
  text-align: center; 
  font-size: clamp(0.3rem, 0.7vw, 0.45rem);
  color: #131313; 
  margin: 3px 0; 
  font-weight: normal;
  padding: 0 10px;
  box-sizing: border-box;
}

/* Sections */
.section {
  padding: 5px;
  display: block;
  width: 100%;
  box-sizing: border-box;
  overflow: visible;
}

.hidden { 
  display: none !important; 
}

/* Main menu layout */
.main-menu-layout {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 5px;
  margin-top: 50px;
  width: 100%;
  box-sizing: border-box;
}

/* Left column menu grid */
.grid.menu-grid {
  display: grid;
  grid-template-columns: 1fr; /* single vertical column */
  gap: 15px;
  padding: 5px 0;
  flex: 1 1 50%;
  max-width: 40%;
  box-sizing: border-box;
}

/* Menu cards */
.card {
  background-color: #f58b02; 
  width: 80%;
  min-height: 70px;
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15); 
  cursor: pointer;
  transition: transform 0.2s; 
  display: flex; 
  align-items: center; 
  justify-content: flex-start;
  padding: 10px 16px;
}

.card:hover { 
  transform: scale(1.05); 
}

.card-content { 
  display: flex; 
  align-items: center; 
  gap: 10px; 
  width: 100%; 
  font-size: clamp(0.9rem, 2.0vw, 1.3rem);
  font-weight: bold; 
  color: #f8f9fa; 
}

.card-img-side { 
  width: clamp(35px, 15vw, 70px);
  height: auto; 
  object-fit: contain; 
}

.card-content p { 
  margin: 0; 
}

/* Right column (speech + video) */
.video-speech-wrapper {
  flex: 1 1 50%;        
  max-width: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Speech bubble */
.speech-bubble {
  background: #ffffff;
  border-radius: 12px;
  padding: 12px 16px;
  width: 80%;
  text-align: center;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  box-sizing: border-box;
  min-height: 90px;
}

#kiosk-location {
  margin-top: 10px;
  font-size: 0.9rem;
  color: #000000;
  opacity: 0.9;
}

/* Embedded video */
.embedded-video {
  width: 80%;
  max-height: 250px;
  object-fit: contain;
  border-radius: 8px;
  background: transparent;
}

/* Building buttons */
.button-box { 
  display:flex; 
  flex-direction:column; 
  justify-content:center; 
  align-items:center; 
  gap:10px;
  padding-right: 0; 
}

.building-btn {
  width: 80%; 
  padding: 20px;
  font-size: 0.9rem; 
  background:#f58b02; 
  color:#fff;
  border:none;
  border-radius:10px; 
  font-weight:bold; 
  cursor:pointer;
}

/* Location grid – 2 columns */
.location-grid { 
  display: grid; 
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 16px 20px;
  justify-content: center;
  box-sizing: border-box;
  align-items: stretch;
}

/* Location cards */
.location-card {
  background-color: #f58b02;
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15); 
  cursor: pointer;
  transition: transform 0.2s; 
  display: flex; 
  align-items: center; 
  justify-content: center;
  padding: 12px 16px;
  box-sizing: border-box;
  font-size: clamp(0.8rem, 1.4vw, 1rem);
  font-weight: bold;
  color: #fff;
  text-align: center;
  line-height: 1.3;
  white-space: normal;
  word-break: break-word;
  height: 100%;
}

.location-card:hover {
  transform: scale(1.05);
}

/* Iframe */
.info-iframe { 
  display:block; 
  width:100%; 
  height:80vh; 
  border:none; 
  border-radius:8px; 
}

/* QR (for completeness) */
.qr-container,
#qrcode {
  display:flex;
  justify-content:center;
  align-items:center;
  margin-top:20px;
}

/* Footer */
.fixed-footer {
  position: fixed; 
  bottom: 0; 
  left: 0; 
  width: 100%;
  background-color: rgba(119, 118, 118, 0.2);
  display: flex; 
  justify-content: center; 
  gap: 5vw; 
  padding: 10px 0; 
  z-index: 1000;
}

.footer-icon { 
  width:50px; 
  height:50px; 
  cursor:pointer; 
}

/* Instruction container */
#instruction-container {
  display:flex; 
  justify-content:center; 
  align-items:center; 
  flex-direction:column; 
  margin-top:20px; 
  text-align:center; 
}

#instruction-img { 
  width:60%; 
  max-width: 90vw;
  height:auto; 
  border-radius:10px; 
  box-shadow:0 4px 10px rgba(0,0,0,0.15); 
  margin-bottom:20px; 
}

/* Pagination */
.pagination-buttons { 
  display: flex; 
  justify-content: center; 
  gap: 16px; 
  margin: 20px 0 30px 0;
  padding: 0 16px;
  box-sizing: border-box;
}

.pagination-btn {
  padding: 8px 16px;
  font-size: clamp(0.85rem, 1.6vw, 1.1rem);
  background: #767874d0; 
  color: #fff;
  border: none; 
  border-radius: 8px;
  font-weight: bold;
  box-shadow: 0 3px 6px rgba(0,0,0,0.2); 
  cursor: pointer; 
  transition: transform 0.2s, background-color 0.3s;
  min-width: 120px;
  max-width: 160px;
}

.pagination-btn:hover { 
  background: #5e605c; 
  transform: scale(1.03); 
}

/* Admin btn */
.admin-access-btn {
  border: none;
  padding: 1px 1px;
  border-radius: 1px;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.2s;
}

.admin-access-btn:hover { 
  background: rgba(119,118,118,0.213); 
}

/* Responsive (phones & small tablets) */
@media (max-width: 768px) {
  h1, h2, h3 { 
    font-size: 5vw;
  }

  .logo { 
    width: 50vw; 
  }

  .card { 
    max-width: 90vw; 
  }

  .location-card { 
    max-width: 100%;
  }

  .fixed-footer { 
    gap: 20px; 
    padding: 10px 0; 
  }

  /* ✅ Keep side-by-side layout on mobile */
  .main-menu-layout {
    flex-direction: row;         /* row instead of column */
    align-items: flex-start;
    gap: 10px;
  }

  .video-speech-wrapper {
    width: 50%;                  /* keep similar to desktop layout */
  }

  .grid.menu-grid {
    max-width: 45%;              /* adjust if you want more/less space */
  }

  .button-box {
    width: 100%;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .location-card {
    padding: 8px 10px;
    font-size: 0.75rem;
    border-radius: 10px;
  }

  .location-grid {
    gap: 10px; 
    padding: 10px 12px;
  }

  .card {
    min-height: 55px;
    padding: 8px 12px;
  }

  .card-content {
    font-size: 0.85rem;
  }

  .speech-bubble {
    font-size: 0.85rem;
    padding: 8px 10px;
    min-height: 45px;
  }
}

main,
.section,
.main-menu-layout,
.video-speech-wrapper,
.grid.menu-grid,
.button-box,
#location-list,
#buildings-menu,
#main-menu {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}