/* ==========================================
   Services Page Modern Styling (2026)
   ========================================== */

/* Hero Slider Section (85vh Grand Height) */
.services-hero-section {
  position: relative;
  width: 100%;
  height: 85vh;
  min-height: 600px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slider-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.services-hero-slide {
  min-width: 100%;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-height, 90px) + 2rem) 2rem 4rem 2rem;
}

.hero-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.65) 0%, rgba(15, 23, 42, 0.78) 100%);
  z-index: 1;
}

.services-hero-section .hero-content-wrap {
  position: relative;
  z-index: 2;
  max-width: 850px;
}

.services-hero-section .section-tag {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.4rem 1rem;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.services-hero-section .hero-title {
  font-family: var(--font-display, 'DM Serif Display', serif);
  font-size: 3.8rem;
  color: #ffffff;
  line-height: 1.15;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  margin-bottom: 1.25rem;
}

.services-hero-section .section-description {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.7;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Slider Dots */
.services-hero-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero-dot.active {
  width: 32px;
  border-radius: 6px;
  background: #ffffff;
}

/* ==========================================
   Reference Image Style 4-Column 3D Flip Cards
   ========================================== */
.services-flip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 3.5rem;
}

.ref-flip-card {
  background-color: transparent;
  width: 100%;
  height: 480px;
  perspective: 1200px;
}

.ref-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  border-radius: 24px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.ref-flip-card:hover .ref-card-inner {
  transform: rotateY(180deg);
}

.ref-card-front, .ref-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
}

/* Front Side Styling (Reference Image Layout) */
.ref-card-front {
  display: flex;
  flex-direction: column;
}

.rcf-img-container {
  position: relative;
  width: 100%;
  height: 230px;
  background-size: cover;
  background-position: center;
}

.rcf-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  color: var(--primary, #176B87);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
}

.rcf-price-tag {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
}

.rcf-content {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.rcf-title-row h3 {
  font-family: var(--font-display, 'DM Serif Display', serif);
  font-size: 1.2rem;
  color: var(--text-primary, #0f172a);
  margin-bottom: 0.35rem;
}

.rcf-desc {
  font-size: 0.82rem;
  color: var(--text-secondary, #64748b);
  line-height: 1.45;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rcf-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.rcf-rating {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
  background: #f1f5f9;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.rcf-tag-pill {
  font-size: 0.72rem;
  color: var(--text-secondary, #475569);
  background: #f8fafc;
  border: 1px solid var(--border, #e2e8f0);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.rcf-btn-mock {
  background: var(--surface-soft, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  color: var(--primary, #176B87);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.6rem;
  border-radius: 12px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

/* Back Side Styling (Flipped Details View - Uniform Height Fix) */
.ref-card-back {
  background: var(--surface, #ffffff);
  color: var(--text-primary, #0f172a);
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem 1.5rem;
  text-align: left;
  box-sizing: border-box;
}

.rcb-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
  padding-bottom: 0.6rem;
}

.rcb-header h3 {
  font-family: var(--font-display, 'DM Serif Display', serif);
  font-size: 1.25rem;
  color: var(--text-primary, #0f172a);
  margin: 0;
}

.ref-card-back p {
  font-size: 0.84rem;
  color: var(--text-secondary, #64748b);
  line-height: 1.45;
  margin-bottom: 0.75rem;
}

.rcb-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.rcb-list li {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
}

/* Responsive Grid Breakpoints */
@media (max-width: 1200px) {
  .services-flip-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .services-flip-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .services-flip-grid {
    grid-template-columns: 1fr;
  }
}