
/* ===== Service Card ===== */
.rr-service-card{
  position: relative;
  display: block;
  min-height: var(--rr-min-h, 450px);
  overflow: hidden;
  text-decoration: none;
  isolation: isolate;
  margin: var(--rr-gap, 8px);
  border-radius: 0;
}

/* background */
.rr-service-card__bg{
  position: absolute;
  inset: 0;
  background-image: var(--rr-bg);
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: transform 500ms ease;
  z-index: 0;
}

/* overlay */
.rr-service-card__overlay{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,var(--rr-overlay, .55));
  opacity: 0;
  transition: opacity 350ms ease;
  z-index: 1;
}

/* subtle gradient under text for readability */
.rr-service-card__content::before{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0));
  opacity: 1;
  z-index: 0;
  pointer-events: none;
}

.rr-service-card__content{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: var(--rr-pad, 34px);
  padding-bottom: calc(var(--rr-pad, 34px) + 18px); /* prevent clipping */
  z-index: 2;
}

.rr-service-card__text{
  position: relative;
  z-index: 1;
  margin: 0 auto;
  text-align: center;
  transform: translateY(0);
  transition: transform 450ms cubic-bezier(.2,.8,.2,1);
  will-change: transform;
}

/* Title: white + unified height for 1–2 lines */
.rr-service-card__title{
  margin: 0;
  color: #fff;
  font-size: 1.5em;
  line-height: 1.15;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(0,0,0,.15);

  min-height: 3em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Subtitle: hidden by default (desktop), visible on hover; on mobile visible always */
.rr-service-card__desc{
  margin-top: 10px;
  color: rgba(255,255,255,.92);
  font-size: 18px;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 300ms ease, transform 450ms cubic-bezier(.2,.8,.2,1);
}

/* Hover effects only where hover exists */
@media (hover: hover) and (pointer: fine){
  .rr-service-card:hover .rr-service-card__overlay{ opacity: 1; }
  .rr-service-card:hover .rr-service-card__bg{ transform: scale(1.06); }
  .rr-service-card:hover .rr-service-card__text{ transform: translateY(-12px); }
  .rr-service-card:hover .rr-service-card__desc{ opacity: .98; transform: translateY(0); }
}

/* Mobile: show subtitle + lighter overlay */
@media (max-width: 767px){
  .rr-service-card{ min-height: 450px; margin: 6px; }
  .rr-service-card__title{ font-size: 1.35em; }
  .rr-service-card__overlay{ opacity: 0.35; }
  .rr-service-card__desc{ opacity: .95; transform: translateY(0); }
}

/* MOBILE LAYOUT FIX: force 1 Service Card per row even inside multi-column sections */
@media (max-width: 767px){
  .elementor-widget-rr_service_card{
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }
  .elementor-widget-rr_service_card > .elementor-widget-container{
    width: 100% !important;
  }
  .rr-service-card{
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}


/* ===== Gallery Lightbox (v1.6.1) ===== */
.rr-gallery{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.95);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.rr-gallery__img{
  max-width: 92vw;
  max-height: 90vh;
  opacity: 0;
  transform: scale(.985);
  transition: opacity .28s ease, transform .28s ease;
  will-change: opacity, transform;
}

.rr-gallery__img.is-visible{
  opacity: 1;
  transform: scale(1);
}

/* Controls: isolate from theme styles */
.rr-gallery__btn{
  all: unset;
  position: absolute;
  z-index: 2;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 999px;
  background: rgba(0,0,0,.25);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.rr-gallery__btn:hover{ background: rgba(0,0,0,.35); }
.rr-gallery__btn:active{ transform: scale(.98); }

.rr-gallery__btn svg{
  width: 26px;
  height: 26px;
  stroke: #fff;
  stroke-width: 2.4;
  fill: none;
  vector-effect: non-scaling-stroke;
}

.rr-gallery__close{ top: 16px; right: 18px; }
.rr-gallery__prev{ left: 14px; }
.rr-gallery__next{ right: 14px; }

/* Dots */
.rr-gallery__dots{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  z-index: 2;
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  pointer-events: none; /* buttons handle clicks */
}
.rr-gallery__dot{
  all: unset;
  pointer-events: auto;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.35);
  cursor: pointer;
}
.rr-gallery__dot.is-active{ background: rgba(255,255,255,.9); }

@media (max-width: 767px){
  .rr-gallery__btn{ width: 44px; height: 44px; }
  .rr-gallery__btn svg{ width: 24px; height: 24px; }
  .rr-gallery__dots{ bottom: 14px; }
}

