/*
 * Al Sorouh — Elementor "Menu home" template #732, v1.1.2.
 * The original v1.0.0 selector began with #menu-item-14201, which exists only
 * in the live navigation dropdown, not inside Elementor's template editor.
 * Scope to the template itself so the same result appears in both locations.
 */

/* All twelve service cards use Elementor six-column sections (two rows). */
:is(.elementor-732, [data-elementor-id="732"]) .elementor-column.elementor-col-16 > .elementor-widget-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* Override the individual Image or SVG widgets' Auto/Initial widths. */
:is(.elementor-732, [data-elementor-id="732"]) .elementor-column.elementor-col-16 .elementor-widget-wd_image_or_svg,
:is(.elementor-732, [data-elementor-id="732"]) .elementor-column.elementor-col-16 .elementor-widget-wd_image_or_svg .elementor-widget-container {
  box-sizing: border-box;
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  flex: none !important;
  align-self: stretch !important;
}

/* A single frame geometry, regardless of a source image's native dimensions. */
:is(.elementor-732, [data-elementor-id="732"]) .elementor-column.elementor-col-16 .wd-image {
  box-sizing: border-box;
  display: block;
  width: 100% !important;
  max-width: 182px !important;
  margin-inline: auto !important;
}

:is(.elementor-732, [data-elementor-id="732"]) .elementor-column.elementor-col-16 .wd-image a {
  position: relative;
  display: block;
  width: 100% !important;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 5px;
}

:is(.elementor-732, [data-elementor-id="732"]) .elementor-column.elementor-col-16 .wd-image a img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center;
}

/* Captions begin evenly beneath identically sized image frames. */
:is(.elementor-732, [data-elementor-id="732"]) .elementor-column.elementor-col-16 .elementor-widget-wd_text_block {
  width: 100% !important;
  max-width: 100% !important;
  margin-top: 9px;
  flex: 1 0 auto;
}

:is(.elementor-732, [data-elementor-id="732"]) .elementor-column.elementor-col-16 .wd-text-block p {
  margin-bottom: 0;
  text-wrap: balance;
}

/*
 * Desktop WoodMart Services mega panel: a true edge-to-edge overlay that
 * reaches the bottom of the viewport. The header's current bottom coordinate
 * is written to --as-service-menu-top by mega-menu-layout.js. The panel is
 * uses an iOS-inspired, brighter frosted surface while keeping the thumbnails
 * crisp and their captions legible.
 *
 * Scoping to this *one* menu item preserves other WoodMart dropdowns and the
 * standalone Elementor #732 editor view.
 */
@media (min-width: 1025px) {
  #menu-item-14201 > .wd-dropdown-menu {
    --as-service-menu-top: 80px;
    box-sizing: border-box !important;
    position: fixed !important;
    inset: var(--as-service-menu-top) 0 0 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: calc(100vh - var(--as-service-menu-top)) !important;
    height: calc(100dvh - var(--as-service-menu-top)) !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 20px clamp(12px, 2.2vw, 34px) 26px !important;
    border: 0 !important;
    border-top: 1px solid rgba(255, 255, 255, .92) !important;
    border-radius: 0 !important;
    background: linear-gradient(135deg,
      rgba(255, 255, 255, .81) 0%,
      rgba(247, 249, 253, .72) 52%,
      rgba(255, 255, 255, .80) 100%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(1.42) brightness(1.05);
    backdrop-filter: blur(24px) saturate(1.42) brightness(1.05);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .74),
      inset 0 -1px 0 rgba(255, 255, 255, .37),
      0 18px 38px -28px rgba(21, 35, 48, .13) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }

  #menu-item-14201 > .wd-dropdown-menu :is(.elementor-732, [data-elementor-id="732"]) {
    margin-inline: auto !important;
  }

  /* Twelve consistent, single-line service names. Size is set once for the
     entire menu from the longest measured caption; no clipping or ellipsis. */
  #menu-item-14201 > .wd-dropdown-menu .elementor-column.elementor-col-16 .wd-text-block p {
    position: relative;
    display: block;
    box-sizing: border-box;
    width: calc(100% + 16px) !important;
    max-width: none !important;
    margin-inline: -8px !important;
    white-space: nowrap !important;
    text-wrap: nowrap !important;
    text-align: center !important;
    font-size: var(--as-service-caption-size, 12px) !important;
    font-weight: 600 !important;
    letter-spacing: -.025em !important;
    line-height: 1.45 !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  #menu-item-14201 > .wd-dropdown-menu {
    background: #fff !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
