/* ==========================================================================
   SAM FARIS — WordPress layer (free Elementor)
   Stands in for the Elementor Pro pieces: sticky header, Nav Menu widget, Form widget.
   ========================================================================== */

/* Header wrapper: let the inner bar stick to the viewport, not to the <header> box */
.sf-site-header, .sf-site-header > .elementor, .sf-site-footer > .elementor { display: contents; }
body .sf-header { position: sticky; top: 0; z-index: 100; }
body.admin-bar .sf-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .sf-header { top: 0; } }
#sf-content { position: absolute; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { z-index: 1000; }

/* ---- Nav menu (HTML widget with class sf-nav) -------------------------- */
body .sf-nav { display: flex; justify-content: flex-end; }
body .sf-nav .elementor-nav-menu { display: flex; list-style: none; margin: 0; padding: 0; }
body .sf-nav .elementor-nav-menu--main .elementor-item { position: relative; display: block; text-decoration: none; }
body .sf-nav .elementor-nav-menu--main .elementor-item::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 4px; opacity: 0; transition: opacity .3s; }
body .sf-nav .elementor-nav-menu--main .elementor-item:hover::after,
body .sf-nav .elementor-nav-menu--main .elementor-item.elementor-item-active::after { opacity: 1; }
body .sf-nav .elementor-menu-toggle { display: none; cursor: pointer; width: 44px; height: 44px; flex-direction: column; justify-content: center; gap: 6px; padding: 0 10px; border: 0; border-radius: 0; background: transparent; }
body .sf-nav .elementor-menu-toggle:focus-visible { outline: 1px solid var(--sf-brass); }
body .sf-nav .elementor-menu-toggle span { display: block; height: 1.5px; background: var(--sf-ink); transition: transform .3s, opacity .3s; }
body .sf-nav .elementor-nav-menu--dropdown { display: none; position: absolute; top: calc(100% + 17px); left: -50vw; right: -50vw; margin: 0 auto; width: 100vw; z-index: 99; }
body .sf-nav .elementor-nav-menu--dropdown .elementor-nav-menu { display: block; padding: 10px 0; }
body .sf-nav .elementor-nav-menu--dropdown .elementor-item { display: block; text-decoration: none; }
body .sf-nav.is-open .elementor-nav-menu--dropdown { display: block; }
body .sf-nav.is-open .elementor-menu-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
body .sf-nav.is-open .elementor-menu-toggle span:nth-child(2) { opacity: 0; }
body .sf-nav.is-open .elementor-menu-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
@media (max-width: 1024px) {
  body .sf-nav .elementor-nav-menu--main { display: none; }
  body .sf-nav .elementor-menu-toggle { display: flex; }
  body .sf-header-row { position: relative; }
  body .sf-nav { position: static; }
}

/* ---- Contact form (Contact Form 7 inside the Shortcode widget with class sf-form) ---- */
body .sf-form .elementor-form-fields-wrapper { display: flex; flex-wrap: wrap; gap: 0 18px; }
body .sf-form .elementor-field-group { display: flex; flex-direction: column; align-items: stretch; flex-wrap: nowrap; }
body .sf-form .elementor-col-100 { width: 100%; }
body .sf-form .elementor-col-50 { width: calc(50% - 9px); }
body .sf-form .wpcf7-form-control-wrap { display: block; }
body .sf-form .elementor-field { width: 100%; font: inherit; }
body .sf-form textarea.elementor-field { resize: vertical; min-height: 160px; }
body .sf-form .elementor-button { border: 0; width: 100%; cursor: pointer; }
body .sf-form .wpcf7-spinner { display: none; }
body .sf-form .wpcf7-form.submitting .elementor-button { opacity: .7; }
body .sf-form .wpcf7-not-valid-tip { font-size: 12.5px; color: #A23B2B; margin-top: 6px; }
body .sf-form .wpcf7-not-valid { border-color: #A23B2B !important; }
body .sf-form .wpcf7-response-output { margin: 8px 0 0 !important; padding: 14px 18px !important; border: 1px solid var(--sf-brass) !important; font-size: 14px; color: var(--sf-ink); }
body .sf-form .wpcf7-form.sent .wpcf7-response-output { background: var(--sf-ivory); }
body .sf-form .wpcf7-form.invalid .wpcf7-response-output,
body .sf-form .wpcf7-form.failed .wpcf7-response-output { border-color: #A23B2B !important; }
body .sf-form .screen-reader-response { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 767px) { body .sf-form .elementor-col-50 { width: 100%; } }

/* ---- Elementor-native fixes ---------------------------------------------- */
/* Sections with a background-image overlay: Elementor owns ::before, so the grid texture moves to ::after */
body .sf-grid-bg--overlay { position: relative; overflow: hidden; }
body .sf-grid-bg--overlay::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(to right, rgba(246,242,234,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(246,242,234,.05) 1px, transparent 1px);
  background-size: 88px 88px;
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 10%, transparent 70%);
          mask-image: radial-gradient(ellipse at 70% 40%, #000 10%, transparent 70%);
}
body .sf-grid-bg--overlay > * { position: relative; z-index: 1; }
/* Elementor caps container children at max-width:100% with higher specificity than the design system */
body .elementor-element.elementor-widget.sf-measure { max-width: 680px !important; }
body .elementor-element.e-con.sf-contact-photo { max-width: 360px !important; }
