/* Breizh Cape 3.3.4 — targeted correction from live desktop screenshots + Home Gutenberg export.
   Loaded last. Keeps page content and all existing page templates intact. */

/* Shared full-width and container geometry */
.bc-home { overflow-x: clip; }
.bc-home .bc-container,
.bc-home .bc-home-stay-section .bc-container,
.bc-home .bc-trust-section .bc-container,
.bc-home .bc-home-belowfold .bc-container,
.bc-home .bc-home-belowfold + .bc-section > .bc-container {
  width: min(1420px, calc(100% - 64px)) !important;
  max-width: 1420px !important;
  margin-inline: auto !important;
}
.bc-home .bc-section.alignfull { width: 100% !important; max-width: none !important; }

/* Header: give the brand, navigation and CTA enough room on wide screens. */
.bc-header-inner {
  width: min(1600px, calc(100% - 64px)) !important;
  max-width: 1600px !important;
  gap: 24px !important;
}
.bc-brand { flex: 0 0 210px !important; min-width: 190px !important; }
.bc-brand-link { max-width: 100%; }
.bc-brand-image, .custom-logo { width: 100% !important; max-width: 210px !important; max-height: 72px !important; }
.bc-primary-navigation { min-width: 0; }
.bc-nav-list { gap: clamp(10px, 1.15vw, 20px) !important; }
.bc-nav-list > li { min-width: 0; }
.bc-nav-list a { font-size: clamp(.76rem, .78vw, .88rem) !important; }
.bc-header-actions { flex: 0 0 auto; }

/* Break to hamburger before the navigation can collide with the logo. */
@media (max-width: 1480px) {
  .bc-header-inner { min-height: 78px !important; gap: 14px !important; }
  .bc-brand { flex: 0 1 205px !important; }
  .bc-brand-image, .custom-logo { max-width: 195px !important; }
  .bc-menu-toggle {
    display: flex !important; align-items: center; justify-content: center;
    width: 46px; height: 46px; margin-left: auto; flex: 0 0 46px;
    border: 1px solid rgba(30,57,67,.22); border-radius: 4px;
    background: transparent; position: relative; z-index: 102;
  }
  .bc-primary-navigation {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    z-index: 101; margin: 0; padding: 10px 24px 20px;
    background: #fffaf1; border-top: 1px solid #ded3c2;
    border-bottom: 1px solid #ded3c2; box-shadow: 0 12px 24px rgba(0,0,0,.12);
  }
  .bc-primary-navigation.is-open { display: block !important; }
  .bc-nav-list { display: grid !important; gap: 0 !important; }
  .bc-nav-list > li > a { display: block; padding: 13px 4px; font-size: 1rem !important; border-bottom: 1px solid rgba(30,57,67,.10); white-space: normal; }
  .bc-nav-list .sub-menu { display: block; position: static; min-width: 0; padding: 0 0 0 16px; border: 0; box-shadow: none; background: transparent; }
  .bc-header-actions { display: none !important; }
}

/* Hero: restore a safe inset for text, prevent left-edge clipping. */
.bc-home .bc-hero,
.bc-home .bc-hero-grid.wp-block-columns { min-height: clamp(560px, 56vw, 760px) !important; }
.bc-home .bc-hero-copy,
.bc-home .bc-hero-grid > .bc-hero-copy,
.bc-home .bc-hero-grid > .wp-block-column:first-child {
  box-sizing: border-box !important;
  width: 100% !important; max-width: none !important;
  padding-left: max(32px, calc((100vw - 1420px) / 2)) !important;
  padding-right: 32px !important;
  margin-left: 0 !important; transform: none !important;
  overflow: visible !important;
}
.bc-home .bc-hero-copy h1 { max-width: 760px !important; }
.bc-home .bc-hero-copy .bc-lead,
.bc-home .bc-hero-copy > p:not(.bc-eyebrow) { max-width: 620px !important; }

/* Wave: break out of Gutenberg's constrained group and span the viewport. */
.bc-home .bc-breton-wave {
  display: block !important; position: relative !important; z-index: 4 !important;
  width: 100vw !important; max-width: none !important;
  height: auto !important; aspect-ratio: 2172 / 230 !important;
  margin: -1px 0 0 calc(50% - 50vw) !important;
  padding: 0 !important; overflow: hidden !important;
  background-image: url('../images/breizh-cape-wave-divider.webp') !important;
  background-repeat: no-repeat !important; background-position: center !important;
  background-size: 100% 100% !important;
}
.bc-home .bc-breton-wave > svg { display: none !important; }

