/* ============================================
   SITE FIXES - Navbar, Gallery, Popup, Lightbox, Review Slider
   ============================================ */

/* === PROJECT GALLERY SLIDER === */
.iws-project-slider {
  position: relative;
  overflow: hidden;
  padding: 0 50px;
}

.iws-project-slider__track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.iws-project-slider__slide {
  flex: 0 0 33.333%;
  min-width: 0;
  padding: 0 5px;
  box-sizing: border-box;
}

.iws-project-slider__slide img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.iws-project-slider__slide img:hover {
  transform: scale(1.03);
}

.iws-project-slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.45);
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 20px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 2;
}

.iws-project-slider__arrow:hover {
  background: rgba(0, 0, 0, 0.7);
}

.iws-project-slider__prev {
  left: 6px;
}

.iws-project-slider__next {
  right: 6px;
}

@media (max-width: 1024px) {
  .iws-project-slider__slide {
    flex: 0 0 50%;
  }
}

@media (max-width: 600px) {
  .iws-project-slider {
    padding: 0 36px;
  }

  .iws-project-slider__slide {
    flex: 0 0 100%;
  }

  .iws-project-slider__slide img {
    height: 220px;
  }

  .iws-project-slider__arrow {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .iws-project-slider__prev { left: 2px; }
  .iws-project-slider__next { right: 2px; }
}

/* === REVIEW SLIDER === */
.iws-review-slider {
  position: relative;
  overflow: hidden;
  padding: 0 50px 40px;
}

.iws-review-slider__track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.iws-review-slider__slide {
  flex: 0 0 50%;
  min-width: 0;
  padding: 0 10px;
  box-sizing: border-box;
}

.iws-review-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 24px 28px;
  height: 100%;
  box-sizing: border-box;
}

.iws-review-card__name {
  font-weight: 700;
  font-size: 17px;
  color: #222;
  margin-bottom: 4px;
}

.iws-review-card__stars {
  color: #e8ad23;
  font-size: 18px;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.iws-review-card__text {
  font-size: 15px;
  line-height: 1.6;
  color: #444;
  font-style: italic;
}

.iws-review-slider__arrow {
  position: absolute;
  top: calc(50% - 20px);
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.06);
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 18px;
  color: #555;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  z-index: 2;
}

.iws-review-slider__arrow:hover {
  background: rgba(0, 0, 0, 0.12);
  color: #222;
}

.iws-review-slider__prev {
  left: 4px;
}

.iws-review-slider__next {
  right: 4px;
}

.iws-review-slider__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.iws-review-slider__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}

.iws-review-slider__dot.active {
  background: #1e73be;
}

@media (max-width: 768px) {
  .iws-review-slider {
    padding: 0 40px 36px;
  }

  .iws-review-slider__slide {
    flex: 0 0 100%;
    padding: 0 6px;
  }

  .iws-review-card {
    padding: 20px 22px;
  }

  .iws-review-slider__arrow {
    width: 32px;
    height: 32px;
    font-size: 15px;
  }

  .iws-review-slider__prev { left: 2px; }
  .iws-review-slider__next { right: 2px; }
}

/* === HOMEPAGE HERO === */
.elementor-element-14e34cda {
  min-height: 100vh !important;
}

@media (max-width: 1024px) {
  .elementor-element-14e34cda {
    min-height: auto !important;
    height: auto !important;
    padding-bottom: 90px !important;
  }

  .elementor-element-14e34cda > .elementor-container {
    flex-wrap: wrap !important;
  }

  .elementor-element-14e34cda .elementor-col-50 {
    width: 100% !important;
  }
}

/* === NAVBAR WIDTH FIX === */
.elementor-sticky,
.elementor-sticky--active,
.elementor-section.elementor-sticky--active {
  width: 100% !important;
  max-width: 100% !important;
  left: 0 !important;
  right: 0 !important;
  box-sizing: border-box !important;
}

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

