/*
Theme Name: AHRG Rebuilt
Description: Preserved Australian Historic Rally Group design and public archive.
Template: twentyeleven
Version: 1.0.0
*/
@import url('../twentyeleven/style.css');

#site-title a, #site-description { color: #2441e5; }
.ahrg-menu-toggle { display: none; }
#access li:focus-within > ul { display: block; }
.ahrg-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 1.5em 0; }
.ahrg-photo { display: block; aspect-ratio: 3 / 2; }
.entry-content .ahrg-photo img { width: 100%; height: 100%; padding: 0; border: 0; object-fit: cover; box-sizing: border-box; }
.ahrg-lightbox { width: min(1100px, 94%); max-width: 94%; border: 0; padding: 12px; background: #151515; color: #fff; }
.ahrg-lightbox::backdrop { background: rgb(0 0 0 / 85%); }
.ahrg-lightbox img { display: block; width: 100%; height: 72vh; object-fit: contain; }
.ahrg-lightbox-controls { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; }
.ahrg-lightbox button { background: #fff; color: #111; border: 1px solid #bbb; border-radius: 3px; padding: 8px 14px; cursor: pointer; }
.entry-content iframe { max-width: 100%; }
.wp-block-embed__wrapper iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }
.entry-content { overflow-wrap: anywhere; }
.entry-content table { max-width: 100%; }
@media (max-width: 650px) {
  .ahrg-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #access div { margin: 0 12px; }
  #access a { padding: 0 10px; }
  #access ul ul { max-width: calc(100vw - 50px); }
  #access ul ul ul { left: 0; top: 100%; }
  #access .ahrg-menu-toggle { display: inline-block; width: 28px; height: 28px; padding: 0; margin-right: 6px; border: 1px solid #aaa; border-radius: 2px; background: #fff; color: #111; vertical-align: middle; }
  #access li > a { display: inline-block; }
  #access .sub-menu { display: none; position: static; width: 100%; box-shadow: none; float: none; }
  #access .sub-menu a { box-sizing: border-box; width: auto; max-width: 100%; }
  #access li.ahrg-menu-open { width: 100%; }
  #access li.ahrg-menu-open > .sub-menu { display: block; }
  #access .sub-menu li { float: none; background: #f9f9f9; }
  .singular.page .hentry { padding: 0; }
}
