/* Responsive overrides for the archived fixed-width club template. */
@media (max-width: 1024px) {
  html { -webkit-text-size-adjust:100%; scroll-padding-top:4rem; }
  body { margin:0; min-width:0!important; }
  #page, #page * { box-sizing:border-box; }
  #page { width:100%!important; max-width:100%; margin:0 auto; overflow:visible; }
  #head_wrapper, #keyvisual { width:100%!important; max-width:100%; }
  #head_wrapper, #keyvisual { height:clamp(110px,22vw,199px); }
  #title_wrapper { left:1rem; right:1rem; top:1rem; max-width:100%; }
  #title_wrapper h1, #title_wrapper h2 { left:0; top:0; overflow-wrap:anywhere; }
  #content_wrapper { width:100%; border:0; }
  #content_wrapper > table, #content_wrapper > table > tbody,
  #content_wrapper > table > tbody > tr, #content_wrapper > table > tr { display:block; width:100%!important; }
  #content_left_wrapper, #content_main_wrapper, #content_right_wrapper { display:block; width:100%!important; min-width:0!important; }
  #content_left, #cm_navigation, ul#cm_mainnavigation { width:100%!important; }
  #content_main_wrapper > .content_main { width:100%!important; min-width:0; padding:clamp(16px,3vw,28px); overflow:visible; line-height:1.6; overflow-wrap:anywhere; }
  #content_right_wrapper .content_sidebar { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; padding:16px; }
  #content_right_wrapper [id^='widgetbar_'] { width:100%!important; min-width:0; }
  #footer { box-sizing:border-box; width:100%!important; height:auto; min-height:50px; padding:16px 16px calc(85px + env(safe-area-inset-bottom)); }
  .content_main :is(img,picture,video,canvas,svg,iframe,object,embed) { max-width:100%!important; }
  .content_main img:not(.ecw-positioned-header) { height:auto; }
  .content_main :is(div,section,article,figure,p,form) { max-width:100%; min-width:0; }
  .content_main :is(table,thead,tbody,tr,th,td) { max-width:100%; }
  .content_main table { width:100%!important; table-layout:fixed; }
  .content_main :is(th,td) { width:auto!important; overflow-wrap:anywhere; white-space:normal; }
  .content_main :is(input,select,textarea,button) { max-width:100%; min-width:0; font-size:16px; }
  .content_main :is(input,select,textarea) { box-sizing:border-box; }
  .content_main :is(button,input[type='submit'],summary) { min-height:44px; }
  .content_main h1 { font-size:clamp(1.5rem,5vw,2rem); }
  .content_main :is(h1,h2,h3) em { font-style:normal; }
  .ecw-mobile-toggle { display:flex; align-items:center; justify-content:space-between; width:100%; min-height:52px; padding:12px 18px; border:0; background:#852630; color:white; font:600 17px system-ui,sans-serif; cursor:pointer; }
  .ecw-mobile-toggle:focus-visible, .ecw-mobile-home:focus-visible { outline:3px solid #fff; outline-offset:-4px; }
  #cm_navigation.ecw-mobile-ready:not(.ecw-menu-open) > #cm_mainnavigation { display:none; }
  ul#cm_mainnavigation { padding:10px; }
  ul#cm_mainnavigation li a { min-height:44px; padding:10px 12px!important; line-height:1.4!important; border-radius:8px; overflow-wrap:anywhere; }
  ul#cm_mainnavigation li ul.cm_subnavigation { margin-left:12px; border-left:1px solid #ffffff40; }
  .ecw-mobile-home { position:fixed; z-index:1000; bottom:calc(12px + env(safe-area-inset-bottom)); left:50%; transform:translateX(-50%); display:block; width:max-content; max-width:calc(100% - 24px); padding:12px 22px; min-height:48px; border:1px solid #ffffff66; border-radius:30px; background:#852630; color:#fff!important; box-shadow:0 4px 20px #0006; font:600 15px system-ui,sans-serif; text-decoration:none; text-align:center; }
  body { padding-bottom:calc(72px + env(safe-area-inset-bottom)); }
  .ecw-map iframe,.ecw-google-calendar iframe { width:100%!important; }
}
.ecw-mobile-toggle,.ecw-mobile-home { display:none; }
@media (max-width:1024px) {
  .ecw-mobile-toggle { display:flex; }
  .ecw-mobile-home { display:block; }
}
@media (max-width:540px) {
  .ecw-team-photos,.ecw-website-photo-album { grid-template-columns:minmax(0,1fr); }
  #content_right_wrapper .content_sidebar { grid-template-columns:minmax(0,1fr); }
  .content_main :is(th,td) { padding:4px; font-size:.9em; }
  .ecw-photo-dialog { width:calc(100% - 20px); padding:10px; }
}

@media (max-width:1024px) {
  #cm_navigation ul.cm_subnavigation { display:block; position:static; width:auto; max-width:100%; height:auto; visibility:visible; }
  #cm_navigation li.cm_current > a { scroll-margin-top:12px; }
}

.ecw-mobile-back { display:none; }
@media (max-width:1024px) {
  #cm_mainnavigation li.ecw-mobile-hidden { display:none!important; }
  .ecw-mobile-back:not([hidden]) { display:block; padding:12px 18px; min-height:44px; color:#fff; background:#582029; font:600 16px system-ui,sans-serif; text-decoration:none; }
  #cm_navigation:not(.ecw-menu-open) > .ecw-mobile-back { display:none; }
}

.ecw-mobile-up { display:none; }
@media (max-width:1024px) {
  .ecw-mobile-home, .ecw-mobile-up:not([hidden]) { position:fixed; z-index:1000; bottom:calc(12px + env(safe-area-inset-bottom)); width:calc(50% - 18px); max-width:none; min-height:52px; display:flex; align-items:center; justify-content:center; box-sizing:border-box; padding:10px 8px; border:1px solid #ffffff66; border-radius:14px; color:#fff!important; box-shadow:0 4px 20px #0006; font:600 14px/1.3 system-ui,sans-serif; text-decoration:none; text-align:center; transform:none; }
  .ecw-mobile-up:not([hidden]) { left:12px; background:#582029; }
  .ecw-mobile-home { left:auto; right:12px; background:#852630; }
  .ecw-mobile-up:focus-visible { outline:3px solid white; outline-offset:2px; }
}
