.elementor-section {
  padding: 60px 20px;
}

.elementor-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.elementor-col-33 {
  flex: 1 1 calc(33.333% - 15px);
}

.stacked-flips {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.elementor-widget-wrap {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.elementor-heading-title {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #1e2a3a 0%, #0f1724 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.2;
}

.elementor-button-wrapper .elementor-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #800000;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: 40px;
  transition: all 0.3s ease;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
}

.elementor-button:hover {
  background-color: #800000;
  transform: translateY(-3px);
  box-shadow: 0 15px 25px -8px rgba(0, 0, 0, 0.15);
}

/* Flip boxes */
.elementor-flip-box {
  position: relative;
  height: 380px;
  width: 100%;
  perspective: 1000px;
  cursor: pointer;
  border-radius: 28px;
}

.elementor-flip-box.bathroom {
  height: 565px;
}

.elementor-flip-box.kit_com {
  height: 270px;
}

.elementor-flip-box__layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 28px;
  transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  backface-visibility: hidden;
  overflow: hidden;
}

.elementor-flip-box__front {
  opacity: 1;
  z-index: 1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.elementor-flip-box__back {
  opacity: 0;
  z-index: 0;
  background: #0f1724;
  background-image: linear-gradient(145deg, #141e2c 0%, #0a0f18 100%);
}

.elementor-flip-box:hover .elementor-flip-box__front {
  opacity: 0;
}

.elementor-flip-box:hover .elementor-flip-box__back {
  opacity: 1;
  z-index: 2;
}

.elementor-flip-box__layer__overlay {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: brightness(0.85);
  border-radius: 28px;
}

.elementor-flip-box__front .elementor-flip-box__layer__overlay {
  background: rgba(0, 0, 0, 0.5);
}

.elementor-flip-box__back .elementor-flip-box__layer__overlay {
  background: rgba(18, 25, 45, 0.92);
  backdrop-filter: blur(2px);
}

.front-title {
  font-size: 2rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
  margin-bottom: 12px;
}

.front-sub {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  font-weight: 500;
}

.elementor-flip-box__layer__title {
  font-size: 1.9rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 20px;
}

.elementor-flip-box__button {
  display: inline-block;
  background: #fff;
  color: #121212;
  font-weight: 600;
  padding: 12px 30px;
  border-radius: 40px;
  text-decoration: none;
  transition: all 0.25s ease;
  margin-top: 18px;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
}

.elementor-flip-box__button:hover {
  background: #fff;
  transform: scale(1.02);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

/* Front backgrounds */
.residential-front {
  background-image: url("../../img/gallery/residential-gallery.jpg");
  background-size: cover;
}

.government-front {
  background-image: url("../../img/gallery/government-gallery.jpg");
  background-size: cover;
}

.city-contracts {
  background-image: url("../../img/gallery/city-contracts-gallery.jpg");
  background-size: cover;
}

.commercial-front {
  background-image: url("../../img/gallery/commercial-gallery.jpg");
  background-size: cover;
}

/* Animations */
.elementor-invisible {
  opacity: 0;
  visibility: hidden;
}

.elementor-visible {
  visibility: visible !important;
  animation-duration: 0.8s;
  animation-fill-mode: forwards;
  animation-timing-function: cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.fadeInRight {
  animation-name: fadeInRightAnim;
}

.fadeInUp {
  animation-name: fadeInUpAnim;
}

.fadeInLeft {
  animation-name: fadeInLeftAnim;
}

@keyframes fadeInRightAnim {
  from {
    opacity: 0;
    transform: translateX(45px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInUpAnim {
  from {
    opacity: 0;
    transform: translateY(45px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeftAnim {
  from {
    opacity: 0;
    transform: translateX(-45px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .elementor-container {
    flex-direction: column;
    gap: 30px;
  }

  .elementor-col-33 {
    flex: 1 1 100%;
  }

  .stacked-flips {
    gap: 30px;
  }

  .elementor-flip-box {
    height: 340px;
  }

  .elementor-heading-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .elementor-section {
    padding: 40px 16px;
  }

  .elementor-flip-box {
    height: 300px;
  }

  .front-title {
    font-size: 1.6rem;
  }

  .elementor-flip-box__layer__title {
    font-size: 1.5rem;
  }
}
