/* Georgshof Mobile-Feinschliff v1.9 – nur Smartphone/Tablet, kein Desktop-Restyling. */
@media (max-width: 767px) {
  html { scroll-padding-top: 4.5rem; }
  body.ghmi19-mobile-enabled { overflow-x: clip; }
  body.ghmi19-mobile-enabled :is(main, .site-main, .entry-content, .wp-block-post-content) { min-width: 0; }

  /* Horizontaler Leserhythmus mit Mindestabstand */
  body.ghmi19-mobile-enabled :is(.entry-content, .wp-block-post-content) :is(h1, h2, h3, p, ul, ol) {
    overflow-wrap: break-word;
  }
  body.ghmi19-mobile-enabled :is(.entry-content, .wp-block-post-content) h1,
  body.ghmi19-mobile-enabled :is(.entry-hero, .gh-hero, .gs-hero, .georgshof-hero) h1 {
    font-size: clamp(2rem, 9vw, 2.625rem);
    line-height: 1.13;
    letter-spacing: -.025em;
  }
  body.ghmi19-mobile-enabled :is(.entry-content, .wp-block-post-content) h2 {
    font-size: clamp(1.65rem, 7vw, 2.1rem);
    line-height: 1.19;
    letter-spacing: -.015em;
  }
  body.ghmi19-mobile-enabled :is(.entry-content, .wp-block-post-content) h3 {
    font-size: clamp(1.3rem, 5.5vw, 1.55rem);
    line-height: 1.27;
  }
  body.ghmi19-mobile-enabled :is(.entry-content, .wp-block-post-content) p {
    line-height: 1.6;
  }

  /* Häufige WordPress- und Georgshof-Hero-Klassen: mobile Höhe und lesbare Titel. */
  body.ghmi19-mobile-enabled :is(.entry-content, .wp-block-post-content) > .wp-block-cover:first-child,
  body.ghmi19-mobile-enabled :is(.gh-hero, .gs-hero, .georgshof-hero, .home-hero) {
    min-height: clamp(26rem, 116vw, 32.5rem) !important;
    box-sizing: border-box;
  }
  body.ghmi19-mobile-enabled :is(.entry-content, .wp-block-post-content) > .wp-block-cover:first-child .wp-block-cover__inner-container {
    width: min(100%, 34rem);
    padding-inline: 1.25rem;
    box-sizing: border-box;
  }

  /* WordPress-Spalten nebeneinander sind auf schmalen Displays oft zu eng. */
  body.ghmi19-mobile-enabled :is(.entry-content, .wp-block-post-content) .wp-block-columns:not(.is-not-stacked-on-mobile) {
    flex-direction: column;
    gap: clamp(1rem, 4vw, 1.4rem);
  }
  body.ghmi19-mobile-enabled :is(.entry-content, .wp-block-post-content) .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
    flex-basis: 100% !important;
    width: 100%;
  }
  body.ghmi19-mobile-enabled :is(.gh-card-grid, .gs-card-grid, .georgshof-card-grid, .gh-news-grid, .gs-news-grid) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 1.15rem;
  }
  body.ghmi19-mobile-enabled :is(.gh-card, .gs-card, .georgshof-card, .gh-news-card, .gs-news-card, .georgshof-news-card) {
    min-width: 0;
    overflow: hidden;
  }
  body.ghmi19-mobile-enabled :is(.gh-news-card, .gs-news-card, .georgshof-news-card) img {
    max-width: 100%;
    height: auto;
  }

  /* Minimum bei Interaktionsflächen, ohne Buttons pauschal bildschirmbreit zu machen. */
  body.ghmi19-mobile-enabled :is(.wp-block-button__link, .button, button, input[type="submit"], .gh-button, .gs-button) {
    min-height: 44px;
    max-width: 100%;
    box-sizing: border-box;
  }
  body.ghmi19-mobile-enabled :is(.main-navigation, .mobile-navigation, .site-header, .site-header-wrap) a {
    min-height: 42px;
  }
  body.ghmi19-mobile-enabled :is(.entry-content, .wp-block-post-content) :is(img, iframe, video, embed) {
    max-width: 100%;
  }
  body.ghmi19-mobile-enabled :is(.entry-content, .wp-block-post-content) :is(.wp-block-buttons, .gh-actions, .gs-actions) {
    gap: .7rem;
    flex-wrap: wrap;
  }
  body.ghmi19-mobile-enabled :is(.entry-content, .wp-block-post-content) .wp-block-table,
  body.ghmi19-mobile-enabled :is(.entry-content, .wp-block-post-content) .table-responsive {
    max-width: 100%;
    overflow-x: auto;
  }

  /* Zusätzliche optionale Buchungsleiste, standardmäßig AUS. */
  body.ghmi19-with-quickbar { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .ghmi19-quickbar {
    position: fixed;
    display: flex;
    inset-inline: 0;
    bottom: 0;
    z-index: 9998;
    gap: .65rem;
    padding: .65rem max(1rem, env(safe-area-inset-right, 0px)) calc(.65rem + env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
    background: #fbf8f1;
    border-top: 1px solid #e2dacb;
    box-shadow: 0 -5px 18px rgb(0 0 0 / .07);
    box-sizing: border-box;
  }
  .ghmi19-quickbar a {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1 1 0;
    min-width: 0;
    min-height: 46px;
    padding: .65rem .8rem;
    text-align: center;
    text-decoration: none;
    font: inherit;
    font-size: .94rem;
    font-weight: 650;
    line-height: 1.2;
    border-radius: 10px;
    box-sizing: border-box;
  }
  .ghmi19-quickbar__restaurant { color: #305044; background: transparent; border: 1px solid #305044; }
  .ghmi19-quickbar__booking { color: #fff; background: #305044; border: 1px solid #305044; }
  .ghmi19-quickbar a:focus-visible { outline: 3px solid #aa814e; outline-offset: 3px; }
}
@media (min-width: 768px) { .ghmi19-quickbar { display: none; } }
@media (max-width: 375px) {
  body.ghmi19-mobile-enabled :is(.entry-content, .wp-block-post-content) h1 { font-size: clamp(1.9rem, 8.6vw, 2.2rem); }
  .ghmi19-quickbar { gap: .4rem; padding-inline: .75rem; }
  .ghmi19-quickbar a { font-size: .86rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ghmi19-quickbar * { transition: none !important; animation: none !important; }
}

/* Gezielt auf die tatsächlichen Georgshof-1.8-Komponenten abgestimmt. */
@media (max-width: 650px) {
  body.ghmi19-mobile-enabled .gh-wrap { width: calc(100% - 40px); }
  body.ghmi19-mobile-enabled .gh-hero,
  body.ghmi19-mobile-enabled .gh-hero--home { min-height: 0 !important; }
  body.ghmi19-mobile-enabled .gh-hero-copy { padding: 35px 20px 26px; }
  body.ghmi19-mobile-enabled .gh-hero h1,
  body.ghmi19-mobile-enabled .gh-hero--home h1 { font-size: clamp(36px, 10vw, 42px); line-height: 1.12; }
  body.ghmi19-mobile-enabled .gh-hero-foot { margin-top: 20px !important; }
  body.ghmi19-mobile-enabled .gh-hero-photo { height: clamp(230px, 62vw, 310px); min-height: 0; }
  body.ghmi19-mobile-enabled .gh-section:not(.gh-section--compact) { padding-top: 48px; padding-bottom: 48px; }
  body.ghmi19-mobile-enabled .gh-intro { margin-bottom: 25px; }
  body.ghmi19-mobile-enabled .gh-cards,
  body.ghmi19-mobile-enabled .gh-event-grid,
  body.ghmi19-mobile-enabled .gh-more-grid { grid-template-columns: minmax(0,1fr); }
  body.ghmi19-mobile-enabled .gh-card-copy { padding: 20px 19px 22px; }
  body.ghmi19-mobile-enabled .gh-event-copy { padding: 20px 18px 21px; }
  body.ghmi19-mobile-enabled .gh-event-copy h3 { font-size: clamp(23px, 6.2vw, 27px); }
  body.ghmi19-mobile-enabled .gh-event-image { aspect-ratio: 16 / 10; }
  body.ghmi19-mobile-enabled .gh-actions { align-items: stretch; gap: 9px; }
  body.ghmi19-mobile-enabled .gh-hero .gh-actions .gh-button { width: 100%; justify-content: center; min-height: 46px; }
  body.ghmi19-mobile-enabled .gh-event-primary { min-height: 46px; }
  body.ghmi19-mobile-enabled .gh-news-head { flex-direction: column; gap: 12px; align-items: stretch; }
  body.ghmi19-mobile-enabled .gh-more-discover .gh-more-grid { gap: 10px; }
  body.ghmi19-mobile-enabled .gh-brand-name { overflow-wrap: normal; }
}
