/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Sticky header full viewport width */
.elementor-sticky {
  width: 100vw !important;
  max-width: 100vw !important;
  left: 0 !important;
  right: 0 !important;
}

/* Navbar logo sizing — target ALL header logos */
.elementor-location-header .elementor-widget-image img {
  max-width: 280px;
  height: auto !important;
  width: auto !important;
  object-fit: contain !important;
}
@media (max-width: 1024px) {
  .elementor-location-header .elementor-widget-image img {
    max-width: 160px;
  }
}
@media (max-width: 768px) {
  .elementor-location-header .elementor-widget-image img {
    max-width: 120px;
  }
}

/* === Mobile/Tablet responsive header === */
/* Prevent header overflow */
.elementor-location-header .elementor-container {
  flex-wrap: nowrap !important;
  align-items: center !important;
}

/* Hamburger icon — always visible on tablet/mobile */
@media (max-width: 1024px) {
  /* Show hamburger toggle */
  .elementor-menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    padding: 8px;
    cursor: pointer;
    color: #222;
  }
  /* Hide horizontal nav links */
  .elementor-nav-menu--main.elementor-nav-menu__container {
    display: none !important;
  }
  /* Hide "Get a Free Quote" CTA on mobile */
  .elementor-location-header .cta-btn {
    display: none !important;
  }
  /* Header columns: logo left, burger right */
  .elementor-location-header .elementor-col-33 {
    flex: 0 0 auto !important;
    width: auto !important;
  }
  .elementor-location-header .elementor-col-33:first-child {
    flex: 1 !important;
  }
}

/* Fix mobile nav dropdown */
.elementor-nav-menu--dropdown.elementor-nav-menu__container {
  width: 100% !important;
  max-width: 100vw !important;
  left: 0 !important;
  box-sizing: border-box;
}
@media (max-width: 1024px) {
  /* Make the nav widget container the positioning reference for the dropdown */
  .elementor-widget-nav-menu {
    position: static !important;
  }
  .elementor-widget-nav-menu > .elementor-widget-container {
    position: static !important;
  }
  /* Full-width dropdown fixed to viewport, below header */
  .elementor-nav-menu--dropdown.elementor-nav-menu__container {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    background: #1a1a1a !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3) !important;
    overflow-y: auto;
    z-index: 99999;
    padding: 10px 0 !important;
    margin: 0 !important;
  }
  .elementor-nav-menu--dropdown .elementor-nav-menu li {
    display: block !important;
  }
  /* Center-align menu text */
  .elementor-nav-menu--dropdown .elementor-nav-menu > li > a {
    padding: 14px 20px !important;
    display: block !important;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-align: center !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px;
  }
  .elementor-nav-menu--dropdown .elementor-nav-menu > li:last-child > a {
    border-bottom: none;
  }
  .elementor-nav-menu--dropdown .elementor-nav-menu > li > a:hover,
  .elementor-nav-menu--dropdown .elementor-nav-menu > li > a:focus {
    background: rgba(255,211,2,0.1) !important;
    color: #FFD302 !important;
  }
  /* Sub-menus: hidden by default, accordion style */
  .elementor-nav-menu--dropdown .sub-menu {
    display: none !important;
    background: rgba(0,0,0,0.2) !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none;
    box-shadow: none !important;
  }
  /* Show sub-menu only when parent has .sub-menu-open */
  .elementor-nav-menu--dropdown .menu-item-has-children.sub-menu-open > .sub-menu {
    display: block !important;
  }
  /* Sub-menu items */
  .elementor-nav-menu--dropdown .sub-menu li a {
    padding: 12px 20px !important;
    display: block !important;
    text-align: center !important;
    color: rgba(255,255,255,0.8) !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
  }
  .elementor-nav-menu--dropdown .sub-menu li:last-child a {
    border-bottom: none !important;
  }
  .elementor-nav-menu--dropdown .sub-menu li a:hover {
    color: #FFD302 !important;
    background: rgba(255,211,2,0.08) !important;
  }
  /* Nested sub-menus (Areas We Work In → cities) */
  .elementor-nav-menu--dropdown .sub-menu .sub-menu {
    background: rgba(0,0,0,0.15) !important;
  }
  .elementor-nav-menu--dropdown .sub-menu .sub-menu li a {
    padding-left: 30px !important;
    padding-right: 30px !important;
    font-size: 13px !important;
  }
  /* Caret indicator for parent items */
  .elementor-nav-menu--dropdown .menu-item-has-children > a .sub-arrow {
    float: none !important;
    display: inline-block !important;
    margin-left: 6px;
    transition: transform 0.2s;
  }
  .elementor-nav-menu--dropdown .menu-item-has-children.sub-menu-open > a .sub-arrow {
    display: inline-block !important;
  }
  .elementor-nav-menu--dropdown .menu-item-has-children.sub-menu-open > a .sub-arrow i {
    transform: rotate(180deg);
  }
}

