/* Keep the original 2011 artwork and desktop layout; make the archive usable today. */
.archive-home { display: block; width: 100%; height: 100%; }
.entry-content img, .entry-content video { max-width: 100%; height: auto; box-sizing: border-box; }
.archive-video { display: block; width: 100%; margin: 24px auto; background: #171410; border-radius: 3px; }
.archive-note { font-size: 13px; opacity: .8; margin-top: 24px; border-top: 1px solid #b5a58f; padding-top: 12px; }
/* Override NextGEN's legacy display: block !important. */
.ngg-galleryoverview { display: flex !important; flex-wrap: wrap; align-items: flex-start; gap: 5px; clear: both; margin: 14px 0 24px; }
.ngg-galleryoverview br { display: none; }
.ngg-gallery-thumbnail-box { float: none !important; }
.ngg-gallery-thumbnail { float: none !important; }
.ngg-gallery-thumbnail img { max-width: 100%; }
.ngg-widget { display: flex; flex-wrap: wrap; gap: 5px; }
.ngg-widget img { object-fit: cover; }
#archive-search label { display: block; margin: 20px 0 8px; }
.archive-search-row { display: flex; gap: 8px; }
.archive-search-row input { min-width: 0; flex: 1; }
input[type="text"], input[type="search"] { box-sizing: border-box; border: 1px solid #ad9d86; background: #f7f0e5; padding: 7px 9px; color: #29221d; border-radius: 3px; }
button, input[type="submit"] { cursor: pointer; }
.archive-search-row button { border: 1px solid #a99984; border-radius: 3px; background: #dfd0b8; color: #29221d; padding: 7px 14px; }
#search-status { margin: 18px 0 25px; }
#search-results article { margin-bottom: 35px; }
.lightbox-open { overflow: hidden; }
.archive-lightbox { position: fixed; inset: 0; margin: auto; width: min(1100px, 94vw); max-width: 94vw; height: min(850px, 92dvh); max-height: 92dvh; border: 0; padding: 0; border-radius: 8px; background: #171511; color: #f5eee3; box-shadow: 0 20px 100px #0009; }
.archive-lightbox::backdrop { background: #000d; }
.lightbox-toolbar { height: 58px; display: flex; align-items: center; gap: 12px; padding: 0 14px; }
.lightbox-count { margin-right: auto; font: 15px system-ui, sans-serif; }
.archive-lightbox button { border: 0; background: #ffffff15; color: #fff; border-radius: 5px; padding: 8px 12px; min-height: 42px; font: 15px system-ui, sans-serif; }
.archive-lightbox button:hover { background: #ffffff2b; }
.archive-lightbox button:disabled { opacity: .3; cursor: default; }
.archive-lightbox button:focus-visible { outline: 2px solid #f6d8a4; outline-offset: 2px; }
.lightbox-stage { display: flex; align-items: center; height: calc(100% - 58px); gap: 10px; padding: 0 12px 12px; box-sizing: border-box; }
.lightbox-stage figure { margin: 0; flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lightbox-stage img { max-width: 100%; max-height: calc(100% - 90px); object-fit: contain; opacity: .2; transition: opacity .25s ease; }
.lightbox-stage img.loaded { opacity: 1; }
.lightbox-stage figcaption { font: 15px/1.5 system-ui, sans-serif; text-align: center; padding: 16px 8px; max-height: 90px; overflow-y: auto; box-sizing: border-box; }
.lightbox-stage button { font-size: 35px; padding: 4px 12px; }
@media (prefers-reduced-motion: reduce) { .lightbox-stage img { transition: none; } }
@media (max-width: 1000px) {
  .wrapper_center, .header, .content, .footer, .footer_gradient { width: 100%; }
  .header { height: auto; aspect-ratio: 10 / 3; background-size: 100% auto; }
  .content { display: flex; flex-direction: column; background: #eee3d1 url(../wp-content/themes/hanoi-to-bangkok/images/layout/bg_content.jpg) repeat-y left top; background-size: 100% auto; overflow: hidden; }
  .menubar { width: 100%; height: auto; min-height: 92px; background-size: cover; order: 0; float: none; }
  ul#menu-hauptmenu { margin: 32px 20px 20px; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
  ul#menu-hauptmenu li { float: none; margin: 0 !important; width: auto !important; }
  ul#menu-hauptmenu .menu-item-108 { margin-right: 10px !important; }
  .col_left, .col_full { float: none; width: auto; padding: 28px 22px; order: 1; min-width: 0; }
  .col_right { float: none; width: 100%; order: 2; display: flex; flex-wrap: wrap; justify-content: center; }
  .sidebar_content { padding: 25px; flex: 1; min-width: 250px; max-width: 420px; }
  .map_right { flex: 0 0 420px; }
  .footer_gradient { order: 3; background-size: 100% 100%; }
  .footer { height: auto; aspect-ratio: 4; background-size: 100% auto; }
  h1.entry-title, h2.entry-title { font-size: 25px; line-height: 1.25; }
  .entry-content { overflow-wrap: break-word; }
}
@media (max-width: 480px) {
  .header { min-height: 130px; background-size: auto 130px; background-position: center; }
  .map_right { transform: scale(.82); transform-origin: center top; margin-bottom: -95px; }
  .lightbox-stage { padding: 0 5px 5px; gap: 3px; }
  .lightbox-stage button { padding: 4px 8px; }
  .lightbox-stage figcaption { font-size: 13px; }
  .archive-lightbox { width: 98vw; max-width: 98vw; }
  ul.commentlist, ul.children, ol.commentlist { margin-left: 0 !important; padding-left: 0 !important; }
}
@media (max-width: 480px) {
  .header { min-height: 0; background-size: 100% auto; }
  .menubar { min-height: 0; background: none; }
  ul#menu-hauptmenu { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 22px 0; }
  ul#menu-hauptmenu a { display: block; padding: 9px; background: #f3e6ccdd; border: 1px solid #b3a084; border-radius: 3px; font-size: 16px; }
  ul#menu-hauptmenu .menu-item-108 { margin-right: 0 !important; }
  .menu-item-108 .small { display: inline; font-size: inherit; }
}
