/* === Navbar width fix === */
.elementor-section.elementor-sticky--active,
.elementor-section[style*="position: fixed"] {
  width: 100% !important;
  max-width: 100vw !important;
  left: 0 !important;
  right: 0 !important;
  box-sizing: border-box !important;
}

/* === Dropdown menu fixes === */
.elementor-nav-menu--main .menu-item-has-children > .sub-menu {
  min-width: 300px !important;
}

/* Arrow beside "Areas We Work In" (sub-menu parent) */
.elementor-nav-menu--main .sub-menu .has-submenu .sub-arrow {
  display: inline !important;
  margin-left: 6px;
}

.elementor-nav-menu--main .sub-menu .has-submenu .sub-arrow i {
  font-size: 12px;
}

/* === Mobile dropdown full width === */
@media (max-width: 1024px) {
  .elementor-nav-menu--dropdown.elementor-nav-menu__container {
    left: auto !important;
    right: 10px !important;
    width: 96vw !important;
    z-index: 99999 !important;
    position: absolute !important;
    background: #fff !important;
  }
}

@media (max-width: 767px) {
  .elementor-nav-menu--dropdown.elementor-nav-menu__container {
    left: auto !important;
    right: 0px !important;
  }
}

/* === Gallery grid fix === */
.e-gallery-container.e-gallery-masonry {
  height: auto !important;
  padding-bottom: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.e-gallery-masonry .e-gallery-item {
  position: relative !important;
  width: 100% !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
}

.e-gallery-masonry .e-gallery-image {
  padding-bottom: 75% !important;
  width: 100% !important;
  background-size: cover;
  background-position: center;
}

@media (max-width: 1024px) {
  .e-gallery-container.e-gallery-masonry {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .e-gallery-container.e-gallery-masonry {
    grid-template-columns: 1fr;
  }
}

/* === Gallery lightbox === */
.gallery-lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.gallery-lightbox-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.gallery-lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}

.gallery-lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  line-height: 1;
  z-index: 100001;
  background: none;
  border: none;
  font-family: Arial, sans-serif;
}

.gallery-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 50px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 20px;
  z-index: 100001;
  font-family: Arial, sans-serif;
  user-select: none;
}

.gallery-lightbox-nav.prev { left: 10px; }
.gallery-lightbox-nav.next { right: 10px; }

/* === CTA Popup === */
.cta-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
  box-sizing: border-box;
}

.cta-popup-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.cta-popup {
  display: flex;
  max-width: 900px;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  position: relative;
  max-height: 90vh;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.cta-popup-overlay.active .cta-popup {
  transform: scale(1);
}

.cta-popup__image {
  width: 45%;
  background-image: url('../images/jedd-4_5.jpg');
  background-size: cover;
  background-position: center;
  min-height: 400px;
}

.cta-popup__form {
  width: 55%;
  background: #001659;
  padding: 45px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.cta-popup__close {
  position: absolute;
  top: 12px;
  right: 16px;
  color: rgba(255,255,255,0.7);
  font-size: 28px;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  z-index: 1;
  font-family: Arial, sans-serif;
  transition: color 0.2s;
}

.cta-popup__close:hover {
  color: #fff;
}

.cta-popup__title {
  color: #fff;
  font-family: Poppins, sans-serif;
  font-size: 32px;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0 0 10px 0;
  line-height: 1.2;
}

.cta-popup__subtitle {
  color: rgba(255,255,255,0.85);
  font-family: 'Noto Sans', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 15px 0;
}

.cta-popup__phone {
  color: #fff;
  font-family: Poppins, sans-serif;
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 20px 0;
  text-align: center;
}

.cta-popup__phone a {
  color: #fff;
  text-decoration: none;
}

.cta-popup__phone a:hover {
  text-decoration: underline;
}

.cta-popup__row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.cta-popup__field {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 3px;
  font-family: 'Noto Sans', sans-serif;
  font-size: 15px;
  background: #f5f2eb;
  color: #333;
  outline: none;
  box-sizing: border-box;
}

.cta-popup__field::placeholder {
  color: #777;
}

.cta-popup__field--textarea {
  resize: vertical;
  min-height: 50px;
  margin-bottom: 10px;
}

.cta-popup__submit {
  width: 100%;
  padding: 16px;
  background: #e8641b;
  color: #fff;
  border: none;
  border-radius: 3px;
  font-family: Poppins, sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  text-transform: none;
}

.cta-popup__submit:hover {
  background: #d45510;
}

@media (max-width: 768px) {
  .cta-popup {
    flex-direction: column;
    max-height: 95vh;
    overflow-y: auto;
  }

  .cta-popup__image {
    width: 100%;
    min-height: 200px;
    max-height: 200px;
  }

  .cta-popup__form {
    width: 100%;
    padding: 30px 25px;
  }

  .cta-popup__title {
    font-size: 24px;
  }

  .cta-popup__phone {
    font-size: 20px;
  }
}