/* Custom Lightbox */
.custom-lightbox-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.92);
  z-index: 100000;
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
}
.custom-lightbox-overlay.active {
  display: flex;
}
.custom-lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  cursor: default;
}
.custom-lightbox-close {
  position: absolute;
  top: 16px; right: 24px;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  z-index: 100001;
  line-height: 1;
  font-weight: 300;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.custom-lightbox-close:hover { opacity: 1; }
.custom-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 48px;
  cursor: pointer;
  z-index: 100001;
  opacity: 0.7;
  transition: opacity 0.2s;
  user-select: none;
  padding: 16px;
  line-height: 1;
}
.custom-lightbox-nav:hover { opacity: 1; }
.custom-lightbox-prev { left: 12px; }
.custom-lightbox-next { right: 12px; }

/* === Nested submenu flyout (Areas We Work In → cities) === */
/* Parent item in a dropdown needs relative positioning for the flyout */
.elementor-nav-menu--main .sub-menu .menu-item-has-children {
  position: relative !important;
}
/* Nested sub-menu: hidden by default, positioned as flyout to the right */
.elementor-nav-menu--main .sub-menu .menu-item-has-children > .sub-menu {
  display: none !important;
  position: absolute !important;
  top: 0 !important;
  left: 100% !important;
  min-width: 200px;
  background: #fff !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15) !important;
  padding: 6px 0 !important;
  margin: 0 !important;
  list-style: none;
  z-index: 10000;
  border-radius: 2px;
}
/* Show nested sub-menu on hover */
.elementor-nav-menu--main .sub-menu .menu-item-has-children:hover > .sub-menu {
  display: block !important;
}
/* Flyout items styling */
.elementor-nav-menu--main .sub-menu .sub-menu li {
  display: block !important;
  width: 100% !important;
}
.elementor-nav-menu--main .sub-menu .sub-menu a {
  padding: 9px 20px !important;
  white-space: nowrap;
  display: block !important;
  color: #333 !important;
  text-decoration: none !important;
  font-size: 14px;
  transition: background 0.15s;
}
.elementor-nav-menu--main .sub-menu .sub-menu a:hover {
  background: #FFD302 !important;
  color: #111 !important;
}
/* Change the sub-arrow caret to point right for nested items */
.elementor-nav-menu--main .sub-menu .menu-item-has-children > a .sub-arrow {
  display: inline-block;
  margin-left: 8px;
}
.elementor-nav-menu--main .sub-menu .menu-item-has-children > a .sub-arrow i {
  transform: rotate(-90deg);
  font-size: 11px;
}

/* Mobile: keep nested submenus stacked (not flyout) */
@media (max-width: 1024px) {
  .elementor-nav-menu--main .sub-menu .menu-item-has-children > .sub-menu {
    position: static !important;
    left: auto !important;
    box-shadow: none !important;
    padding-left: 15px !important;
    background: transparent !important;
  }
  .elementor-nav-menu--main .sub-menu .menu-item-has-children > a .sub-arrow i {
    transform: none;
  }
}

