/* =============================================
   NAVBAR FIX - Full width & responsive
   ============================================= */
.elementor-sticky--active.elementor-section {
  width: 100% !important;
  max-width: 100% !important;
  left: 0 !important;
  right: 0 !important;
}

.elementor-nav-menu--dropdown.elementor-nav-menu__container {
  width: 100% !important;
  left: 0 !important;
}

/* =============================================
   PROJECTS CAROUSEL — working slider
   ============================================= */
.slc-slider { position: relative; }

.slc-slider .elementor-swiper-button {
  display: flex !important;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  color: #2b2a37;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  font-size: 20px;
  transition: background 0.2s, color 0.2s;
  border: none;
}

.slc-slider .elementor-swiper-button:hover {
  background: #fff;
  color: #e2c279;
}

.slc-slider .elementor-swiper-button-prev { left: 14px; }
.slc-slider .elementor-swiper-button-next { right: 14px; }

.slc-slider .elementor-main-swiper,
.slc-slider .elementor-swiper {
  overflow: hidden !important;
  position: relative;
}

.slc-slider .swiper-wrapper {
  display: flex !important;
  overflow: visible !important;
  transition: transform 0.5s ease;
  will-change: transform;
}

.slc-slider .swiper-slide {
  display: block !important;
  flex: 0 0 calc((100% - 20px) / 3) !important;
  max-width: calc((100% - 20px) / 3) !important;
  margin-right: 10px;
  box-sizing: border-box;
}

.slc-slider .swiper-slide .elementor-carousel-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  border-radius: 4px;
  display: block;
}

@media (max-width: 1024px) {
  .slc-slider .swiper-slide,
  .slc-slider .swiper-slide:not(:first-child) {
    display: block !important;
    flex: 0 0 calc((100% - 10px) / 2) !important;
    max-width: calc((100% - 10px) / 2) !important;
  }
}

@media (max-width: 640px) {
  .slc-slider .swiper-slide,
  .slc-slider .swiper-slide:not(:first-child) {
    display: block !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
    margin-right: 0;
  }
}

/* =============================================
   NAV FLYOUT SUBMENU (Areas We Work In)
   ============================================= */
/* First-level dropdowns sit below the top menu item */
.elementor-nav-menu > li.menu-item-has-children {
  position: relative;
}

.elementor-nav-menu > li.menu-item-has-children > .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  padding: 8px 0;
  margin: 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 9999;
}

.elementor-nav-menu > li.menu-item-has-children:hover > .sub-menu,
.elementor-nav-menu > li.menu-item-has-children:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Nested submenu — flyout to the right */
.elementor-nav-menu .sub-menu li.menu-item-has-children {
  position: relative;
}

