/* Compatibility overrides for les-4-saisons / editable-site, scoped and reversible. */
:root {
  --l4sc-header-estimate: 146px;
  --l4sc-admin-offset: 0px;
  --chrome-h: calc(var(--l4sc-header-estimate) + 31px);
}
html {
  scroll-padding-top: calc(var(--l4sc-sticky-height, var(--l4sc-header-estimate)) + var(--l4sc-admin-offset) + 18px);
}

/* One content gutter, not an outer header gutter plus an inner shell gutter. */
.l4sc-layout .site-header {
  height: auto !important;
  min-height: 0;
  padding: 0 !important;
  display: block;
}
.l4sc-layout .header-shell {
  width: min(100%, calc(var(--max, 1320px) + 2 * var(--gutter, 40px)));
  min-height: 84px;
  padding: 12px var(--gutter, 40px);
  margin: 0 auto;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: clamp(16px, 2vw, 28px);
}
.l4sc-active .header-shell .l4sc-logo-link { max-width: min(100%, 40vw); }
.l4sc-active .brand-link.l4sc-logo-link { gap: 0; }
.l4sc-active .mobile-drawer-head .l4sc-logo-link { max-width: calc(100% - 56px); width: var(--l4sc-logo-mobile, 240px); }
.l4sc-layout .desktop-nav { justify-content: flex-end; }
.l4sc-layout .nav-list { justify-content: flex-end; gap: clamp(2px, .7vw, 10px); }
.l4sc-layout .nav-trigger { font-size: 12px; }
.l4sc-layout .header-tools { min-width: 0; }
.l4sc-layout .language-switcher { flex: 0 0 auto; }
.l4sc-layout .mega-panel { top: 100%; }
.l4sc-layout .mega-panel-inner { align-items: stretch; }
.l4sc-layout .mega-links { align-content: start; }
.l4sc-layout .mega-panel[hidden] { display: none !important; }

/* Root cause: Gutenberg's 24px flow margins were applied to grid/flex children.
   Gap handles spacing in these structural containers. Textual groups keep their margins. */
.l4sc-layout #app :is(
  .stay-grid, .mini-grid, .explore-grid, .spot-grid, .feature-grid,
  .intro-grid, .experience-grid, .moto-grid, .faq-grid, .contact-grid, .twin-grid,
  .gallery-grid, .trust-inner, .pill-grid, .route-list, .route-panel-head,
  .section-heading, .explore-heading, .moto-feature, .callout-actions,
  .contact-actions, .document-links, .inner-bottom-links, .wp-block-buttons,
  .stay-card, .stay-photo, .mini-card, .explore-card, .spot-card
) > * {
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
  min-width: 0;
}
.l4sc-layout #app [data-l4sc-structural] > * {
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
}
.l4sc-layout #app :is(.stay-grid, .mini-grid, .explore-grid, .spot-grid, .feature-grid, .route-list) {
  display: grid;
  align-items: stretch;
}
.l4sc-layout #app :is(.stay-card, .explore-card, .spot-card) {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  align-self: stretch;
}
.l4sc-layout #app :is(.stay-card, .explore-card, .route-row):hover { transform: none !important; }
.l4sc-layout #app .stay-photo {
  height: auto;
  aspect-ratio: 1.12 / 1;
  flex: 0 0 auto;
  width: 100%;
}
.l4sc-layout #app .stay-photo .card-image { position: absolute; inset: 0; width: 100%; height: 100%; }
.l4sc-layout #app .stay-photo .card-number { margin: 0 !important; }
.l4sc-layout #app :is(.stay-photo, .explore-image, .spot-image) img { object-fit: cover; }