/* Trust row and stay section: use the desktop width consistently. */
.bc-home .bc-trust-row.wp-block-columns { width: 100% !important; }
.bc-home .bc-home-stay.wp-block-columns {
  display: grid !important; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr) !important;
  gap: clamp(28px, 5vw, 76px) !important; align-items: center !important;
}
.bc-home .bc-home-stay > .wp-block-column { width: auto !important; max-width: none !important; min-width: 0 !important; }
.bc-home .bc-home-stay-photo img { display: block; width: 100% !important; aspect-ratio: 16 / 9 !important; object-fit: cover !important; }

/* Restaurant: explicitly equal columns, regardless of inherited Gutenberg flex sizing. */
.bc-home .bc-feature-section .bc-container { width: 100% !important; max-width: none !important; }
.bc-home .bc-feature-band.wp-block-columns {
  display: grid !important; grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important;
  width: 100% !important; max-width: none !important; gap: 0 !important;
  align-items: stretch !important; margin: 0 !important;
}
.bc-home .bc-feature-band > .wp-block-column {
  width: auto !important; max-width: none !important; min-width: 0 !important;
  flex: initial !important; margin: 0 !important;
}
.bc-home .bc-feature-band > .wp-block-column:first-child { grid-column: 1; }
.bc-home .bc-feature-band > .wp-block-column:last-child { grid-column: 2; }
.bc-home .bc-feature-band .bc-photo,
.bc-home .bc-feature-band .bc-photo img { width: 100% !important; height: 100% !important; min-height: 480px !important; margin: 0 !important; object-fit: cover !important; }
.bc-home .bc-feature-band .bc-feature-content {
  box-sizing: border-box !important; width: 100% !important; max-width: none !important;
  min-height: 480px !important; height: 100% !important;
  padding: clamp(36px, 5vw, 84px) !important;
}
.bc-home .bc-feature-band .bc-feature-content > .wp-block-group__inner-container { width: min(100%, 620px) !important; max-width: 620px !important; }

/* Adventures: use a wider, balanced three-card row. */
.bc-home .bc-home-belowfold .wp-block-columns {
  display: grid !important; grid-template-columns: repeat(3, minmax(0,1fr)) !important;
  gap: 22px !important; width: 100% !important; margin: 28px 0 0 !important;
}
.bc-home .bc-home-belowfold .wp-block-column { min-width: 0 !important; width: auto !important; max-width: none !important; margin: 0 !important; }
.bc-home .bc-home-belowfold .bc-content-card { min-height: 0 !important; height: 100% !important; padding: 26px !important; }

/* Discover: no fixed height, no narrow text column, image and text share space. */
.bc-home .bc-home-belowfold + .bc-section {
  min-height: 0 !important; height: auto !important; margin: 0 !important;
  padding: clamp(42px, 5.5vw, 82px) 0 !important;
}
.bc-home .bc-home-belowfold + .bc-section > .bc-container { width: min(1420px, calc(100% - 64px)) !important; max-width: 1420px !important; }
.bc-home .bc-home-belowfold + .bc-section .bc-split.wp-block-columns {
  display: grid !important; grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important;
  gap: clamp(32px, 5vw, 76px) !important; align-items: center !important; margin: 0 !important;
}
.bc-home .bc-home-belowfold + .bc-section .bc-split > .wp-block-column {
  width: auto !important; max-width: none !important; min-width: 0 !important;
  flex: initial !important; margin: 0 !important;
}
.bc-home .bc-home-belowfold + .bc-section .bc-split > .wp-block-column:last-child { max-width: none !important; }
.bc-home .bc-home-belowfold + .bc-section .wp-block-image { width: 100% !important; margin: 0 !important; }
.bc-home .bc-home-belowfold + .bc-section .wp-block-image img {
  display: block; width: 100% !important; height: auto !important;
  aspect-ratio: 16 / 9 !important; object-fit: cover !important;
}
.bc-home .bc-home-belowfold + .bc-section h2 { max-width: 700px !important; font-size: clamp(2.4rem, 4vw, 4.1rem) !important; }