.elementor-nav-menu .sub-menu li.menu-item-has-children > .sub-menu {
  position: absolute;
  top: -8px;
  left: 100%;
  min-width: 200px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  padding: 8px 0;
  margin: 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateX(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 10000;
}

.elementor-nav-menu .sub-menu li.menu-item-has-children:hover > .sub-menu,
.elementor-nav-menu .sub-menu li.menu-item-has-children:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* Hover bridge so the cursor can cross into the flyout without it closing */
.elementor-nav-menu .sub-menu li.menu-item-has-children > .sub-menu::before {
  content: "";
  position: absolute;
  top: 0;
  left: -8px;
  width: 8px;
  height: 100%;
}

/* Submenu link styling */
.elementor-nav-menu .sub-menu li,
.elementor-nav-menu .sub-menu li.menu-item {
  list-style: none;
  margin: 0 !important;
  padding: 0 !important;
}

.elementor-nav-menu .sub-menu a.elementor-sub-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  color: #2b2a37;
  text-decoration: none;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.elementor-nav-menu .sub-menu a.elementor-sub-item:hover,
.elementor-nav-menu .sub-menu a.elementor-sub-item:focus {
  background: #f5f5f7;
  color: #e2c279;
}

/* Keep caret inline with text — matches top-level About / Our Services */
.elementor-nav-menu .sub-menu a.has-submenu {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.elementor-nav-menu .sub-menu a.has-submenu .sub-arrow {
  display: inline-flex;
  align-items: center;
  font-size: 0.85em;
  line-height: 1;
}

/* =============================================
   MOBILE / TABLET NAV — stacked submenus
   ============================================= */
@media (max-width: 1024px) {
  /* Hamburger dropdown panel — break out of narrow nav column,
     span full viewport width, fixed-position so it isn't clipped.
     Selector matches post-33.css specificity so !important actually wins. */
  body .elementor-33 .elementor-element.elementor-element-48f6f970 .elementor-nav-menu__container.elementor-nav-menu--dropdown,
  body .elementor-nav-menu--dropdown.elementor-nav-menu__container {
    position: fixed !important;
    top: 41px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    max-height: 70vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    margin: 0 !important;
    margin-top: 41px !important;
    background: #fff !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    padding: 15px 30px !important;
    box-sizing: border-box !important;
    font-size: 17px !important;
    text-align: center !important;
    z-index: 9998 !important;
  }

  /* Clear any ancestor overflow clipping so the fixed panel spans the viewport */
  body .elementor-33 .elementor-element.elementor-element-48f6f970,
  body .elementor-33 .elementor-element.elementor-element-48f6f970 .elementor-widget-container {
    overflow: visible !important;
  }

  .elementor-nav-menu--dropdown {
    background: #fff;
    font-size: 17px;
  }

  /* Top-level items stack vertically, full-width */
  .elementor-nav-menu--dropdown .elementor-nav-menu,
  .elementor-nav-menu--dropdown .elementor-nav-menu li {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .elementor-nav-menu--dropdown .elementor-item,
  .elementor-nav-menu--dropdown .elementor-sub-item {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    white-space: normal !important;
    word-break: break-word !important;
    padding: 15px 30px !important;
    box-sizing: border-box;
    line-height: 1.3 !important;
    font-size: 17px !important;
    text-align: center !important;
  }

  /* Disable the absolute-positioned desktop flyout — stack submenus inline */
  .elementor-nav-menu--dropdown .sub-menu,
  .elementor-nav-menu--dropdown .sub-menu .sub-menu,
  .elementor-nav-menu--dropdown li.menu-item-has-children > .sub-menu,
  .elementor-nav-menu--dropdown .sub-menu li.menu-item-has-children > .sub-menu {
    position: static !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    transition: none !important;
  }

  /* Indent nested levels */
  .elementor-nav-menu--dropdown .sub-menu .elementor-sub-item {
    padding-left: 36px !important;
  }

  .elementor-nav-menu--dropdown .sub-menu .sub-menu .elementor-sub-item {
    padding-left: 52px !important;
  }

  /* Caret: keep inline, no wrap, point down when dropdown is expanded */
  .elementor-nav-menu--dropdown .has-submenu {
    white-space: normal !important;
  }

  .elementor-nav-menu--dropdown .has-submenu .sub-arrow {
    display: inline-flex !important;
    margin-left: 8px;
    flex-shrink: 0;
    transform: none !important;
  }
}

/* =============================================
   GALLERY FIX - Proper grid layout
   ============================================= */
.elementor-gallery__container.e-gallery-justified {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  height: auto !important;
  position: relative;
}

.elementor-gallery__container .e-gallery-item {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
}

.elementor-gallery__container .e-gallery-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
}

.elementor-gallery__container .e-gallery-item:hover .e-gallery-image {
  transform: scale(1.05);
}

.elementor-gallery__container .elementor-gallery-item__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.3s ease;
}

.elementor-gallery__container .e-gallery-item:hover .elementor-gallery-item__overlay {
  background: rgba(0,0,0,0.15);
}

@media (max-width: 768px) {
  .elementor-gallery__container.e-gallery-justified {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .elementor-gallery__container.e-gallery-justified {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   LIGHTBOX
   ============================================= */
.slc-lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0,0,0,0.92);
  align-items: center;
  justify-content: center;
  padding: 20px;
  cursor: pointer;
}

.slc-lightbox-overlay.active {
  display: flex;
}

.slc-lightbox-overlay img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  cursor: default;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.slc-lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  border: none;
  transition: background 0.2s;
  z-index: 100001;
}

.slc-lightbox-close:hover {
  background: rgba(255,255,255,0.25);
}

.slc-lightbox-title {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 16px;
  font-family: 'Roboto Slab', serif;
  text-align: center;
  background: rgba(0,0,0,0.6);
  padding: 8px 24px;
  border-radius: 4px;
  max-width: 80%;
}

.slc-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  border: none;
  transition: background 0.2s;
  z-index: 100001;
}