/* === Image-text symmetry: images fill their column height === */
/* Two-column sections: stretch columns to equal height */
.elementor-section .elementor-container {
  align-items: stretch !important;
}
/* Image columns with background: fill the column */
.elementor-col-50[data-settings*="background"] {
  display: flex;
  align-items: stretch;
}
.elementor-col-50[data-settings*="background"] > .elementor-widget-wrap {
  flex: 1;
}
/* Standalone images in two-column body layouts: cover the full area */
/* Exclude header, footer, and logo images */
.elementor-location-header .elementor-widget-image img {
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}
/* Two-column text+image sections */
[data-elementor-type="wp-page"] .elementor-section-content-middle > .elementor-container {
  align-items: stretch !important;
}
/* All widget wraps in these sections: flex column */
[data-elementor-type="wp-page"] .elementor-section-content-middle .elementor-col-50 > .elementor-widget-wrap {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
}
/* Image-ONLY columns: image fills the full column height */
[data-elementor-type="wp-page"] .elementor-section-content-middle .elementor-col-50 .elementor-widget-image:only-child {
  flex: 1;
  display: flex;
}
[data-elementor-type="wp-page"] .elementor-section-content-middle .elementor-col-50 .elementor-widget-image:only-child .elementor-widget-container {
  flex: 1;
}
[data-elementor-type="wp-page"] .elementor-section-content-middle .elementor-col-50 .elementor-widget-image:only-child img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Mixed columns (image + text): image stays natural height */
[data-elementor-type="wp-page"] .elementor-section-content-middle .elementor-col-50 .elementor-widget-image:not(:only-child) img {
  width: 100%;
  height: auto;
  display: block;
}
/* Service card image heights: consistent across cards */
/* Three-column cards (homepage) */
[data-elementor-type="wp-page"] .elementor-col-33 .elementor-widget-image img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}
/* Five-column icon strip (metal services page) */
[data-elementor-type="wp-page"] .elementor-col-20 .elementor-widget-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
/* Two-column service cards (location pages - NOT the text+image middle-aligned sections) */
[data-elementor-type="wp-page"] .elementor-section:not(.elementor-section-content-middle) > .elementor-container > .elementor-col-50 .elementor-widget-image img {
  width: 100%;
  height: 350px;
  object-fit: cover;
}
/* Carousel images: fill their container */
.elementor-carousel-image {
  background-size: cover !important;
  background-position: center !important;
  min-height: 300px;
}

/* Gallery: override lazy-load hiding so all images render on static site */
.e-gallery--lazyload .e-gallery-item {
  visibility: visible !important;
  opacity: 1 !important;
}
.e-gallery-image {
  background-size: cover !important;
  background-position: center !important;
}
/* Override the container aspect-ratio clipping so ALL 100 images show */
.e-gallery-container.e-gallery-justified {
  padding-bottom: 0 !important;
  height: auto !important;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
/* Override the absolute positioning from inline styles — use flow layout */
.e-gallery-container.e-gallery-justified .e-gallery-item {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  width: calc(33.333% - 7px) !important;
  height: auto !important;
  flex-shrink: 0;
  --item-width: unset !important;
  --item-height: unset !important;
  --item-start: unset !important;
  --item-top: unset !important;
  --item-row-index: unset !important;
  --gap-count: unset !important;
  --row: unset !important;
}
.e-gallery-container.e-gallery-justified .e-gallery-item .e-gallery-image {
  width: 100%;
  padding-bottom: 100%;
}
@media (max-width: 768px) {
  .e-gallery-container.e-gallery-justified .e-gallery-item {
    width: calc(50% - 5px) !important;
  }
}

/* Hero section form card styling (metal-services, welding-services) */
/* Hero columns: vertically center both text and form */
.elementor-section-height-min-height > .elementor-container {
  align-items: center !important;
}
.elementor-section-height-min-height .elementor-col-50 > .elementor-widget-wrap {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
}
.elementor-section-height-min-height .elementor-col-50[data-settings*="background"] {
  display: flex;
  align-items: center;
}
.elementor-section-height-min-height .elementor-col-50[data-settings*="background"] > .elementor-widget-wrap {
  background: #fff !important;
  border-radius: 10px;
  padding: 40px 35px !important;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  margin: 40px 0;
}
.elementor-section-height-min-height .elementor-col-50[data-settings*="background"] .elementor-heading-title {
  color: #111 !important;
  font-size: 28px !important;
  font-weight: 700 !important;
  margin-bottom: 10px;
}
.elementor-section-height-min-height .elementor-col-50[data-settings*="background"] .elementor-widget-text-editor {
  color: #444 !important;
  font-style: italic;
  font-size: 15px;
  margin-bottom: 20px;
}
.elementor-section-height-min-height .elementor-col-50[data-settings*="background"] .gform_wrapper {
  margin: 0 !important;
}
.elementor-section-height-min-height .elementor-col-50[data-settings*="background"] .gform_heading {
  display: none;
}
.elementor-section-height-min-height .elementor-col-50[data-settings*="background"] .gfield {
  margin-bottom: 12px !important;
}
.elementor-section-height-min-height .elementor-col-50[data-settings*="background"] input[type="text"],
.elementor-section-height-min-height .elementor-col-50[data-settings*="background"] input[type="tel"],
.elementor-section-height-min-height .elementor-col-50[data-settings*="background"] input[type="email"],
.elementor-section-height-min-height .elementor-col-50[data-settings*="background"] textarea {
  background: #fff !important;
  border: 1px solid #ccc !important;
  border-radius: 5px;
  padding: 14px 16px !important;
  font-size: 15px;
  width: 100%;
  box-sizing: border-box;
  color: #333;
}
.elementor-section-height-min-height .elementor-col-50[data-settings*="background"] input:focus,
.elementor-section-height-min-height .elementor-col-50[data-settings*="background"] textarea:focus {
  border-color: #FFD302 !important;
  outline: none;
}
.elementor-section-height-min-height .elementor-col-50[data-settings*="background"] textarea {
  min-height: 60px;
  max-height: 100px;
  resize: vertical;
}
.elementor-section-height-min-height .elementor-col-50[data-settings*="background"] .gform_button {
  background: #FFD302 !important;
  color: #111 !important;
  border: none !important;
  border-radius: 5px;
  padding: 15px 30px !important;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s;
  margin-top: 5px;
}
.elementor-section-height-min-height .elementor-col-50[data-settings*="background"] .gform_button:hover {
  background: #F5CC00 !important;
}

/* =============================================
   Static Form Styles
   ============================================= */

/* Form wrapper */
.contact-form-wrapper {
  margin: 0;
}

/* Form rows: two fields side by side */
.contact-form-wrapper .form-row {
  display: flex;
  gap: 15px;
}
.contact-form-wrapper .form-row .form-group {
  flex: 1;
}

/* Form groups */
.contact-form-wrapper .form-group {
  margin-bottom: 14px;
}
.contact-form-wrapper label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 5px;
}
/* Contact page form: dark labels on light background */
.elementor-28 .contact-form-wrapper label {
  color: #111;
}
.contact-form-wrapper .required {
  color: #c62828;
}