/* Ensure header is always full-width and fixed properly */
header.elementor-location-header .elementor-section.elementor-sticky--active {
  position: fixed !important;
  top: 0 !important;
  z-index: 9999 !important;
}

/* === GALLERY FIX - Replace masonry with clean CSS grid === */
.elementor-widget-gallery .elementor-gallery__container.e-gallery-masonry {
  height: auto !important;
  padding-bottom: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  position: relative;
}

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

.elementor-widget-gallery .e-gallery-masonry .e-gallery-image {
  padding-bottom: 0 !important;
  height: 100% !important;
  width: 100% !important;
  background-size: cover;
  background-position: center;
  transition: transform 0.3s ease;
}

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

.elementor-widget-gallery .e-gallery-masonry .e-gallery-item .elementor-gallery-item__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.3s ease;
  z-index: 1;
}

.elementor-widget-gallery .e-gallery-masonry .e-gallery-item:hover .elementor-gallery-item__overlay {
  background: rgba(0,0,0,0.2);
}

/* Gallery responsive */
@media (max-width: 1024px) {
  .elementor-widget-gallery .elementor-gallery__container.e-gallery-masonry {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

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

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

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

.iws-lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  background: none;
  border: none;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  z-index: 100001;
  line-height: 1;
  padding: 5px 10px;
  transition: opacity 0.2s;
}

.iws-lightbox-close:hover {
  opacity: 0.7;
}

.iws-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  padding: 15px 18px;
  border-radius: 50%;
  transition: background 0.2s;
  z-index: 100001;
  line-height: 1;
}

.iws-lightbox-nav:hover {
  background: rgba(255,255,255,0.3);
}

.iws-lightbox-prev {
  left: 20px;
}

.iws-lightbox-next {
  right: 20px;
}

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

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

.iws-popup {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  max-width: 820px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  max-height: 95vh;
  overflow-y: auto;
  animation: popupSlideIn 0.3s ease;
}

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.iws-popup__image {
  background: url('../images/hero-home_2.jpg') left center / cover no-repeat;
  min-height: 500px;
}

.iws-popup__content {
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
}

.iws-popup__close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: #555;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
  z-index: 1;
  line-height: 1;
}

.iws-popup__close:hover {
  background: #f0f0f0;
  color: #3476AD;
}

.iws-popup__title {
  font-family: 'PT Serif', serif;
  font-size: 28px;
  color: #222;
  margin: 0 0 10px 0;
  text-align: center;
  line-height: 1.3;
}

.iws-popup__subtitle {
  font-size: 14px;
  color: #555;
  text-align: center;
  margin: 0 0 14px 0;
  line-height: 1.5;
}

.iws-popup__phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 600;
}

.iws-popup__phone a {
  color: #1e73be;
  text-decoration: none;
}

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

.iws-popup__phone i,
.iws-popup__phone svg {
  color: #1e73be;
}

.iws-popup__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.iws-popup__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.iws-popup__form input,
.iws-popup__form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  color: #333;
  background: #fafafa;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.iws-popup__form input:focus,
.iws-popup__form textarea:focus {
  outline: none;
  border-color: #1e73be;
  background: #fff;
}

.iws-popup__form input::placeholder,
.iws-popup__form textarea::placeholder {
  color: #999;
}

.iws-popup__form textarea {
  resize: vertical;
  min-height: 70px;
}

.iws-popup__submit {
  background: #4a7a9b;
  color: #fff;
  border: none;
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 4px;
  letter-spacing: 0.3px;
}

.iws-popup__submit:hover {
  background: #3a6585;
}

/* Popup responsive */
@media (max-width: 768px) {
  .iws-popup {
    grid-template-columns: 1fr;
    max-width: 460px;
  }

  .iws-popup__image {
    min-height: 200px;
  }

  .iws-popup__content {
    padding: 28px 24px;
  }

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

@media (max-width: 480px) {
  .iws-popup__row {
    grid-template-columns: 1fr;
  }

  .iws-popup__image {
    min-height: 160px;
  }
}