/* Tablet and phone: deliberate stacking and no inherited desktop minimum heights. */
@media (max-width: 760px) {
  .bc-header-inner { width: calc(100% - 34px) !important; min-height: 72px !important; }
  .bc-brand { flex: 0 1 175px !important; min-width: 0 !important; }
  .bc-brand-image, .custom-logo { max-width: 170px !important; max-height: 58px !important; }
  .bc-home .bc-container,
  .bc-home .bc-home-stay-section .bc-container,
  .bc-home .bc-trust-section .bc-container,
  .bc-home .bc-home-belowfold .bc-container,
  .bc-home .bc-home-belowfold + .bc-section > .bc-container { width: calc(100% - 36px) !important; }
  .bc-home .bc-hero, .bc-home .bc-hero-grid.wp-block-columns,
  .bc-home .bc-hero-grid > .wp-block-column:first-child { min-height: 560px !important; }
  .bc-home .bc-hero-copy,
  .bc-home .bc-hero-grid > .bc-hero-copy,
  .bc-home .bc-hero-grid > .wp-block-column:first-child {
    padding: 32px 20px !important; width: 100% !important; max-width: none !important;
    align-items: center !important; transform: none !important;
  }
  .bc-home .bc-hero-copy h1 { font-size: clamp(2.25rem, 8.5vw, 3.35rem) !important; }
  .bc-home .bc-breton-wave { width: 100vw !important; margin-left: calc(50% - 50vw) !important; aspect-ratio: 2172 / 230 !important; }
  .bc-home .bc-trust-row.wp-block-columns { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  .bc-home .bc-home-stay.wp-block-columns { grid-template-columns: minmax(0,1fr) !important; gap: 20px !important; }
  .bc-home .bc-feature-band.wp-block-columns { grid-template-columns: minmax(0,1fr) !important; }
  .bc-home .bc-feature-band > .wp-block-column:first-child,
  .bc-home .bc-feature-band > .wp-block-column:last-child { grid-column: 1 !important; }
  .bc-home .bc-feature-band .bc-photo,
  .bc-home .bc-feature-band .bc-photo img { min-height: 0 !important; height: auto !important; aspect-ratio: 16 / 9 !important; }
  .bc-home .bc-feature-band .bc-feature-content { min-height: 0 !important; height: auto !important; padding: 30px 24px 36px !important; }
  .bc-home .bc-home-belowfold .wp-block-columns { grid-template-columns: minmax(0,1fr) !important; gap: 14px !important; }
  .bc-home .bc-home-belowfold + .bc-section .bc-split.wp-block-columns { grid-template-columns: minmax(0,1fr) !important; gap: 22px !important; }
  .bc-home .bc-home-belowfold + .bc-section .bc-split > .wp-block-column { grid-column: 1 !important; }
  .bc-home .bc-home-belowfold + .bc-section .bc-split > .wp-block-column:first-child { order: 0; }
  .bc-home .bc-home-belowfold + .bc-section h2 { font-size: clamp(2rem, 7vw, 2.8rem) !important; }
}


/* 3.3.5 — Gutenberg constrained-child width correction.
   The .bc-container groups use Gutenberg's constrained layout. Core applies
   the global content width to their direct Columns blocks, so rows remain
   narrow even when the .bc-container itself is wide. Release that constraint
   for homepage layout rows only. */
.bc-home .bc-container.is-layout-constrained > .wp-block-columns,
.bc-home .bc-container.is-layout-constrained > .wp-block-group__inner-container > .wp-block-columns {
  display: grid !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.bc-home .bc-container.is-layout-constrained > .wp-block-columns > .wp-block-column,
.bc-home .bc-container.is-layout-constrained > .wp-block-group__inner-container > .wp-block-columns > .wp-block-column {
  min-width: 0 !important;
  max-width: none !important;
}
/* Preserve each section's intended responsive grid after releasing Gutenberg's width cap. */
.bc-home .bc-trust-section .bc-trust-row.wp-block-columns {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}
.bc-home .bc-home-stay-section .bc-home-stay.wp-block-columns {
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr) !important;
}
.bc-home .bc-feature-section .bc-feature-band.wp-block-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.bc-home .bc-home-belowfold .wp-block-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
.bc-home .bc-home-belowfold + .bc-section .bc-split.wp-block-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
@media (max-width: 760px) {
  .bc-home .bc-trust-section .bc-trust-row.wp-block-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .bc-home .bc-home-stay-section .bc-home-stay.wp-block-columns,
  .bc-home .bc-feature-section .bc-feature-band.wp-block-columns,
  .bc-home .bc-home-belowfold .wp-block-columns,
  .bc-home .bc-home-belowfold + .bc-section .bc-split.wp-block-columns {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}


/* 3.3.6 — responsive hero art direction and proportional sizing.
   The original 1.95:1 panorama is retained on desktop/tablet. Phones receive
   a purpose-cropped 4:5 frame so the bungalow, sea and beach remain visible
   without the extreme zoom produced by a tall cover container. */
.bc-home .bc-hero-image picture {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
}
.bc-home .bc-hero-image picture img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
}

@media (min-width: 761px) and (max-width: 1050px) {
  .bc-home .bc-hero-grid.wp-block-columns,
  .bc-home .bc-hero-grid > .wp-block-column:first-child {
    min-height: clamp(520px, 64vw, 620px) !important;
  }
  .bc-home .bc-hero-copy {
    width: min(100%, 780px) !important;
    max-width: 780px !important;
  }
  .bc-home .bc-hero-copy h1 {
    max-width: 780px !important;
    font-size: clamp(2.35rem, 5.1vw, 3.55rem) !important;
    line-height: 1.02 !important;
  }
  .bc-home .bc-hero-copy .bc-lead,
  .bc-home .bc-hero-copy > p:not(.bc-eyebrow) {
    max-width: 650px !important;
    font-size: clamp(1rem, 1.8vw, 1.12rem) !important;
  }
}

@media (max-width: 760px) {
  .bc-home .bc-hero {
    min-height: 0 !important;
  }
  .bc-home .bc-hero-grid.wp-block-columns {
    height: clamp(450px, 122vw, 530px) !important;
    min-height: clamp(450px, 122vw, 530px) !important;
    max-height: none !important;
  }
  .bc-home .bc-hero-grid > .wp-block-column:first-child {
    height: 100% !important;
    min-height: 0 !important;
    padding: 28px 21px 32px !important;
    align-items: center !important;
  }
  .bc-home .bc-hero-grid > .wp-block-column:nth-child(2),
  .bc-home .bc-hero-media,
  .bc-home .bc-hero-image,
  .bc-home .bc-hero-image figure {
    height: 100% !important;
    min-height: 0 !important;
  }
  .bc-home .bc-hero-image picture img {
    object-position: center center !important;
    object-fit: cover !important;
  }
  .bc-home .bc-hero-copy {
    width: 100% !important;
    max-width: 560px !important;
  }
  .bc-home .bc-hero-copy .bc-eyebrow {
    font-size: .64rem !important;
    letter-spacing: .14em !important;
    margin-bottom: 12px !important;
  }
  .bc-home .bc-hero-copy h1 {
    max-width: 560px !important;
    font-size: clamp(2rem, 8vw, 2.58rem) !important;
    line-height: 1.02 !important;
    margin-bottom: 14px !important;
  }
  .bc-home .bc-hero-copy .bc-lead,
  .bc-home .bc-hero-copy > p:not(.bc-eyebrow) {
    max-width: 440px !important;
    font-size: .96rem !important;
    line-height: 1.48 !important;
    margin-bottom: 13px !important;
  }
  .bc-home .bc-hero-copy .wp-block-buttons {
    margin-top: 16px !important;
    gap: 9px !important;
  }
  .bc-home .bc-hero-copy .wp-block-button__link {
    padding: 10px 14px !important;
    font-size: .86rem !important;
  }
}


/* 3.3.8 — mobile hero sequence: photo → Breton wave → copy.
   The desktop overlay remains unchanged. Flatten the Gutenberg columns only
   on phones so the wave can sit between the photograph and the copy panel. */
@media screen and (max-width: 760px) {
  body.home .bc-home .bc-hero {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }
  /* WordPress versions differ: some emit an inner Group wrapper, others do not. */
  body.home .bc-home .bc-hero > .wp-block-group__inner-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  body.home .bc-home .bc-hero > .bc-hero-grid.wp-block-columns,
  body.home .bc-home .bc-hero > .wp-block-group__inner-container > .bc-hero-grid.wp-block-columns,
  body.home .bc-home .bc-hero-grid.wp-block-columns {
    display: contents !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    aspect-ratio: auto !important;
  }
  /* Photo is first in the mobile flow and keeps its own portrait ratio. */
  body.home .bc-home .bc-hero-grid > .wp-block-column:nth-child(2),
  body.home .bc-home .bc-hero-media {
    order: 1 !important;
    position: relative !important;
    inset: auto !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  body.home .bc-home .bc-hero-media .bc-hero-image,
  body.home .bc-home .bc-hero-media .bc-hero-image figure,
  body.home .bc-home .bc-hero-media .bc-hero-image picture {
    position: relative !important;
    inset: auto !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  body.home .bc-home .bc-hero-media .bc-hero-image img {
    position: relative !important;
    inset: auto !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    aspect-ratio: 719 / 899 !important;
    object-fit: cover !important;
    object-position: center center !important;
  }
  /* The original divider is the immediate next flex item: no gap or overlap. */
  body.home .bc-home .bc-breton-wave {
    order: 2 !important;
    position: relative !important;
    display: block !important;
    flex: 0 0 auto !important;
    width: 100vw !important;
    max-width: none !important;
    height: auto !important;
    aspect-ratio: 2172 / 230 !important;
    margin: 0 0 0 calc(50% - 50vw) !important;
    padding: 0 !important;
    overflow: hidden !important;
    background-image: url('../images/breizh-cape-wave-divider.webp') !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: 100% 100% !important;
  }
  body.home .bc-home .bc-breton-wave > * { display: none !important; }
  /* Text becomes a separate panel below the divider, not an image overlay. */
  body.home .bc-home .bc-hero-grid > .wp-block-column:first-child {
    order: 3 !important;
    position: relative !important;
    inset: auto !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 30px 22px 34px !important;
    background: #fffaf1 !important;
    box-sizing: border-box !important;
    z-index: 1 !important;
  }
  body.home .bc-home .bc-hero-copy {
    width: 100% !important;
    max-width: 620px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    color: #1e3943 !important;
  }
  body.home .bc-home .bc-hero-copy .bc-eyebrow,
  body.home .bc-home .bc-hero-copy h1,
  body.home .bc-home .bc-hero-copy p,
  body.home .bc-home .bc-hero-copy .bc-lead {
    color: #1e3943 !important;
    text-shadow: none !important;
  }
  body.home .bc-home .bc-hero-copy h1 {
    max-width: 100% !important;
    font-size: clamp(2rem, 8.2vw, 2.7rem) !important;
    line-height: 1.04 !important;
    margin-bottom: 14px !important;
  }
  body.home .bc-home .bc-hero-copy .bc-lead,
  body.home .bc-home .bc-hero-copy > p:not(.bc-eyebrow) {
    max-width: 100% !important;
    font-size: clamp(.95rem, 3.8vw, 1.05rem) !important;
    line-height: 1.5 !important;
  }
  body.home .bc-home .bc-hero-copy .wp-block-buttons { margin-top: 18px !important; }
}


/* 3.3.10: mobile hero sequence — photo, wave, text */
@media (max-width: 760px) {
  body.home .bc-home .bc-hero { display:flex !important; flex-direction:column !important; gap:0 !important; }
  body.home .bc-home .bc-hero > .wp-block-group__inner-container { display:flex !important; flex-direction:column !important; gap:0 !important; }
  body.home .bc-home .bc-hero-grid.wp-block-columns { display:contents !important; }
  body.home .bc-home .bc-hero-media, body.home .bc-home .bc-hero-grid > .wp-block-column:nth-child(2) { order:1 !important; width:100% !important; margin:0 !important; }
  body.home .bc-home .bc-breton-wave { order:2 !important; margin:0 !important; position:relative !important; display:block !important; width:100vw !important; max-width:none !important; flex:0 0 auto !important; line-height:0 !important; }
  body.home .bc-home .bc-hero-copy, body.home .bc-home .bc-hero-grid > .wp-block-column:first-child { order:3 !important; position:relative !important; width:100% !important; margin:0 !important; padding:28px 22px 34px !important; background:var(--bc-cream,#f5f0e7) !important; }
  body.home .bc-home .bc-hero-media img { display:block !important; width:100% !important; height:auto !important; aspect-ratio:719/899 !important; object-fit:cover !important; margin:0 !important; }
  body.home .bc-home .bc-hero-copy > .bc-hero-panel { max-width:620px !important; margin-inline:auto !important; padding:0 !important; background:transparent !important; }
}
