/* Unified dg_e layout. Loaded after the legacy theme and plugin styles. */
img { max-width: 100%; height: auto; }
iframe, video { max-width: 100%; }
input, select, textarea, button { max-width: 100%; box-sizing: border-box; }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 3px solid #a52f53;
  outline-offset: 3px;
}
#form_table { max-width: 100%; }
#booking-form fieldset { min-width: 0; }
#booking-form fieldset table { width: 100%; }
#booking-reservation-fieldset input[type='radio'],
#booking-reservation-fieldset input[type='checkbox'] { margin: 8px 6px 8px 0; }
#booking-reservation-fieldset dl.charge { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
#booking-reservation-fieldset dl.charge > dt,
#booking-reservation-fieldset dl.charge > dd {
  float: none; width: auto; margin: 0; padding: 8px; box-sizing: border-box;
}
#booking-reservation-fieldset dl.charge select { width: 100%; min-height: 44px; }
#booking-reservation-fieldset td .wp-caption { box-sizing: border-box; }

@media (min-width: 961px) {
  #mobile_nav { display: none; }
  #top-menu > ul { display: block !important; height: auto !important; opacity: 1 !important; }
}

@media (max-width: 960px) {
  .container { width: calc(100% - 32px); max-width: 728px; }
  #navigation > .container { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 12px 0; }
  #main { padding-top: 8px; }
  header#main { border-bottom: 8px solid #ee6a8b; }
  #navigation { min-height: 0; }
  #logo_right { order: 0; float: none; width: auto; flex: 1; margin: 0; display: flex; align-items: center; gap: 8px; }
  #logo_right img { max-width: 60px; }
  #info { text-align: left; margin: 0; padding: 0; flex: 1; }
  #info strong { font-size: 19px; }
  #mobile_nav {
    order: 1; display: none; position: static; width: auto; min-height: 44px;
    padding: 10px 16px; border: 1px solid #d6d6d6; border-radius: 4px;
    background: #fafafa; color: #4d4d4d; font: inherit; cursor: pointer;
  }
  .dg-navigation-ready #mobile_nav { display: block; }
  nav#top-menu {
    order: 2; position: absolute; top: 100%; left: auto; right: 0;
    float: none; width: 260px; max-width: 85vw; padding: 0;
    max-height: 70vh; overflow-y: auto; overscroll-behavior: contain;
    background: rgba(250, 250, 250, 0.9); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
  }
  nav#top-menu > ul, nav#top-menu > ul.mobile_nav {
    display: block; width: 100%; height: auto; margin: 0; padding: 0; border: 0;
    opacity: 1; background: transparent; box-sizing: border-box;
  }
  .dg-navigation-ready #top-menu[hidden] { display: none; }
  #top-menu li { float: none; display: block; padding: 0; }
  #top-menu a, #top-menu ul li a {
    display: block; float: none; width: auto; min-height: 44px; box-sizing: border-box;
    padding: 12px 16px !important; line-height: 1.5; border-bottom: 1px solid #e4e4e4;
    background: none;
  }
  #top-menu .sub { display: none; }
  #top-menu li ul {
    position: static; display: block !important; visibility: visible !important;
    opacity: 1 !important; width: auto !important; height: auto !important;
    padding: 0 0 0 16px; box-shadow: none; border: 0; background: transparent;
  }
  #top-menu-shadow, #bottom-menu-shadow { display: none; }
  #featured, #featured .flex-viewport { max-width: 100%; }
  #featured #controllers-wrapper-left { left: 50% !important; transform: translateX(-50%); }
  #featured .flex-direction-nav li a.next, #featured .flex-direction-nav .flex-next { right: 0; }
  .slides span.overlay { width: 100%; height: 100%; }
  p.flex-caption { width: 100%; padding: 12px 16px; box-sizing: border-box; }
  #slogan p { font-size: 20px; line-height: 1.6; }
  #main_content, #calender, #about, #recent-posts, #work-info { min-width: 0; max-width: 100%; box-sizing: border-box; }
  #main_content table { max-width: 100%; }
  #main_content td, #main_content th { overflow-wrap: anywhere; }
  #main_content iframe { width: 100%; }
  .entry, .entry_content, #copyright { overflow-wrap: anywhere; }
}

@media (max-width: 767px) {
  .container { max-width: none; }
  #main_content, #calender, #about, #recent-posts, #work-info {
    width: 100%; float: none; margin-left: 0; margin-right: 0;
  }
  #sidebar { width: 100%; float: none; padding: 24px 0; box-sizing: border-box; }
  #about, #recent-posts { padding-bottom: 24px; }
  #recent-work { padding-top: 20px; }
  #work-info { padding-bottom: 16px; }
  #slogan { padding: 16px; background: none; margin-bottom: 24px; }
  #slogan #right-quote { display: none; }
  #featured { display: block; }
  #featured_shadow { display: none; }
  #featured #controllers-wrapper div#controllers-wrapper-left { position: static; transform: none; padding: 0; background: none; }
  #featured #controllers-wrapper div#controllers-wrapper-right { padding: 0; background: none; }
  #featured #controllers-wrapper ul#controllers { display: flex; justify-content: center; align-items: center; height: 32px; padding: 0; background: none; }
  #featured #controllers li { float: none; margin: 0 4px; }
  #slogan p { font-size: 18px; }
  #featured .flex-caption { position: static; color: #fff; background: #4d4d4d; text-shadow: none; }
  .slides span.overlay { display: none; }
  .footer-widget { width: 100%; float: none; margin: 0 0 24px; }
  #form_table, #main_content table { width: 100%; }
  #booking-form input[type='text'],
  #booking-form input[type='email'],
  #booking-form input[type='tel'],
  #booking-form select,
  #booking-form textarea { font-size: 16px; min-height: 44px; }
  #booking-reservation-fieldset input[type='submit'],
  #booking-reservation-fieldset input[type='button'] { min-height: 44px; padding: 10px 16px; }
  #booking-reservation-fieldset td span { white-space: normal; }
  #booking-reservation-fieldset dl.charge { grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); }
  #main_content .wp-caption { max-width: 100%; }
}

@media (max-width: 600px) {
  #booking-reservation-fieldset dl.charge { grid-template-columns: minmax(0, 1fr); }
  #booking-form fieldset > table > tbody > tr,
  #booking-form fieldset > table > tbody > tr > th,
  #booking-form fieldset > table > tbody > tr > td {
    display: block; width: 100%; box-sizing: border-box; text-align: left;
  }
  #booking-form fieldset > table > tbody > tr > th { padding: 12px 8px; background: #f4f4f4; }
  #booking-form fieldset > table > tbody > tr > td { padding: 12px 8px; }
  #booking-form fieldset > table > tbody > tr > td::after { content: ''; display: block; clear: both; }
  #main_content .td_left, #main_content .td_right { padding: 6px; }
}

@media (max-width: 359px) {
  .container { width: calc(100% - 24px); }
  #navigation > .container { gap: 8px; }
  #logo_right img { max-width: 44px; }
  #info { font-size: 10px; }
  #mobile_nav { padding: 10px; }
  #booking-reservation-fieldset dl.charge { grid-template-columns: 1fr; }
}