/* Inputs and textareas */
.contact-form-wrapper input[type="text"],
.contact-form-wrapper input[type="tel"],
.contact-form-wrapper input[type="email"],
.contact-form-wrapper textarea {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 14px 16px;
  font-size: 15px;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
  color: #333;
  transition: border-color 0.2s;
}
.contact-form-wrapper input:focus,
.contact-form-wrapper textarea:focus {
  border-color: #FFD302;
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 211, 2, 0.15);
}
.contact-form-wrapper textarea {
  resize: vertical;
  min-height: 80px;
}

/* Error state */
.contact-form-wrapper .field-error {
  border-color: #c62828 !important;
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.1);
}

/* Submit button */
.contact-form-wrapper .form-submit-btn {
  background: #FFD302;
  color: #111;
  border: none;
  border-radius: 5px;
  padding: 15px 30px;
  font-size: 17px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s, transform 0.1s;
  margin-top: 5px;
}
.contact-form-wrapper .form-submit-btn:hover {
  background: #F5CC00;
}
.contact-form-wrapper .form-submit-btn:active {
  transform: scale(0.98);
}
.contact-form-wrapper .form-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Success/error messages */
.form-message {
  padding: 12px 16px;
  border-radius: 5px;
  margin-top: 12px;
  font-size: 15px;
  font-weight: 500;
}
.form-message-success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}
.form-message-error {
  background: #fbe9e7;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

/* Responsive: stack form rows on mobile */
@media (max-width: 600px) {
  .contact-form-wrapper .form-row {
    flex-direction: column;
    gap: 0;
  }
}

/* Hero form overrides (inside min-height hero sections) */
.elementor-section-height-min-height .contact-form-wrapper input::placeholder,
.elementor-section-height-min-height .contact-form-wrapper textarea::placeholder {
  color: #999;
}

/* Hide Elementor lightbox title overlay */
.elementor-slideshow__title,
.elementor-slideshow__description,
.dialog-lightbox-widget .elementor-slideshow__title,
.dialog-lightbox-widget .elementor-slideshow__description {
  display: none !important;
}