/* Adaptive content: no fixed text height and no truncated descriptions. */
.l4sc-layout #app .stay-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  margin: 0 !important;
  padding: 26px;
  gap: 0;
  min-height: 245px;
}
.l4sc-layout #app .stay-content > * { margin: 0 !important; }
.l4sc-layout #app .stay-content .card-meta { margin-bottom: 14px !important; line-height: 1.5; }
.l4sc-layout #app .stay-content h3 { line-height: 1.18; }
.l4sc-layout #app .stay-content .card-subtitle { margin-top: 7px !important; line-height: 1.45; }
.l4sc-layout #app .stay-content .card-description {
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
  overflow: visible;
  margin: 15px 0 24px !important;
  line-height: 1.75;
}
.l4sc-layout #app :is(.stay-content, .mini-content, .explore-card-copy) > .wp-block-buttons {
  margin-top: auto !important;
  margin-bottom: 0 !important;
  padding-top: 8px;
}
.l4sc-layout #app .mini-card { height: 100%; grid-column: auto !important; }
.l4sc-layout #app .mini-content { display: flex; flex-direction: column; gap: 10px; margin: 0 !important; }
.l4sc-layout #app .mini-content > * { margin: 0 !important; }
.l4sc-layout #app .mini-content p { margin-bottom: 12px !important; }
.l4sc-layout #app .explore-card { grid-column: auto !important; }
.l4sc-layout #app .explore-card-copy {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 !important;
}
.l4sc-layout #app .explore-card-copy > * { margin: 0 !important; }
.l4sc-layout #app .explore-card-copy > p:not(.explore-meta) { margin-bottom: 10px !important; }
.l4sc-layout #app .spot-card { grid-column: auto !important; }
.l4sc-layout #app .spot-copy { flex: 1 1 auto; display: flex; flex-direction: column; gap: 10px; }
.l4sc-layout #app .spot-copy > * { margin: 0 !important; }
.l4sc-layout #app :is(.feature-card, .route-row) { display: flex; flex-direction: column; gap: 12px; height: 100%; }
.l4sc-layout #app :is(.feature-card, .route-row) > * { margin: 0 !important; }
.l4sc-layout #app .feature-card h3 { margin-top: 8px !important; }
.l4sc-layout #app .feature-description:empty { display: none; }
.l4sc-layout #app .route-row { gap: 8px; }
.l4sc-layout #app .moto-feature-text { margin: 0 !important; }
.l4sc-layout #app .moto-feature-text > h3 { margin-top: 0; }
.l4sc-layout #app .wp-block-button { min-width: 0; }
.l4sc-layout #app .wp-block-button__link { max-width: 100%; overflow-wrap: anywhere; }

/* Known grids: explicit columns at every size, including inner pages. */
.l4sc-layout #app :is(.stay-grid, .mini-grid, .explore-grid, .spot-grid) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.l4sc-layout #app .feature-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.l4sc-layout #app .route-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.l4sc-layout #app .booking-form { align-items: stretch; }
.l4sc-layout #app .booking-form :is(label, input, select, button) { min-width: 0; max-width: 100%; box-sizing: border-box; }
.l4sc-layout #app .booking-form :is(input, select) { width: 100%; }
.l4sc-layout #app .booking-form label > span { display: block; }
.l4sc-layout #app .booking-button { white-space: normal; min-height: 54px; }
.l4sc-layout #app .entry-content > section.section { scroll-margin-top: 18px; }

/* Keep navigation, toggles and drawers on the same breakpoint.
   The existing styles hid desktop navigation before displaying the mobile toggle. */
@media (min-width: 1181px) {
  .l4sc-layout .desktop-nav { display: flex !important; }
  .l4sc-layout .mobile-menu-toggle { display: none !important; }
}
@media (max-width: 1180px) {
  .l4sc-layout .header-shell { grid-template-columns: minmax(0, 1fr) auto; padding-block: 10px; }
  .l4sc-layout .desktop-nav { display: none !important; }
  .l4sc-layout .mobile-menu-toggle { display: inline-flex !important; }
  .l4sc-layout .mega-panel { display: none !important; }
  .l4sc-layout .mobile-booking-bar { display: block; }
  .l4sc-active .header-shell .l4sc-logo-link { max-width: calc(100% - 8px); }
  .l4sc-layout .menu-backdrop.is-visible { z-index: 120; inset: 0; }
}
.l4sc-layout .site-header.l4sc-compact .header-shell { grid-template-columns: minmax(0, 1fr) auto; }
.l4sc-layout .site-header.l4sc-compact .desktop-nav { display: none !important; }
.l4sc-layout .site-header.l4sc-compact .mobile-menu-toggle { display: inline-flex !important; }
.l4sc-layout .site-header.l4sc-compact .mega-panel { display: none !important; }
.l4sc-layout .mobile-drawer-head { gap: 12px; }
.l4sc-layout .mobile-close { flex: 0 0 40px; }
.l4sc-layout .mobile-drawer { max-width: 100vw; }

