/* ==========================================================================
   Fenestra Master Template 01 — fm-core.css
   Only what Elementor Free cannot do in its panel:
   coded header + mobile menu, data shortcodes (hours, status, social),
   image ratios, photo mosaic, gallery grid + filters, small resets, motion.

   Colours and fonts are NOT set here: every value reads the Elementor global
   (Site Settings → Global colours / fonts, items "Fenestra — …") with a fallback.
   Every selector is prefixed with .fm- or body.fm-site — nothing leaks out.
   ========================================================================== */

body.fm-site {
  --fm-bg: var(--e-global-color-fmbg, #F7F5F0);
  --fm-text: var(--e-global-color-fmtext, #252525);
  --fm-primary: var(--e-global-color-fmprimary, #252525);
  --fm-on-primary: var(--e-global-color-fmonprimary, #F7F5F0);
  --fm-accent: var(--e-global-color-fmaccent, #846B55);
  --fm-accent-dark: var(--e-global-color-fmaccentdark, #C9B49E);
  --fm-surface: var(--e-global-color-fmsurface, #E7DFD3);
  --fm-panel: var(--e-global-color-fmpanel, #FBFAF7);
  --fm-muted: var(--e-global-color-fmmuted, #5E5852);
  --fm-line: var(--e-global-color-fmline, rgba(37, 37, 37, .14));
  --fm-font-head: var(--e-global-typography-fmh2-font-family, "Space Grotesk"), "Helvetica Neue", Arial, sans-serif;
  --fm-font-body: var(--e-global-typography-fmbody-font-family, "Inter"), "Helvetica Neue", Arial, sans-serif;
  --fm-ease: cubic-bezier(.2, .7, .2, 1);
  --fm-gutter: clamp(20px, 5vw, 64px);
  --fm-header-h: 84px;
  background: var(--fm-bg);
  color: var(--fm-text);
  overflow-x: clip;
}

/* ---------- small resets for Elementor widgets on Fenestra pages ---------- */
body.fm-site .elementor-button,
body.fm-site .elementor-heading-title a,
body.fm-site .elementor-widget-text-editor a { text-decoration: none; }
body.fm-site .elementor-widget-heading .elementor-heading-title { text-wrap: balance; }
body.fm-site .elementor-widget-text-editor p { margin: 0 0 1em; }
body.fm-site .elementor-widget-text-editor p:last-child { margin-bottom: 0; }
body.fm-site .elementor-widget-text-editor a { color: inherit; transition: color .3s; }
body.fm-site .elementor-widget-text-editor a:hover { color: var(--fm-accent); }
body.fm-site :focus-visible { outline: 2px solid var(--fm-accent); outline-offset: 4px; }
.fm-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fm-hint { display: inline-block; padding: 4px 10px; font: 500 12px/1.4 system-ui, sans-serif; color: #7a4a00; background: #fff4d6; border: 1px dashed #d9a400; border-radius: 4px; }

/* Heading accents */
body.fm-site .fm-soft { display: block; color: var(--fm-accent); font-weight: 400; }
body.fm-site .fm-statement em, body.fm-site em.fm-em { font-style: normal; color: var(--fm-accent); }
body.fm-site .fm-label .elementor-heading-title { display: inline-flex; align-items: center; gap: 12px; }
body.fm-site .fm-label .elementor-heading-title::before { content: ""; width: 28px; height: 1px; background: currentColor; flex: none; }
body.fm-site .fm-maxw-12 .elementor-heading-title { max-width: 12em; }
body.fm-site .fm-maxw-13 .elementor-heading-title { max-width: 13em; }
body.fm-site .fm-measure { max-width: 36em; }

/* Underlined text link: Heading with a link + class fm-link */
body.fm-site .fm-link .elementor-heading-title a {
  display: inline-block; padding: 10px 0 6px; white-space: nowrap;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size .45s var(--fm-ease), color .3s;
}
body.fm-site .fm-link .elementor-heading-title a::after { content: " \2192"; }
body.fm-site .fm-link .elementor-heading-title a:hover { background-size: 0 1px; background-position: 100% 100%; color: var(--fm-accent); }

/* Buttons: colours/radius/padding live in each Button widget; this adds motion */
body.fm-site .fm-btn .elementor-button { line-height: 1; transition: background-color .35s, color .35s, border-color .35s; }
body.fm-site .fm-btn .elementor-button-icon { font-size: 12px; transition: transform .35s var(--fm-ease); }
body.fm-site .fm-btn .elementor-button:hover .elementor-button-icon { transform: translateX(4px); }
@media (max-width: 420px) {
  body.fm-site .fm-btns--stack > .elementor-widget-button, body.fm-site .fm-btns--stack .elementor-button { width: 100%; }
}

/* ---------- images with a fixed ratio (Image widget + classes fm-img fm-r-…) ---------- */
body.fm-site .fm-img, body.fm-site .fm-img .elementor-widget-container { width: 100%; }
body.fm-site .fm-img .elementor-widget-container { overflow: hidden; background: var(--fm-surface); }
body.fm-site .fm-img img {
  display: block; width: 100%; height: auto; max-width: none;
  aspect-ratio: var(--fm-r, 4 / 5); object-fit: cover; object-position: var(--fm-pos, 50% 50%);
  transition: transform 1.2s var(--fm-ease);
}
body.fm-site .fm-zoom:hover img { transform: scale(1.035); }
body.fm-site .fm-r-45 { --fm-r: 4 / 5; }
body.fm-site .fm-r-34 { --fm-r: 3 / 4; }
body.fm-site .fm-r-11 { --fm-r: 1 / 1; }
body.fm-site .fm-r-32 { --fm-r: 3 / 2; }
body.fm-site .fm-r-169 { --fm-r: 16 / 9; }
body.fm-site .fm-r-hero { --fm-r: 16 / 11; }
body.fm-site .fm-r-219 { --fm-r: 21 / 9; }
body.fm-site .fm-pos-top { --fm-pos: 50% 25%; }
body.fm-site .fm-pos-bottom { --fm-pos: 50% 75%; }
body.fm-site .fm-pos-left { --fm-pos: 25% 50%; }
body.fm-site .fm-pos-right { --fm-pos: 75% 50%; }
@media (max-width: 1024px) { body.fm-site .fm-r-hero { --fm-r: 16 / 10; } }
@media (max-width: 767px) {
  body.fm-site .fm-r-hero { --fm-r: 4 / 3.4; }
  body.fm-site .fm-r-219 { --fm-r: 4 / 3; }
  body.fm-site .fm-hide-mobile { display: none; }
}
body.fm-site .fm-pair-small { margin-bottom: 18%; }
@media (min-width: 768px) { body.fm-site .fm-offset-down { margin-top: clamp(80px, 12vw, 180px); } }
@media (max-width: 1024px) { body.fm-site .fm-spacer-col { display: none !important; } }
@media (min-width: 1025px) { body.fm-site .e-con.fm-sticky-col { position: sticky; top: calc(var(--fm-header-h) + 26px); align-self: flex-start; } }
body.fm-site .fm-price .elementor-heading-title { white-space: nowrap; font-variant-numeric: tabular-nums; }
body.fm-site .elementor-widget-icon.fm-icon .elementor-icon { line-height: 1; }

/* ---------- photo mosaic (container class fm-mosaic: 5 Image widgets + 1 container fm-mosaic-note) ---------- */
body.fm-site .e-con.fm-mosaic { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 20px) !important; }
body.fm-site .fm-mosaic > .elementor-element { width: auto !important; max-width: none !important; margin: 0 !important; }
body.fm-site .fm-mosaic > .elementor-element:first-child { grid-column: 1 / -1; }
body.fm-site .fm-mosaic .fm-img img { --fm-r: 1 / 1; }
body.fm-site .fm-mosaic > .elementor-element:first-child img { --fm-r: 16 / 10; }
body.fm-site .fm-mosaic > .fm-mosaic-note { grid-column: 1 / -1; }
@media (min-width: 768px) {
  body.fm-site .e-con.fm-mosaic { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: clamp(120px, 14vw, 210px); }
  body.fm-site .fm-mosaic .fm-img .elementor-widget-container { height: 100%; }
  body.fm-site .fm-mosaic .fm-img img, body.fm-site .fm-mosaic > .elementor-element:first-child img { height: 100%; aspect-ratio: auto; }
  body.fm-site .fm-mosaic > .elementor-element:nth-child(1) { grid-column: 1 / span 7; grid-row: span 3; }
  body.fm-site .fm-mosaic > .elementor-element:nth-child(2) { grid-column: 8 / span 5; grid-row: span 2; }
  body.fm-site .fm-mosaic > .elementor-element:nth-child(3) { grid-column: 8 / span 2; grid-row: span 1; }
  body.fm-site .fm-mosaic > .elementor-element:nth-child(4) { grid-column: 10 / span 3; grid-row: span 2; }
  body.fm-site .fm-mosaic > .elementor-element:nth-child(5) { grid-column: 1 / span 9; grid-row: span 2; }
  body.fm-site .fm-mosaic > .fm-mosaic-note { grid-column: 10 / span 3; grid-row: span 1; align-self: end; }
}

/* ---------- gallery grid (Image Gallery widget with class fm-gal fm-gal--N) ---------- */
body.fm-site .fm-gal .gallery { display: grid !important; grid-template-columns: repeat(var(--fm-cols, 3), minmax(0, 1fr)); gap: clamp(8px, 1.2vw, 18px); margin: 0 !important; }
body.fm-site .fm-gal--2 { --fm-cols: 2; }
body.fm-site .fm-gal--3 { --fm-cols: 3; }
body.fm-site .fm-gal--4 { --fm-cols: 4; }
body.fm-site .fm-gal--5 { --fm-cols: 5; }
body.fm-site .fm-gal .gallery br { display: none; }
body.fm-site .fm-gal .gallery-item { width: auto !important; max-width: none !important; margin: 0 !important; padding: 0 !important; float: none !important; }
body.fm-site .fm-gal .gallery-icon { overflow: hidden; background: var(--fm-surface); }
body.fm-site .fm-gal .gallery-item img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border: 0 !important; transition: transform 1.1s var(--fm-ease); }
body.fm-site .fm-gal .gallery-item a:hover img, body.fm-site .fm-gal .gallery-item a:focus-visible img { transform: scale(1.04); }
@media (max-width: 1024px) { body.fm-site .fm-gal--4, body.fm-site .fm-gal--5 { --fm-cols: 3; } }
@media (max-width: 767px) { body.fm-site .fm-gal { --fm-cols: 2 !important; } }

/* Gallery filters (module): chips are created by fm-core.js from the group headings */
.fm-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 clamp(28px, 4vw, 48px); padding: 0; list-style: none; }
.fm-chip {
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--fm-line); background: transparent; color: var(--fm-text);
  font: 500 15px/1 var(--fm-font-head); letter-spacing: -.01em; cursor: pointer;
  transition: background .3s, color .3s, border-color .3s;
}
.fm-chip:hover { border-color: var(--fm-text); }
.fm-chip[aria-pressed="true"] { background: var(--fm-primary); color: var(--fm-on-primary); border-color: var(--fm-primary); }
body.fm-site .fm-gallery-group[hidden] { display: none !important; }
body.fm-site .fm-gallery-filter.is-filtered .fm-gallery-title { display: none; }

/* ---------- data shortcodes ---------- */
.fm-hours { width: 100%; border-collapse: collapse; font-size: 1rem; color: inherit; }
.fm-hours th, .fm-hours td { padding: 16px 0; border: 0; border-bottom: 1px solid var(--fm-line); text-align: left; font-weight: 400; background: none; }
.fm-hours tr:first-child th, .fm-hours tr:first-child td { border-top: 1px solid var(--fm-line); }
.fm-hours td { text-align: right; font-family: var(--fm-font-head); font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fm-hours.fm-on-dark { color: var(--fm-on-primary); }
.fm-hours.fm-on-dark th, .fm-hours.fm-on-dark td { border-color: color-mix(in srgb, var(--fm-on-primary) 18%, transparent); }
.fm-hours-note { margin: 12px 0 0; font-size: .9rem; color: var(--fm-muted); }
.fm-hours-note.fm-on-dark { color: var(--fm-accent-dark); }
.fm-hours-compact p { margin: 0 0 10px; }
.fm-hours-compact strong { font-weight: 500; }

.fm-status { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-size: .92rem; color: var(--fm-muted); }
.fm-status__dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .6; flex: none; }
.fm-status.is-open .fm-status__dot { background: #5E8B5A; opacity: 1; box-shadow: 0 0 0 4px rgba(94, 139, 90, .16); }
.fm-status.fm-on-dark { color: color-mix(in srgb, var(--fm-on-primary) 75%, transparent); }

.fm-social { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.fm-social__item {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1px solid currentColor; border-radius: 999px;
  font: 500 15px/1 var(--fm-font-head); color: var(--fm-text) !important; text-decoration: none !important;
  transition: background .3s, color .3s, border-color .3s;
}
.fm-social__item:hover { background: var(--fm-primary); border-color: var(--fm-primary); color: var(--fm-on-primary) !important; }
.fm-social--small .fm-social__item { min-height: 38px; padding: 0 14px; font-size: 14px; border-color: var(--fm-line); }

.fm-footer-nav { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.fm-footer-nav a { display: inline-block; padding: 7px 0; color: var(--fm-text); text-decoration: none; font-family: var(--fm-font-body); transition: color .3s; }
.fm-footer-nav a:hover, .fm-footer-nav a[aria-current="page"] { color: var(--fm-accent); }

/* ---------- logo ---------- */
.fm-logo { display: inline-flex; align-items: baseline; padding: 8px 0; color: var(--fm-text) !important; text-decoration: none !important; font-family: var(--fm-font-head); font-weight: 600; font-size: 1.6rem; letter-spacing: -.055em; line-height: 1; white-space: nowrap; }
.fm-logo__dot { color: var(--fm-accent); }
.fm-logo--footer { font-size: clamp(2.6rem, 6vw, 4.2rem); padding: 0; }
.fm-logo--image { padding: 6px 0; }
.fm-logo__img { display: block; width: auto; height: 40px; max-width: 220px; object-fit: contain; }
.fm-logo--footer .fm-logo__img { height: 64px; max-width: 280px; }

/* ==========================================================================
   Header ([fm_header]) — fixed, so it works inside any Elementor container
   ========================================================================== */
.fm-header-wrap { height: var(--fm-header-h); font-family: var(--fm-font-body); }
.fm-header-wrap *, .fm-header-wrap *::before, .fm-header-wrap *::after, .fm-filters *, .fm-social *, .fm-hours, .fm-fallback-footer * { box-sizing: border-box; }
.fm-anchor { display: block; height: 0; outline: none; }
.fm-skip { position: fixed; left: 16px; top: -80px; z-index: 1000; padding: 12px 18px; background: var(--fm-primary); color: var(--fm-on-primary) !important; font-weight: 600; transition: top .2s; }
.fm-skip:focus { top: 16px; }
.fm-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 990;
  background: color-mix(in srgb, var(--fm-bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.2) blur(14px); backdrop-filter: saturate(1.2) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .35s, background .35s;
}
.admin-bar .fm-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .fm-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .fm-header { top: 0; } }
.fm-header.is-scrolled { border-bottom-color: var(--fm-line); background: color-mix(in srgb, var(--fm-bg) 95%, transparent); }
.fm-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--fm-header-h); max-width: calc(1320px + 2 * var(--fm-gutter)); margin: 0 auto; padding: 0 var(--fm-gutter); transition: height .35s var(--fm-ease); }
.fm-header.is-scrolled .fm-header__bar { height: 70px; }
.fm-nav, .fm-header__cta { display: none; }
.fm-nav__list { display: flex; gap: clamp(18px, 2.4vw, 38px); margin: 0; padding: 0; list-style: none; }
.fm-nav a { position: relative; display: inline-block; padding: 12px 0; color: var(--fm-text) !important; text-decoration: none !important; font: 500 1rem/1.2 var(--fm-font-head); letter-spacing: -.01em; }
.fm-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 1px; background: var(--fm-accent); transform: scaleX(0); transform-origin: right; transition: transform .45s var(--fm-ease); }
.fm-nav a:hover::after, .fm-nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.fm-nav a[aria-current="page"] { color: var(--fm-accent) !important; }
.fm-hbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 22px; border-radius: 999px;
  background: var(--fm-primary); color: var(--fm-on-primary) !important; border: 1px solid var(--fm-primary); text-decoration: none !important;
  font: 500 .95rem/1 var(--fm-font-head); letter-spacing: -.01em; transition: background .35s, border-color .35s;
}
.fm-hbtn:hover { background: var(--fm-accent); border-color: var(--fm-accent); }
.fm-arrow { width: 16px; height: 16px; flex: none; transition: transform .35s var(--fm-ease); }
.fm-hbtn:hover .fm-arrow { transform: translateX(4px); }
.fm-burger { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 4px 0 12px; background: none !important; border: 0; color: var(--fm-text) !important; cursor: pointer; font: 500 1rem/1 var(--fm-font-head); box-shadow: none; }
.fm-burger__icon { position: relative; width: 26px; height: 12px; }
.fm-burger__icon::before, .fm-burger__icon::after { content: ""; position: absolute; left: 0; width: 100%; height: 1.5px; background: currentColor; transition: transform .45s var(--fm-ease), top .45s var(--fm-ease); }
.fm-burger__icon::before { top: 0; }
.fm-burger__icon::after { top: 10px; }
.fm-burger[aria-expanded="true"] .fm-burger__icon::before { top: 5px; transform: rotate(45deg); }
.fm-burger[aria-expanded="true"] .fm-burger__icon::after { top: 5px; transform: rotate(-45deg); }
.fm-mnav {
  position: fixed; inset: var(--fm-header-h) 0 0 0; z-index: 989; display: flex; flex-direction: column; justify-content: space-between;
  padding: 24px var(--fm-gutter) calc(32px + env(safe-area-inset-bottom)); overflow-y: auto; background: var(--fm-bg);
  visibility: hidden; opacity: 0; transform: translateY(-12px);
  transition: opacity .4s var(--fm-ease), transform .5s var(--fm-ease), visibility 0s linear .5s;
}
.admin-bar .fm-mnav { top: calc(var(--fm-header-h) + 46px); }
@media (max-width: 600px) { .admin-bar .fm-mnav { top: var(--fm-header-h); } }
.fm-mnav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.fm-mnav__list { margin: 0; padding: 0; list-style: none; }
.fm-mnav__list li { border-bottom: 1px solid var(--fm-line); overflow: hidden; }
.fm-mnav__list a { display: block; padding: 16px 0; color: var(--fm-text) !important; text-decoration: none !important; font: 500 clamp(2rem, 9vw, 3rem)/1.1 var(--fm-font-head); letter-spacing: -.04em; transform: translateY(100%); transition: transform .6s var(--fm-ease), color .3s; }
.fm-mnav.is-open .fm-mnav__list a { transform: none; }
.fm-mnav.is-open .fm-mnav__list li:nth-child(2) a { transition-delay: .04s; }
.fm-mnav.is-open .fm-mnav__list li:nth-child(3) a { transition-delay: .08s; }
.fm-mnav.is-open .fm-mnav__list li:nth-child(4) a { transition-delay: .12s; }
.fm-mnav.is-open .fm-mnav__list li:nth-child(n+5) a { transition-delay: .16s; }
.fm-mnav__list a[aria-current="page"] { color: var(--fm-accent) !important; }
.fm-mnav__foot { display: grid; gap: 20px; margin-top: 40px; }
.fm-mnav__foot p { margin: 0; color: var(--fm-muted); font-size: .95rem; }
.fm-mnav__foot .fm-hbtn { width: 100%; min-height: 52px; }
html.fm-lock, html.fm-lock body { overflow: hidden; }
@media (min-width: 1025px) {
  .fm-nav, .fm-header__cta { display: block; }
  .fm-burger, .fm-mnav { display: none; }
}

/* Fallback footer (before a footer template is chosen) */
.fm-fallback-footer { padding: 64px var(--fm-gutter); background: var(--fm-surface); }
.fm-fallback-footer > div { max-width: 1320px; margin: 0 auto; display: grid; gap: 16px; }
.fm-fallback-footer p { margin: 0; color: var(--fm-muted); font-size: .9rem; }

/* ---------- motion: Elementor "Fade In Up", made subtler ---------- */
@keyframes fmFadeUp { from { opacity: 0; transform: translate3d(0, 28px, 0); } to { opacity: 1; transform: none; } }
body.fm-site .elementor-element.animated.fadeInUp { animation-name: fmFadeUp; animation-duration: 1s; animation-timing-function: var(--fm-ease); }
@media (prefers-reduced-motion: reduce) {
  body.fm-site .elementor-invisible { visibility: visible !important; }
  body.fm-site .elementor-element.animated { animation: none !important; }
  body.fm-site .fm-img img, body.fm-site .fm-gal img, .fm-mnav, .fm-mnav__list a, .fm-header, .fm-arrow { transition: none !important; }
}

/* ---------- Elementor editor: header in flow, everything visible ---------- */
.elementor-editor-active .fm-header { position: relative; top: 0 !important; }
.elementor-editor-active .fm-header-wrap { height: auto; }
.elementor-editor-active .elementor-invisible { visibility: visible !important; }