.slc-lightbox-nav:hover {
  background: rgba(255,255,255,0.25);
}

.slc-lightbox-prev { left: 20px; }
.slc-lightbox-next { right: 20px; }

/* =============================================
   CONTACT POPUP MODAL
   ============================================= */
.slc-popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0,0,0,0.6);
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.slc-popup-overlay.active {
  display: flex;
}

.slc-popup-modal {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  max-width: 820px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-height: 90vh;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  position: relative;
  animation: slcPopupIn 0.3s ease;
}

@keyframes slcPopupIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.slc-popup-image {
  background-size: cover;
  background-position: center;
  min-height: 480px;
}

.slc-popup-form-side {
  background: #fff;
  padding: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

.slc-popup-accent {
  height: 5px;
  background: #e2c279;
  width: 100%;
  flex-shrink: 0;
}

.slc-popup-form-content {
  padding: 32px 28px;
  flex: 1;
  overflow-y: auto;
  text-align: center;
}

.slc-popup-form-content h3 {
  color: #383645;
  font-family: 'Roboto Slab', serif;
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 10px 0;
  line-height: 1.3;
  text-align: center;
}

.slc-popup-form-content p {
  color: #555;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 16px 0;
  font-family: 'Roboto', sans-serif;
  text-align: center;
}

.slc-popup-phone {
  display: block;
  text-align: center;
  font-family: 'Roboto Slab', serif;
  font-size: 22px;
  font-weight: 700;
  color: #e2c279;
  text-decoration: none;
  margin: 0 0 20px 0;
  letter-spacing: 0.5px;
  transition: opacity 0.2s;
}

.slc-popup-phone:hover {
  opacity: 0.8;
  color: #e2c279;
}

.slc-popup-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 0;
}

.slc-popup-form-group {
  margin-bottom: 12px;
}

.slc-popup-form-group input,
.slc-popup-form-group textarea {
  width: 100%;
  padding: 12px 14px;
  background: #f5f5f7;
  border: 1px solid #d9d9de;
  border-radius: 3px;
  color: #2b2a37;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
  text-align: left;
}

.slc-popup-form-group input::placeholder,
.slc-popup-form-group textarea::placeholder {
  color: #8a8a96;
}

.slc-popup-form-group input:focus,
.slc-popup-form-group textarea:focus {
  border-color: #e2c279;
}

.slc-popup-form-group textarea {
  resize: vertical;
  min-height: 90px;
}

.slc-popup-submit {
  width: 100%;
  padding: 14px;
  background: #383645;
  color: #fff;
  font-family: 'Roboto', sans-serif;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 4px;
}

.slc-popup-submit:hover {
  background: #4a4857;
}

.slc-popup-close {
  position: absolute;
  top: 12px;
  right: 14px;
  color: #888;
  font-size: 22px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  transition: color 0.2s;
  z-index: 2;
  line-height: 1;
}

.slc-popup-close:hover {
  color: #383645;
}

@media (max-width: 700px) {
  .slc-popup-modal {
    grid-template-columns: 1fr;
    max-width: 440px;
  }
  .slc-popup-image {
    min-height: 180px;
  }
  .slc-popup-form-content {
    padding: 24px 20px;
  }
  .slc-popup-form-row {
    grid-template-columns: 1fr;
  }
}