@media (max-width: 1100px) {
  .l4sc-layout #app :is(.stay-grid, .mini-grid, .explore-grid, .spot-grid, .feature-grid) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .l4sc-layout #app .mini-card { grid-template-columns: 36% minmax(0, 1fr); }
  .l4sc-layout #app .stay-photo { aspect-ratio: 1.3 / 1; }
  .l4sc-layout #app .stay-content { padding: 24px; }
}
@media (max-width: 900px) {
  .l4sc-layout #app .route-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .l4sc-layout #app :is(.stay-grid, .mini-grid, .explore-grid, .spot-grid, .feature-grid, .route-list) { grid-template-columns: minmax(0, 1fr); }
  .l4sc-layout #app .stay-photo { aspect-ratio: 1.35 / 1; }
  .l4sc-layout #app .stay-content { min-height: 0; padding: 24px; }
  .l4sc-layout #app .stay-content h3 { font-size: 28px; }
  .l4sc-layout #app .card-description { font-size: 13px; }
  .l4sc-layout #app .mini-content p { font-size: 12px; }
  .l4sc-layout #app .trust-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .l4sc-layout .topline-note { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .l4sc-layout .header-tools > .language-switcher { display: none; }
}
@media (max-width: 600px) {
  .l4sc-layout .header-shell { padding-block: 9px; }
  .l4sc-layout .mobile-drawer { padding-inline: 20px; }
}
@media (max-width: 400px) {
  .l4sc-layout #app .pill-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Admin bar is fixed on desktop but scrolls away on small screens. */
@media (min-width: 783px) { body.admin-bar.l4sc-active { --l4sc-admin-offset: 32px; } }
@media (min-width: 601px) and (max-width: 782px) {
  body.admin-bar.l4sc-active { --l4sc-admin-offset: 46px; }
  body.admin-bar.l4sc-layout .site-header { top: 46px; }
}
@media (max-width: 600px) { body.admin-bar.l4sc-layout .site-header { top: 0; } }
@media (prefers-reduced-motion: reduce) {
  .l4sc-layout #app :is(.stay-card, .explore-card, .route-row, .stay-photo img) { transition: none !important; }
}

/* Align hero/subhero text with the other section containers. */
.l4sc-layout #app .hero-inner {
  width: min(var(--max, 1320px), calc(100% - var(--gutter, 40px) - var(--gutter, 40px))) !important;
  max-width: var(--max, 1320px) !important;
  padding-inline: 0 !important;
}
.l4sc-layout #app .entry-content > section.subhero { padding-inline: 0 !important; }
.l4sc-layout #app .subhero-inner {
  width: min(100%, calc(var(--max, 1320px) + var(--gutter, 40px) + var(--gutter, 40px))) !important;
  max-width: none !important;
  padding-inline: var(--gutter, 40px) !important;
}
.l4sc-active .topline-contact { color: #f4f1e8 !important; }
/* Match the theme's high-specificity section gutter rule, including its :not() selectors. */
body.l4sc-layout #app .entry-content > section.section.subhero {
  padding-left: 0 !important;
  padding-right: 0 !important;
}
/* If grid corrections are disabled for troubleshooting, the large logo still fits its header. */
body.l4sc-logo-enabled:not(.l4sc-layout) .site-header { height: auto !important; padding-block: 0; }
body.l4sc-logo-enabled:not(.l4sc-layout) .header-shell { min-height: 84px; padding-block: 12px; }
/* Utility bar and carousel UI share the same centered content edges on wide screens. */
.l4sc-layout .topline-inner {
  width: min(100%, calc(var(--max, 1320px) + var(--gutter, 40px) + var(--gutter, 40px)));
}
.l4sc-layout #app .hero .carousel-dots {
  left: max(var(--gutter, 40px), calc((100% - var(--max, 1320px)) / 2));
}
.l4sc-layout #app .hero :is(.carousel-controls, .hero-slide-caption) {
  right: max(var(--gutter, 40px), calc((100% - var(--max, 1320px)) / 2));
}
