/* ============================================
   SERVICES PAGE - Desktop Styles
   ============================================

   Professional services page with filtering,
   service panel layout, and smooth animations.

   Adopts projects page layout:
   - Left sidebar: Sticky service filter buttons (positioned below header)
   - Right content: Service information panel with CTA, testimonials, and projects link

   Responsive styles are in responsive/ directory
   ============================================ */

/* Ensure services page breaks out of any parent container constraints */
.services-page {
  background: var(--bg);
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* Force full width - break out of parent containers */
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* ============================================
   SERVICES HERO SECTION
   ============================================ */

.services-hero {
  position: relative;
  padding: clamp(4rem, 8vw, 6rem) 0 clamp(4rem, 8vw, 6rem);
  /* Light background with blue accents - Referrals page style */
  background: linear-gradient(180deg,
    var(--bg) 0%,
    rgba(26, 67, 191, 0.02) 30%,
    rgba(26, 67, 191, 0.04) 50%,
    rgba(26, 67, 191, 0.02) 70%,
    var(--bg) 100%);
  overflow: hidden;
  border-bottom: 1px solid rgba(26, 67, 191, 0.15);
  margin-bottom: 0;
}

/* Architectural grid pattern - Referrals page style */
.services-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  /* Architectural grid pattern - blueprint style */
  background:
    /* Subtle grid lines */
    repeating-linear-gradient(0deg,
      transparent 0px,
      transparent 99px,
      rgba(26, 67, 191, 0.04) 100px,
      rgba(26, 67, 191, 0.04) 101px),
    repeating-linear-gradient(90deg,
      transparent 0px,
      transparent 99px,
      rgba(26, 67, 191, 0.04) 100px,
      rgba(26, 67, 191, 0.04) 101px),
    /* Flowing architectural curves */
    radial-gradient(ellipse 1200px 600px at 15% 20%, rgba(26, 67, 191, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 1000px 800px at 85% 80%, rgba(26, 67, 191, 0.06) 0%, transparent 55%),
    /* Central focus point */
    radial-gradient(ellipse 800px 500px at 50% 50%, rgba(26, 67, 191, 0.05) 0%, transparent 60%);
  mix-blend-mode: multiply;
  opacity: 0.6;
  animation: servicesHeroBackgroundFlow 20s ease-in-out infinite;
  pointer-events: none;
}

@keyframes servicesHeroBackgroundFlow {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.6;
  }
  25% {
    transform: translate3d(-10px, 8px, 0) scale(1.02);
    opacity: 0.65;
  }
  50% {
    transform: translate3d(8px, -10px, 0) scale(1.01);
    opacity: 0.63;
  }
  75% {
    transform: translate3d(-6px, 6px, 0) scale(1.015);
    opacity: 0.65;
  }
}

/* Geometric shapes overlay - Referrals page style */
.services-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  /* Geometric shapes overlay */
  background:
    /* Diagonal accent lines */
    linear-gradient(135deg, transparent 0%, rgba(26, 67, 191, 0.03) 25%, transparent 50%),
    linear-gradient(225deg, transparent 0%, rgba(26, 67, 191, 0.03) 25%, transparent 50%),
    /* Corner highlights */
    radial-gradient(circle at 0% 0%, rgba(26, 67, 191, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 100% 100%, rgba(26, 67, 191, 0.06) 0%, transparent 40%);
  pointer-events: none;
}

.services-hero-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(2rem, 5vw, 4rem);
  position: relative;
  z-index: 2;
}

/* Smooth visual transition indicator at bottom of hero */
.services-hero-container::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(26, 67, 191, 0.2) 20%,
    rgba(26, 67, 191, 0.3) 50%,
    rgba(26, 67, 191, 0.2) 80%,
    transparent 100%);
  pointer-events: none;
  z-index: 3;
}

.services-hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(3rem, 6vw, 4.5rem);
  align-items: center;
}

.services-hero-text {
  position: relative;
  z-index: 2;
}

.services-hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: clamp(0.75rem, 1.2vw, 0.875rem);
  color: var(--brand-blue);
  margin: 0 0 clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 700;
}

.services-hero-title {
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin: 0 0 clamp(1.25rem, 2vw, 1.75rem);
  color: var(--text);
}

.services-hero-accent {
  color: var(--brand-blue);
  position: relative;
  display: inline-block;
}

.services-hero-accent::after {
  content: '';
  position: absolute;
  bottom: 0.15em;
  left: 0;
  right: 0;
  height: 0.2em;
  background: linear-gradient(90deg,
    var(--brand-blue) 0%,
    rgba(26, 67, 191, 0.3) 100%);
  opacity: 0.3;
  border-radius: 2px;
  z-index: -1;
}

.services-hero-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 clamp(1.75rem, 3vw, 2.5rem);
  max-width: 92%;
  font-weight: 400;
}

.services-hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 2vw, 1.5rem);
  margin-top: clamp(1.25rem, 2.5vw, 2rem);
}

.services-hero-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: clamp(0.75rem, 1.5vw, 1rem) clamp(1rem, 2vw, 1.5rem);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(26, 67, 191, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.services-hero-feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(26, 67, 191, 0.15);
  border-color: rgba(26, 67, 191, 0.3);
  background: rgba(255, 255, 255, 0.9);
}

.services-hero-feature svg {
  width: 24px;
  height: 24px;
  color: var(--brand-blue);
  flex-shrink: 0;
}

.services-hero-feature span {
  font-size: clamp(0.875rem, 1.3vw, 1rem);
  font-weight: 600;
  color: var(--text);
}

.services-hero-media {
  position: relative;
  z-index: 2;
}

.services-hero-image-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--dark-base);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.2),
    0 8px 24px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.2);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.services-hero-image-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow:
    0 24px 72px rgba(0, 0, 0, 0.25),
    0 12px 32px rgba(0, 0, 0, 0.2);
}

.services-hero-image-card img {
  width: 100%;
  height: 100%;
  max-height: clamp(400px, 50vw, 550px);
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.services-hero-image-card:hover img {
  transform: scale(1.05);
}

.services-hero-image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: clamp(1.5rem, 3vw, 2rem);
  background: linear-gradient(to top,
    rgba(15, 23, 42, 0.95) 0%,
    rgba(15, 23, 42, 0.85) 60%,
    transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.services-hero-pill {
  align-self: flex-start;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-pill);
  font-size: clamp(0.7rem, 1vw, 0.75rem);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  background: var(--brand-blue);
  color: var(--text-white);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(26, 67, 191, 0.4);
}

.services-hero-image-overlay p {
  margin: 0;
  font-size: clamp(0.875rem, 1.2vw, 0.9375rem);
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  max-width: 90%;
}

/* ============================================
   REVEAL CONTAINER - Overlay Animation
   ============================================ */

.services-reveal-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
  /* Ensure it starts at the left edge */
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  /* Smooth transition from hero */
  background: var(--bg);
  border-top: 1px solid rgba(26, 67, 191, 0.08);
}

.services-reveal-container.is-revealing {
  position: relative;
}

/* ============================================
   FILTER NAVIGATION - ENHANCED
   ============================================ */

  .services-filters {
    position: relative;
    top: 0;
    left: 0 !important;
    right: 0;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    z-index: 20;
    background: linear-gradient(
      180deg,
      rgba(2, 6, 23, 0.98) 0%,
      rgba(10, 15, 31, 0.95) 100%
    );
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(26, 67, 191, 0.2);
    padding: clamp(2.5rem, 5vw, 3.5rem) 0;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    will-change: opacity, transform;
    min-height: auto;
    display: block;
    flex-shrink: 0; /* Prevent sidebar from shrinking in flex layout */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Fullscreen mode - initial state */
  .services-filters.is-visible.is-fullscreen {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    min-height: auto;
    display: block;
    flex-shrink: 0;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
  }

/* Sidebar mode - when content is shown */
.services-filters.is-visible.is-sidebar {
  position: sticky;
  top: 0; /* Sticky to top of viewport - will be below header naturally */
  left: 0 !important;
  margin-left: 0 !important;
  padding-left: 0 !important;
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  height: 100vh; /* Full viewport height */
  min-height: 100vh;
  max-height: 100vh;
  padding: clamp(2rem, 4vw, 3rem) 0 clamp(1rem, 2vw, 1.5rem);
  background: linear-gradient(
    180deg,
    rgba(2, 6, 23, 0.98) 0%,
    rgba(10, 15, 31, 0.96) 50%,
    rgba(2, 6, 23, 0.98) 100%
  );
  backdrop-filter: blur(20px);
  border-right: none; /* Remove hard border */
  border-bottom: none;
  border-radius: 0 var(--radius-xl) var(--radius-xl) 0; /* Rounded corners on right side */
  overflow-y: auto;
  overflow-x: hidden;
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  z-index: 10; /* Lower than header but above content */
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              border-radius 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(26, 67, 191, 0.3) transparent;
  pointer-events: auto;
  align-self: flex-start; /* Stick to top of container */
  flex-shrink: 0; /* Prevent sidebar from shrinking */
  box-sizing: border-box;
  /* Enhanced shadow for depth and separation */
  box-shadow:
    4px 0 24px rgba(0, 0, 0, 0.12),
    2px 0 8px rgba(0, 0, 0, 0.08),
    inset -1px 0 0 rgba(255, 255, 255, 0.05);
  /* Subtle gradient border effect using pseudo-element */
  position: relative;
}

/* Subtle gradient border on the right edge */
.services-filters.is-visible.is-sidebar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(26, 67, 191, 0.15) 20%,
    rgba(26, 67, 191, 0.25) 50%,
    rgba(26, 67, 191, 0.15) 80%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* Subtle glow effect on hover */
.services-filters.is-visible.is-sidebar:hover {
  box-shadow:
    4px 0 28px rgba(0, 0, 0, 0.15),
    2px 0 10px rgba(0, 0, 0, 0.1),
    inset -1px 0 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(26, 67, 191, 0.1);
}

.services-filters.is-visible.is-sidebar:hover::after {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(26, 67, 191, 0.2) 20%,
    rgba(26, 67, 191, 0.35) 50%,
    rgba(26, 67, 191, 0.2) 80%,
    transparent 100%
  );
}

/* Custom scrollbar for sidebar */
.services-filters.is-sidebar::-webkit-scrollbar {
  width: 6px;
}

.services-filters.is-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.services-filters.is-sidebar::-webkit-scrollbar-thumb {
  background: rgba(26, 67, 191, 0.3);
  border-radius: 3px;
}

.services-filters.is-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(26, 67, 191, 0.5);
}

/* Hide sidebar on scroll down - disabled for sticky positioning */
/* With sticky positioning, sidebar stays visible naturally */
/* .services-filters.is-sidebar.is-hidden {
  transform: translateX(-100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
} */

.services-filters.scrolled {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.services-filters-inner {
  max-width: 100%;
  margin: 0;
  padding: 0 clamp(2rem, 4vw, 3rem);
  width: 100%;
  box-sizing: border-box;
}

/* Adjust inner for sidebar mode */
.services-filters.is-sidebar .services-filters-inner {
  max-width: 100%;
  margin: 0;
  padding: 0 clamp(1.25rem, 2vw, 1.5rem);
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  position: relative;
  z-index: 2; /* Above the gradient border */
  gap: 0.5rem; /* Add spacing between header and buttons */
}

.services-filters-header {
  text-align: center;
  margin-bottom: 3rem;
  animation: servicesFadeInUp 0.6s ease-out 0.2s both;
}

/* Adjust header for sidebar mode */
.services-filters.is-sidebar .services-filters-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(26, 67, 191, 0.15);
  position: relative;
  flex-shrink: 0;
}

/* Subtle gradient line under header */
.services-filters.is-sidebar .services-filters-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(26, 67, 191, 0.2) 20%,
    rgba(26, 67, 191, 0.3) 50%,
    rgba(26, 67, 191, 0.2) 80%,
    transparent 100%
  );
}

.services-filters.is-sidebar .services-filters-title {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  margin-bottom: 0.5rem;
}

.services-filters.is-sidebar .services-filters-subtitle {
  font-size: clamp(0.75rem, 1.2vw, 0.875rem);
}

.services-filters-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--text-white);
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--bg) 0%, rgba(255, 255, 255, 0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.services-filters-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  font-weight: 300;
}

.services-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Adjust grid for sidebar mode */
.services-filters.is-sidebar .services-filters-grid {
  grid-template-columns: 1fr;
  gap: 0.75rem; /* Tighter spacing for better visual harmony */
  max-width: 100%;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 1rem;
  min-height: 0;
}

.services-filter-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.5rem 1.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-align: center;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  animation: servicesFilterReveal 0.6s ease-out forwards;
  /* Subtle inner shadow for depth */
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.1),
    0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Adjust button for sidebar mode */
.services-filters.is-sidebar .services-filter-btn {
  flex-direction: row;
  justify-content: flex-start;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  text-align: left;
  font-size: 0.875rem;
  width: 100%;
  min-height: 56px;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(26, 67, 191, 0.2);
  position: relative;
  z-index: 1;
}

.services-filter-btn:nth-child(1) { animation-delay: 0.1s; }
.services-filter-btn:nth-child(2) { animation-delay: 0.15s; }
.services-filter-btn:nth-child(3) { animation-delay: 0.2s; }
.services-filter-btn:nth-child(4) { animation-delay: 0.25s; }
.services-filter-btn:nth-child(5) { animation-delay: 0.3s; }
.services-filter-btn:nth-child(6) { animation-delay: 0.35s; }
.services-filter-btn:nth-child(7) { animation-delay: 0.4s; }
.services-filter-btn:nth-child(8) { animation-delay: 0.45s; }
.services-filter-btn:nth-child(9) { animation-delay: 0.5s; }

.services-filter-btn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--brand-blue);
  border-radius: var(--radius-pill) 0 0 var(--radius-pill);
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.services-filter-btn::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, rgba(26, 67, 191, 0.4), rgba(26, 67, 191, 0.3));
  border-radius: var(--radius-pill);
  z-index: -1;
  opacity: 0;
  filter: blur(15px);
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.services-filter-btn:hover {
  border-color: rgba(26, 67, 191, 0.5);
  color: var(--text-white);
  transform: translateY(-2px) scale(1.01);
  box-shadow:
    0 8px 24px rgba(26, 67, 191, 0.3),
    0 4px 12px rgba(26, 67, 191, 0.2),
    inset 0 1px 2px rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(26, 67, 191, 0.2);
  background: rgba(26, 67, 191, 0.18);
}

.services-filter-btn:hover::before {
  opacity: 1;
  width: 4px;
}

.services-filter-btn:hover::after {
  opacity: 0.7;
}

.services-filter-btn.is-active {
  background: linear-gradient(135deg, rgba(26, 67, 191, 0.25) 0%, rgba(26, 67, 191, 0.2) 100%);
  border-color: rgba(26, 67, 191, 0.6);
  color: var(--text-white);
  box-shadow:
    0 8px 32px rgba(26, 67, 191, 0.35),
    0 4px 16px rgba(26, 67, 191, 0.25),
    inset 0 1px 2px rgba(255, 255, 255, 0.15),
    0 0 0 1px rgba(26, 67, 191, 0.3);
  transform: translateY(-2px) scale(1.01);
  position: relative;
}

/* Enhanced glow effect for active button */
.services-filter-btn.is-active::after {
  opacity: 0.9;
  filter: blur(12px);
  background: linear-gradient(135deg, rgba(26, 67, 191, 0.5), rgba(26, 67, 191, 0.4));
}

.services-filter-btn.is-active::before {
  opacity: 1;
  width: 4px;
}

.services-filter-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(26, 67, 191, 0.1);
  border: 1px solid rgba(26, 67, 191, 0.2);
  transition: all 0.4s ease;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

/* Adjust icon for sidebar mode */
.services-filters.is-sidebar .services-filter-icon {
  width: 40px;
  height: 40px;
}

.services-filter-btn:hover .services-filter-icon {
  background: rgba(26, 67, 191, 0.25);
  border-color: rgba(26, 67, 191, 0.5);
  transform: scale(1.08) rotate(3deg);
  box-shadow: 0 2px 8px rgba(26, 67, 191, 0.25);
}

.services-filter-btn.is-active .services-filter-icon {
  background: linear-gradient(135deg, rgba(26, 67, 191, 0.35), rgba(26, 67, 191, 0.25));
  border-color: rgba(26, 67, 191, 0.6);
  box-shadow: 0 4px 12px rgba(26, 67, 191, 0.4);
  transform: scale(1.05);
}

.services-filter-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  transition: transform 0.3s ease;
}

.services-filter-btn:hover .services-filter-icon svg {
  transform: scale(1.1);
}

.services-filter-text {
  position: relative;
  z-index: 1;
  line-height: 1.4;
}

@keyframes servicesReveal {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes servicesFadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ============================================
   SERVICES CONTENT SECTION
   ============================================ */

.services-content-section {
  position: relative;
  flex: 1;
  padding: clamp(2.5rem, 5vw, 3.5rem) clamp(2.5rem, 5vw, 4rem);
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
  background: var(--bg);
  min-height: 100vh;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  will-change: opacity, transform;
  z-index: 1;
  width: 100%;
  min-width: 0; /* Allow flex item to shrink below content size */
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  display: block;
}

.services-content-section.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  position: relative;
  flex: 1;
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-bottom: clamp(4rem, 7vw, 6rem);
  padding-left: clamp(2.5rem, 5vw, 4rem);
  padding-right: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s,
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s,
              visibility 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s;
}

/* Content section automatically adjusts with flexbox layout - no margin needed */

.services-content-container {
  max-width: 100%; /* Use full available width */
  margin: 0;
  width: 100%;
  padding: 0;
  box-sizing: border-box;
}

/* ============================================
   SERVICES CONTENT HEADER
   ============================================ */

#services-content-header {
  text-align: left;
  margin-bottom: clamp(2rem, 4vw, 3rem);
  padding-bottom: clamp(1.25rem, 2.5vw, 1.75rem);
  border-bottom: 1px solid rgba(26, 67, 191, 0.15);
  animation: servicesFadeInUp 0.6s ease-out 0.3s both;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  position: relative;
  z-index: 1;
}

.services-content-header {
  text-align: left;
  margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem);
  padding-bottom: clamp(1rem, 2vw, 1.5rem);
  border-bottom: 1px solid rgba(26, 67, 191, 0.12);
  animation: servicesFadeInUp 0.6s ease-out 0.3s both;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  position: relative;
  z-index: 1;
}

.services-content-section:not(.is-visible):not(.is-active) #services-content-header,
.services-content-section:not(.is-visible):not(.is-active) .services-content-header {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

.services-content-section.is-visible #services-content-header,
.services-content-section.is-active #services-content-header,
.services-content-section.is-visible.is-active #services-content-header,
.services-content-section[style*="display: block"] #services-content-header,
#services-content-header.is-visible,
.services-content-container:has(.services-content-section.is-visible) #services-content-header,
.services-content-container:has(.services-content-section.is-active) #services-content-header {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  position: relative !important;
  z-index: 1 !important;
}

.services-content-section.is-visible .services-content-header,
.services-content-section.is-active .services-content-header,
.services-content-section.is-visible.is-active .services-content-header,
.services-content-section[style*="display: block"] .services-content-header,
.services-content-header.is-visible,
.services-content-container:has(.services-content-section.is-visible) .services-content-header,
.services-content-container:has(.services-content-section.is-active) .services-content-header {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  position: relative !important;
  z-index: 1 !important;
}

#services-content-title {
  font-size: clamp(2rem, 4vw, 3rem) !important;
  font-weight: 900 !important;
  color: var(--text) !important;
  margin: 0 0 clamp(0.5rem, 1vw, 0.75rem) !important;
  letter-spacing: -0.02em !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: var(--text) !important;
  background-clip: unset !important;
  line-height: 1.2 !important;
}

.services-content-title {
  font-size: clamp(1.875rem, 3.5vw, 2.75rem);
  font-weight: 900;
  color: var(--text);
  margin: 0 0 clamp(0.625rem, 1.2vw, 0.875rem);
  letter-spacing: -0.025em;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: var(--text);
  background-clip: unset;
  line-height: 1.25;
}

#services-content-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.125rem) !important;
  color: var(--muted) !important;
  margin: 0 !important;
  font-weight: 300 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.services-content-subtitle {
  font-size: clamp(0.9375rem, 1.4vw, 1.0625rem);
  color: var(--muted);
  margin: 0;
  font-weight: 400;
  line-height: 1.6;
}

/* ============================================
   SERVICES PANEL WRAPPER
   ============================================ */

.services-panel-wrapper {
  margin-top: clamp(1.25rem, 2.5vw, 2rem);
  padding: 0;
  box-sizing: border-box;
  width: 100%;
  overflow: visible;
  max-width: 100%;
}

/* ============================================
   SERVICE PANEL (from existing services-page.css)
   ============================================ */

.services-page .panel {
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow:
    0 4px 20px rgba(15, 23, 42, 0.08),
    0 2px 8px rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(26, 67, 191, 0.08);
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) !important;
  grid-template-rows: auto auto;
  gap: 0;
  min-height: 500px; /* Increased for better proportions */
  width: 100%;
  box-sizing: border-box;
  position: relative;
  overflow: visible;
  opacity: 1;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  perspective: 1500px;
  transform-style: preserve-3d;
  align-items: stretch;
  margin-bottom: clamp(2rem, 3vw, 3rem); /* Add spacing below panel */
}

.services-page .panel:hover {
  box-shadow:
    0 8px 32px rgba(15, 23, 42, 0.12),
    0 4px 16px rgba(15, 23, 42, 0.06);
  border-color: rgba(26, 67, 191, 0.15);
  transform: translateY(-2px);
}

.services-page .panel--transitioning {
  opacity: 0;
  pointer-events: none;
}

.services-page .panel--entering {
  animation: panelSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.services-page .panel--exiting {
  animation: panelSlideOut 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes panelSlideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes panelSlideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-30px);
  }
}

/* Main content area (text) - first row, first column */
.services-page .panel > div:first-of-type {
  padding: clamp(2.25rem, 3.5vw, 3rem) clamp(1.75rem, 2.5vw, 2.25rem);
  border-bottom: 1px solid rgba(26, 67, 191, 0.06);
  border-right: 1px solid rgba(26, 67, 191, 0.06);
  grid-row: 1;
  grid-column: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--bg);
}

.services-page .panel > div:first-of-type::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--brand-blue);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.services-page .panel:hover > div:first-of-type::before {
  opacity: 1;
}

/* Staggered content reveal */
.services-page .panel--visible > div:first-of-type > * {
  opacity: 1;
  transform: translateY(0);
}

.services-page .panel--visible .panel-eyebrow {
  animation: fadeInUp 0.4s ease 0.1s forwards;
}

.services-page .panel--visible .panel-title {
  animation: fadeInUp 0.4s ease 0.2s forwards;
}

.services-page .panel--visible .panel-lead {
  animation: fadeInUp 0.4s ease 0.3s forwards;
}

.services-page .panel--visible .panel-bullets li {
  animation: fadeInLeft 0.4s ease forwards;
}

.services-page .panel--visible .panel-bullets li:nth-child(1) {
  animation-delay: 0.4s;
}

.services-page .panel--visible .panel-bullets li:nth-child(2) {
  animation-delay: 0.5s;
}

.services-page .panel--visible .panel-bullets li:nth-child(3) {
  animation-delay: 0.6s;
}

.services-page .panel--visible .panel-bullets li:nth-child(4) {
  animation-delay: 0.7s;
}

.services-page .panel--visible .cta-row {
  animation: fadeInUp 0.4s ease 0.8s forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

  /* Panel media (image) - first row, second column */
.services-page .panel > .panel-media {
  padding: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  grid-row: 1;
  grid-column: 2;
  height: 100%;
  min-height: 500px; /* Match panel min-height */
  align-self: stretch;
  aspect-ratio: auto;
  position: relative;
}

.services-page .panel > .panel-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.1) 100%);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.services-page .panel:hover > .panel-media::after {
  opacity: 0.5;
}

.services-page .panel-media-inner {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 500px; /* Match panel min-height */
  transition: opacity 0.6s ease;
}

.services-page .panel-media--transitioning .panel-media-inner {
  opacity: 0;
}

.services-page .panel-eyebrow {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand-blue);
  margin: 0 0 8px;
  font-weight: 700;
}

.services-page .panel-title {
  font-size: clamp(28px, 2.8vw, 36px);
  line-height: 1.2;
  font-weight: 900;
  margin: 0 0 clamp(12px, 1.5vw, 18px);
  letter-spacing: -0.03em;
  color: var(--text);
}

.services-page .panel-lead {
  margin: 0 0 clamp(18px, 2vw, 24px);
  color: var(--muted);
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.7;
}

.services-page .panel-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 clamp(20px, 2.5vw, 28px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(10px, 1.5vw, 14px) clamp(12px, 2vw, 18px);
  font-size: clamp(13px, 1.3vw, 15px);
}

.services-page .panel-bullets li {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.services-page .panel-bullets svg {
  margin-top: 2px;
  flex-shrink: 0;
  color: var(--brand-blue);
}

.services-page .cta-row {
  display: flex;
  flex-wrap: nowrap;
  gap: clamp(10px, 1.5vw, 14px);
  align-items: center;
  width: 100%;
  margin-top: auto; /* Push CTAs to bottom of content area */
}

.services-page .cta-row .btn-primary {
  flex: 1 1 auto;
  min-width: 0;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 700;
  height: auto;
  min-height: 42px;
  background: linear-gradient(135deg,
    var(--brand-blue) 0%,
    var(--brand-blue) 100%);
  box-shadow: 0 4px 16px rgba(26, 67, 191, 0.3),
              0 0 0 0 rgba(26, 67, 191, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  color: var(--text-white);
  border: none;
  border-radius: 50px;
  cursor: pointer;
}

.services-page .cta-row .btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    var(--brand-blue) 0%,
    var(--brand-blue) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.services-page .cta-row .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(26, 67, 191, 0.4),
              0 0 0 4px rgba(26, 67, 191, 0.2);
}

.services-page .cta-row .btn-primary:hover::before {
  opacity: 1;
}

.services-page .cta-row .btn-primary span {
  position: relative;
  z-index: 1;
  color: var(--text-white);
}

.services-page .service-read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--stroke-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 42px;
  min-height: 42px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.services-page .service-read-more:hover {
  border-color: var(--brand-blue) !important;
  color: var(--text-white) !important;
  background: var(--brand-blue) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 67, 191, 0.15);
}

.services-page .service-read-more svg {
  transition: transform 0.3s ease;
}

.services-page .service-read-more:hover svg {
  transform: translateX(2px);
}

.services-page .panel-tag {
  position: absolute;
  top: 12px;
  right: 14px;
  background: rgba(17, 24, 39, 0.74);
  color: var(--text-white);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* RELATED ROW - Full width section below main content */
.services-page .panel > .related-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 32px);
  padding: clamp(2.5rem, 4vw, 3.5rem) clamp(2rem, 3vw, 2.5rem);
  width: 100%;
  box-sizing: border-box;
  background: var(--bg);
  grid-row: 2;
  grid-column: 1 / -1;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  align-items: stretch;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.services-page .card {
  background: var(--bg);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-left: 4px solid transparent;
  padding: clamp(2rem, 3vw, 2.5rem) clamp(1.75rem, 2.5vw, 2.25rem);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  height: 370px; /* Fixed height for both cards */
  max-height: 370px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.3s ease,
              border-left-color 0.3s ease;
  position: relative;
  overflow: hidden;
  background: var(--bg);
  justify-content: flex-start;
}

.services-page .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: var(--brand-blue);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.services-page .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  border-color: rgba(26, 67, 191, 0.15);
  border-left-color: var(--brand-blue);
}

.services-page .card:hover::before {
  opacity: 1;
}

.services-page .card-title {
  margin: 0 0 clamp(1.25rem, 2vw, 1.5rem);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.02em;
  position: relative;
  padding-bottom: clamp(10px, 1.2vw, 14px);
}

.services-page .card-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: clamp(50px, 6vw, 60px);
  height: 3px;
  background: var(--brand-blue);
  border-radius: 2px;
}

.services-page .stars {
  color: var(--brand-gold);
  font-size: 16px;
  margin-bottom: 12px;
  letter-spacing: 2px;
}

/* Testimonial Slider Styles */
.services-page .testimonial-slider-wrapper {
  position: relative;
  min-height: auto;
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1;
  justify-content: space-between;
  gap: 0;
}

.services-page .testimonial-slider-track {
  position: relative;
  width: 100%;
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
}

.services-page .testimonial-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transform: translateX(20px);
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.4s;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: flex-start;
}

.services-page .testimonial-item.active {
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
}

.services-page .testimonial-item.prev {
  transform: translateX(-20px);
}

.services-page .testimonial-item.next {
  transform: translateX(20px);
}

.services-page .testimonial-text {
  font-size: clamp(14px, 1.5vw, 16px);
  color: var(--text);
  margin: 0 0 clamp(14px, 1.8vw, 18px);
  font-style: italic;
  line-height: 1.75;
  flex-grow: 1;
  transition: opacity 0.3s ease;
  min-height: 0;
  max-height: none;
  overflow: visible;
  font-weight: 400;
  flex-shrink: 1;
}

.services-page .testimonial-stars {
  font-size: 1em;
  letter-spacing: 2px;
  line-height: 1;
  display: flex;
  gap: 3px;
  color: #fbbf24;
  margin-bottom: clamp(10px, 1.2vw, 14px);
  flex-shrink: 0;
}

.services-page .testimonial-stars svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.services-page .client-row {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.5vw, 14px);
  margin-top: 0;
  margin-bottom: 0;
  padding-top: clamp(14px, 1.8vw, 18px);
  padding-bottom: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.services-page .client-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.services-page .client-avatar {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px;
  max-width: 44px;
  min-height: 44px;
  max-height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(251, 191, 36, 0.3);
  flex-shrink: 0;
  display: block;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.services-page .client-avatar img {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.services-page .client-photo {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--brand-soft);
  flex-shrink: 0;
  object-fit: cover;
  display: block;
}

.services-page .client-meta {
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.services-page .client-meta strong,
.services-page .client-name {
  display: block;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}

.services-page .client-location {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}

.services-page .client-meta span {
  color: var(--muted);
  font-weight: 400;
}

/* Testimonial Indicators - Now at bottom */
.services-page .testimonial-indicators {
  display: flex;
  justify-content: center;
  gap: clamp(8px, 1vw, 10px);
  margin-top: clamp(14px, 1.8vw, 18px);
  padding-top: clamp(14px, 1.8vw, 18px);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.services-page .testimonial-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.15);
  cursor: pointer;
  padding: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.services-page .testimonial-indicator:hover {
  background: var(--brand-blue);
  transform: scale(1.3);
}

.services-page .testimonial-indicator.active {
  background: var(--brand-blue);
  width: 28px;
  border-radius: 4px;
  transform: scale(1);
}

.services-page .testimonial-indicator:focus {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}

/* Projects Gallery */
.services-page .projects-card {
  background: var(--bg);
  padding-bottom: clamp(1.5rem, 2.5vw, 2rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 360px; /* Match testimonial card height */
  max-height: 360px;
  overflow: hidden;
}

.services-page .project-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(10px, 1.5vw, 14px);
  margin-bottom: clamp(1.25rem, 2vw, 1.5rem);
  margin-top: 0;
  height: 140px; /* Fixed height for image gallery */
  flex-shrink: 0;
  align-items: start;
}

.services-page .panel--visible .project-gallery {
  animation: fadeIn 0.5s ease 0.2s forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.services-page .project-item {
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-md);
  width: 100%;
  height: 140px; /* Fixed height matching gallery */
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.1);
  align-self: start;
}

.services-page .project-item:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.2);
  z-index: 2;
}

.services-page .project-item .hover-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: var(--text-white);
  font-size: 11px;
  padding: 4px 6px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.services-page .project-item:hover .hover-text {
  opacity: 1;
}

.services-page .project-shot {
  animation: projectShotAppear 0.4s ease forwards;
}

.services-page .panel--visible .project-shot:nth-child(1) {
  animation-delay: 0.3s;
}

.services-page .panel--visible .project-shot:nth-child(2) {
  animation-delay: 0.4s;
}

.services-page .panel--visible .project-shot:nth-child(3) {
  animation-delay: 0.5s;
}

.services-page .panel--visible .project-shot:nth-child(4) {
  animation-delay: 0.6s;
}

@keyframes projectShotAppear {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.services-page .project-shot:hover {
  transform: scale(1.08) translateZ(10px);
  z-index: 1;
}

.services-page .project-shot::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(26, 67, 191, 0.1) 0%,
    rgba(26, 67, 191, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: var(--radius-sm);
  z-index: 1;
}

.services-page .project-shot:hover::before {
  opacity: 1;
}

.services-page .full-portfolio-btn {
  width: 100%;
  background: var(--bg);
  color: var(--brand-blue);
  border: 1.5px solid var(--brand-blue);
  padding: clamp(14px, 1.8vw, 16px) clamp(20px, 3vw, 28px);
  border-radius: 50px;
  font-size: clamp(14px, 1.6vw, 16px);
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: auto; /* Push to bottom */
  min-height: 48px;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.services-page .full-portfolio-btn:hover {
  background: var(--brand-blue);
  color: var(--text-white);
  border-color: var(--brand-blue);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 67, 191, 0.4);
}

.services-page .btn-ghost {
  border-radius: 999px;
  border: 1px solid var(--stroke-strong);
  background: var(--bg);
  font-size: 14px;
  padding: 10px 16px;
  color: var(--text);
  font-weight: 600;
  margin-top: auto;
  transition: all 0.2s ease;
  width: 250px;
}

.services-page .btn-ghost:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
  background: rgba(26, 67, 191, 0.05);
  transform: translateY(-1px);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

  @media (max-width: 968px) {
    /* Hero section responsive */
    .services-hero {
      padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(3rem, 6vw, 4.5rem);
      border-bottom: 1px solid rgba(26, 67, 191, 0.12);
    }

    .services-hero-container {
      padding: 0 clamp(1.5rem, 4vw, 2.5rem);
    }

    .services-hero-content {
      grid-template-columns: 1fr;
      gap: clamp(2rem, 4vw, 3rem);
    }

    .services-hero-media {
      order: -1; /* Image first on mobile */
    }

    .services-hero-image-card img {
      max-height: clamp(300px, 50vw, 400px);
    }

    .services-hero-subtitle {
      max-width: 100%;
    }

    .services-hero-features {
      flex-direction: column;
      gap: 1rem;
    }

    .services-hero-feature {
      width: 100%;
    }

    /* Reveal container stacks vertically on tablet/mobile */
    .services-reveal-container {
      flex-direction: column;
    }

    /* Content section takes full width on tablet */
    .services-content-section {
      max-width: 100% !important;
      padding-left: clamp(1.5rem, 3vw, 2rem) !important;
      padding-right: clamp(1.5rem, 3vw, 2rem) !important;
    }

    /* Sidebar becomes overlay on mobile/tablet */
    .services-filters.is-sidebar {
      width: 100%;
      max-width: 320px;
      transform: translateX(0);
      box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
      background: rgba(2, 6, 23, 0.98) !important;
      opacity: 1 !important;
      visibility: visible !important;
      pointer-events: auto !important;
      z-index: 26 !important;
      position: fixed !important;
      top: 0 !important; /* Override sticky on mobile - use fixed */
      height: 100vh !important;
      max-height: 100vh !important;
      border-radius: 0 var(--radius-xl) var(--radius-xl) 0 !important; /* Maintain rounded corners on mobile */
    }

  .services-filters.is-sidebar.is-visible {
    transform: translateX(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 26 !important;
  }

  .services-filters.is-sidebar.is-hidden {
    transform: translateX(-100%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease !important;
  }

  .services-filters.is-sidebar.is-visible:not(.is-hidden) {
    transform: translateX(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    background: rgba(2, 6, 23, 0.98) !important;
    pointer-events: auto !important;
  }

  .services-filters.is-sidebar .services-filter-btn {
    pointer-events: auto !important;
    opacity: 1 !important;
    cursor: pointer !important;
    background: rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    position: relative !important;
    z-index: 27 !important;
    -webkit-tap-highlight-color: rgba(26, 67, 191, 0.3) !important;
  }

  .services-filters.is-sidebar .services-filter-btn:hover,
  .services-filters.is-sidebar .services-filter-btn:active,
  .services-filters.is-sidebar .services-filter-btn:focus {
    background: rgba(26, 67, 191, 0.18) !important;
    border-color: rgba(26, 67, 191, 0.5) !important;
    color: var(--text-white) !important;
    outline: 2px solid rgba(26, 67, 191, 0.5) !important;
    outline-offset: 2px !important;
    box-shadow:
      0 8px 24px rgba(26, 67, 191, 0.3),
      0 4px 12px rgba(26, 67, 191, 0.2),
      inset 0 1px 2px rgba(255, 255, 255, 0.1) !important;
  }

  .services-filters.is-sidebar .services-filter-btn.is-active {
    background: linear-gradient(135deg, rgba(26, 67, 191, 0.25) 0%, rgba(26, 67, 191, 0.2) 100%) !important;
    border-color: rgba(26, 67, 191, 0.6) !important;
    color: var(--text-white) !important;
    box-shadow:
      0 8px 32px rgba(26, 67, 191, 0.35),
      0 4px 16px rgba(26, 67, 191, 0.25),
      inset 0 1px 2px rgba(255, 255, 255, 0.15),
      0 0 0 1px rgba(26, 67, 191, 0.3) !important;
  }

  .services-filters.is-sidebar .services-filters-grid {
    pointer-events: auto !important;
    position: relative;
    z-index: 27 !important;
  }

  .services-filters.is-sidebar .services-filters-inner {
    pointer-events: auto !important;
    position: relative;
    z-index: 27 !important;
  }

  /* Content section takes full width on mobile */
  .services-content-section.is-visible.is-active {
    left: 0;
    padding-left: clamp(1.5rem, 3vw, 2rem);
    padding-right: clamp(1.5rem, 3vw, 2rem);
    padding-top: clamp(2.5rem, 5vw, 3.5rem);
    padding-bottom: clamp(6rem, 10vw, 8rem);
    margin-bottom: clamp(4rem, 8vw, 6rem);
  }

  #services-content-header {
    margin-bottom: clamp(2rem, 4vw, 2.5rem) !important;
    padding-bottom: clamp(1.25rem, 2.5vw, 1.75rem) !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .services-content-header {
    margin-bottom: clamp(2rem, 4vw, 2.5rem);
    padding-bottom: clamp(1.25rem, 2.5vw, 1.75rem);
  }

  .services-content-title {
    font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  }

  .services-content-subtitle {
    font-size: clamp(0.9375rem, 2vw, 1.0625rem);
  }

  .services-page .panel {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto;
  }

  .services-page .panel > div:first-of-type {
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 32px 24px;
  }

  .services-page .panel > .panel-media {
    grid-row: 2;
    min-height: 300px;
  }

  /* Add overlay backdrop for mobile sidebar */
  .services-filters.is-sidebar::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 24;
    pointer-events: none;
  }

  .services-filters.is-sidebar.is-visible::after {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
  }
}

  @media (max-width: 640px) {
  /* Hero section mobile adjustments */
  .services-hero {
    padding: clamp(2.5rem, 5vw, 3.5rem) 0 clamp(2.5rem, 5vw, 3.5rem);
    border-bottom: 1px solid rgba(26, 67, 191, 0.1);
  }

  .services-hero-container {
    padding: 0 clamp(1rem, 3vw, 1.5rem);
  }

  .services-hero-content {
    gap: clamp(1.5rem, 3vw, 2rem);
  }

  .services-hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
    margin-bottom: clamp(1rem, 2vw, 1.25rem);
  }

  .services-hero-subtitle {
    font-size: clamp(0.9375rem, 1.6vw, 1.125rem);
    margin-bottom: clamp(1.5rem, 3vw, 2rem);
  }

  .services-hero-features {
    flex-direction: column;
    gap: 0.875rem;
    margin-top: clamp(1rem, 2vw, 1.5rem);
  }

  .services-hero-feature {
    padding: 0.875rem 1rem;
  }

  .services-hero-feature svg {
    width: 20px;
    height: 20px;
  }

  .services-hero-feature span {
    font-size: clamp(0.8125rem, 1.2vw, 0.9375rem);
  }

  .services-hero-image-card img {
    max-height: clamp(280px, 60vw, 350px);
  }

  .services-hero-image-overlay {
    padding: clamp(1.25rem, 2.5vw, 1.75rem);
  }

  .services-hero-image-overlay p {
    font-size: clamp(0.8125rem, 1.1vw, 0.875rem);
  }

  /* Ensure filters are visible on mobile */
  .services-filters {
    position: relative !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    min-height: auto !important;
  }

  /* On mobile, sidebar should not be sticky */
  .services-filters.is-sidebar {
    position: fixed !important;
    top: 0 !important;
    height: 100vh !important;
  }

  /* Reveal container should stack vertically on mobile */
  .services-reveal-container {
    flex-direction: column;
  }

  .services-filters.is-fullscreen {
    padding: clamp(2.5rem, 5vw, 3.5rem) 0 clamp(2rem, 4vw, 3rem);
    min-height: auto;
    display: block;
    overflow-y: visible;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    position: relative !important;
  }

  .services-filters.is-fullscreen .services-filters-inner {
    width: 100%;
    max-width: 100%;
    padding: 0 clamp(1rem, 3vw, 1.5rem) clamp(2rem, 4vw, 3rem);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    min-height: auto;
    height: auto;
    flex: none;
    overflow: visible;
  }

  .services-filters.is-fullscreen .services-filters-header {
    margin-bottom: clamp(1.5rem, 3vw, 2rem);
    flex-shrink: 0;
    padding-top: clamp(1rem, 2vw, 1.5rem);
  }

  .services-filters.is-fullscreen .services-filters-grid {
    grid-template-columns: 1fr;
    gap: clamp(0.75rem, 1.5vw, 1rem);
    padding: 0;
    width: 100%;
    max-width: 100%;
    flex: none;
    display: grid;
    align-content: start;
    overflow-y: visible;
    overflow-x: hidden;
    margin-bottom: clamp(1.5rem, 3vw, 2rem);
    min-height: auto;
    height: auto;
    max-height: none;
    grid-auto-rows: auto;
    visibility: visible;
    opacity: 1;
  }

  .services-filters.is-fullscreen .services-filter-btn {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1 !important;
  }

  .services-filters.is-fullscreen .services-filter-btn {
    padding: clamp(1.125rem, 2.5vw, 1.375rem) clamp(1rem, 2.5vw, 1.25rem);
    font-size: clamp(0.875rem, 2vw, 0.9375rem);
    min-height: 56px;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(0.75rem, 2vw, 1rem);
  }

  .services-filters.is-fullscreen .services-filter-icon {
    width: clamp(40px, 5vw, 44px);
    height: clamp(40px, 5vw, 44px);
    flex-shrink: 0;
  }

  .services-filters.is-fullscreen .services-filter-icon svg {
    width: clamp(20px, 2.5vw, 22px);
    height: clamp(20px, 2.5vw, 22px);
  }

  .services-filters.is-fullscreen .services-filter-text {
    font-size: clamp(0.875rem, 2vw, 0.9375rem);
    line-height: 1.4;
    text-align: left;
  }

  .services-filters.is-sidebar {
    max-width: 280px;
    padding-bottom: clamp(1.5rem, 3vw, 2rem);
    background: rgba(2, 6, 23, 0.98) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    border-radius: 0 var(--radius-xl) var(--radius-xl) 0 !important; /* Maintain rounded corners on mobile */
  }

  .services-filters.is-sidebar .services-filters-inner {
    padding-bottom: 1rem;
  }

  .services-filters.is-sidebar .services-filters-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    flex-shrink: 0;
  }

  .services-filters.is-sidebar .services-filters-title {
    font-size: 1.125rem;
    color: var(--text-white) !important;
  }

  .services-filters.is-sidebar .services-filters-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7) !important;
  }

  .services-filters.is-sidebar .services-filters-grid {
    gap: 0.75rem;
    padding-bottom: 2rem;
    min-height: auto;
    max-height: none;
  }

  .services-filters.is-sidebar .services-filter-btn {
    padding: 0.875rem 0.75rem;
    font-size: 0.8125rem;
    min-height: 52px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(26, 67, 191, 0.2);
    pointer-events: auto !important;
    opacity: 1 !important;
    cursor: pointer !important;
    background: rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.9) !important;
  }

  .services-filters.is-sidebar .services-filter-btn:hover {
    background: rgba(26, 67, 191, 0.18) !important;
    border-color: rgba(26, 67, 191, 0.5) !important;
    color: var(--text-white) !important;
    box-shadow:
      0 8px 24px rgba(26, 67, 191, 0.3),
      0 4px 12px rgba(26, 67, 191, 0.2),
      inset 0 1px 2px rgba(255, 255, 255, 0.1) !important;
  }

  .services-filters.is-sidebar .services-filter-btn.is-active {
    background: linear-gradient(135deg, rgba(26, 67, 191, 0.25) 0%, rgba(26, 67, 191, 0.2) 100%) !important;
    border-color: rgba(26, 67, 191, 0.6) !important;
    color: var(--text-white) !important;
    box-shadow:
      0 8px 32px rgba(26, 67, 191, 0.35),
      0 4px 16px rgba(26, 67, 191, 0.25),
      inset 0 1px 2px rgba(255, 255, 255, 0.15),
      0 0 0 1px rgba(26, 67, 191, 0.3) !important;
  }

  /* Content section mobile adjustments */
  .services-page .services-content-section {
    min-height: auto !important;
    height: auto !important;
    max-height: none !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    max-width: 100% !important;
  }

  .services-page .services-content-section.is-visible,
  .services-page .services-content-section.is-active,
  .services-page .services-content-section.is-visible.is-active {
    min-height: auto !important;
    height: auto !important;
    max-height: none !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    padding-top: clamp(2rem, 4vw, 3rem) !important;
    padding-left: clamp(1rem, 2vw, 1.5rem) !important;
    padding-right: clamp(1rem, 2vw, 1.5rem) !important;
    padding-bottom: clamp(4rem, 8vw, 5.5rem) !important;
    margin-bottom: 0 !important;
    overflow: visible !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    z-index: 1 !important;
    transform: none !important;
  }

  /* Content header mobile adjustments */
  .services-page #services-content-header,
  .services-page .services-content-header {
    text-align: left !important;
    margin-bottom: clamp(1.5rem, 3vw, 2rem) !important;
    padding-bottom: clamp(1rem, 2vw, 1.25rem) !important;
  }

  .services-page .services-content-container {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
    position: relative !important;
    overflow: visible !important;
    z-index: 1 !important;
  }

  .services-page #services-content-header {
    margin-bottom: clamp(1.5rem, 3vw, 2rem) !important;
    padding-bottom: clamp(1rem, 2vw, 1.5rem) !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .services-page .services-content-header {
    margin-bottom: clamp(1.5rem, 3vw, 2rem) !important;
    padding-bottom: clamp(1rem, 2vw, 1.5rem) !important;
  }

  .services-content-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
  }

  .services-content-subtitle {
    font-size: clamp(0.875rem, 2vw, 1rem);
  }

  .services-reveal-container {
    min-height: auto !important;
    height: auto !important;
    max-height: none !important;
  }

  .services-page {
    min-height: auto !important;
    height: auto !important;
    max-height: none !important;
  }
}

/* ============================================
   ACCESSIBILITY & REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .services-page .panel,
  .services-filter-btn,
  .services-page .card,
  .services-page .project-shot {
    transition: none !important;
    animation: none !important;
  }

  .services-page .panel--entering,
  .services-page .panel--exiting {
    animation: none !important;
  }
}

.services-filter-btn:focus,
.services-page .btn-primary:focus,
.services-page .service-read-more:focus,
.services-page .full-portfolio-btn:focus {
  outline: 3px solid rgba(26, 67, 191, 0.5);
  outline-offset: 4px;
}

/* ============================================
   SERVICE DETAILED VIEW - Page Flip Overlay
   ============================================ */

.services-page .panel {
  position: relative;
  overflow: visible;
}

.services-page .service-detailed-view {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  grid-column: 1 / -1;
  grid-row: 1 / 2;
  z-index: 20;
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  overflow-y: auto;
  overflow-x: hidden;
  opacity: 0;
  visibility: hidden;
  transform: perspective(1500px) rotateY(-100deg) scale(0.92) translateZ(-80px) translateX(20px);
  transform-origin: right center;
  transform-style: preserve-3d;
  transition: opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1),
              visibility 0.7s cubic-bezier(0.23, 1, 0.32, 1),
              transform 0.7s cubic-bezier(0.23, 1, 0.32, 1),
              filter 0.7s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.7s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
  border: 1px solid var(--stroke);
  backface-visibility: hidden;
  min-height: 450px;
  will-change: transform, opacity;
  position: relative;
  overflow: hidden;
  filter: drop-shadow(0 0 0 rgba(15, 23, 42, 0));
}

.services-page .service-detailed-view::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--brand-blue) 20%,
    var(--brand-blue) 80%,
    transparent 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.services-page .service-detailed-view.is-visible {
  opacity: 1;
  visibility: visible;
  transform: perspective(1500px) rotateY(0deg) scale(1) translateZ(0) translateX(0);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
  filter: drop-shadow(0 20px 60px rgba(15, 23, 42, 0.25));
}

.services-page .service-detailed-view.is-visible::before {
  opacity: 1;
}

/* Hide main content when detailed view is visible */
.services-page .panel.has-detailed-view > div:first-of-type,
.services-page .panel.has-detailed-view > .panel-media {
  opacity: 0;
  pointer-events: none;
  transform: perspective(1500px) rotateY(15deg) scale(0.96) translateZ(-60px) translateX(-15px);
  transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1),
              transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: opacity, transform;
  transform-style: preserve-3d;
}

.services-page .panel.has-detailed-view > .related-row {
  opacity: 1;
  pointer-events: auto;
  transition: none;
}

.services-page .service-detailed-content {
  position: relative;
  max-width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.services-page .service-detailed-close {
  position: absolute;
  top: -5px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--stroke-strong);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
  z-index: 30;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transform: scale(0.8);
}

.services-page .service-detailed-view.is-visible .service-detailed-close {
  opacity: 1;
  transform: scale(1);
}

.services-page .service-detailed-close:hover {
  background: var(--brand-blue);
  color: var(--text-white);
  border-color: var(--brand-blue);
  transform: rotate(90deg) scale(1.05);
  box-shadow: 0 6px 20px rgba(26, 67, 191, 0.4);
}

.services-page .service-detailed-close:active {
  transform: rotate(90deg) scale(0.95);
}

.services-page .service-detailed-close svg {
  width: 24px;
  height: 24px;
  display: block;
  pointer-events: none;
  flex-shrink: 0;
  opacity: 1;
  visibility: visible;
}

.services-page .service-detailed-close svg line {
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  opacity: 1;
  fill: none;
}

.services-page .service-detailed-view:not(.is-visible) .service-detailed-title,
.services-page .service-detailed-view:not(.is-visible) .service-detailed-description,
.services-page .service-detailed-view:not(.is-visible) .service-detailed-feature,
.services-page .service-detailed-view:not(.is-visible) .service-detailed-benefit,
.services-page .service-detailed-view:not(.is-visible) .service-detailed-cta {
  opacity: 0;
}

.services-page .service-detailed-view.is-visible .service-detailed-section:nth-child(2) .service-detailed-title {
  animation: fadeInUp 0.4s ease 0.2s forwards;
}

.services-page .service-detailed-view.is-visible .service-detailed-section:nth-child(2) .service-detailed-description {
  animation: fadeInUp 0.4s ease 0.3s forwards;
}

.services-page .service-detailed-view.is-visible .service-detailed-section:nth-child(3) .service-detailed-title {
  animation: fadeInUp 0.4s ease 0.4s forwards;
}

.services-page .service-detailed-view.is-visible .service-detailed-features .service-detailed-feature {
  animation: fadeInLeft 0.4s ease forwards;
}

.services-page .service-detailed-view.is-visible .service-detailed-features .service-detailed-feature:nth-child(1) {
  animation-delay: 0.5s;
}

.services-page .service-detailed-view.is-visible .service-detailed-features .service-detailed-feature:nth-child(2) {
  animation-delay: 0.6s;
}

.services-page .service-detailed-view.is-visible .service-detailed-features .service-detailed-feature:nth-child(3) {
  animation-delay: 0.7s;
}

.services-page .service-detailed-view.is-visible .service-detailed-features .service-detailed-feature:nth-child(4) {
  animation-delay: 0.8s;
}

.services-page .service-detailed-view.is-visible .service-detailed-section:nth-child(4) .service-detailed-title {
  animation: fadeInUp 0.4s ease 0.9s forwards;
}

.services-page .service-detailed-view.is-visible .service-detailed-benefits .service-detailed-benefit {
  animation: fadeInLeft 0.4s ease forwards;
}

.services-page .service-detailed-view.is-visible .service-detailed-benefits .service-detailed-benefit:nth-child(1) {
  animation-delay: 1.0s;
}

.services-page .service-detailed-view.is-visible .service-detailed-benefits .service-detailed-benefit:nth-child(2) {
  animation-delay: 1.1s;
}

.services-page .service-detailed-view.is-visible .service-detailed-benefits .service-detailed-benefit:nth-child(3) {
  animation-delay: 1.2s;
}

.services-page .service-detailed-view.is-visible .service-detailed-benefits .service-detailed-benefit:nth-child(4) {
  animation-delay: 1.3s;
}

.services-page .service-detailed-view.is-visible .service-detailed-cta {
  animation: fadeInUp 0.4s ease 1.4s forwards;
}

.services-page .service-detailed-title {
  font-size: clamp(20px, 2.5vw, 24px);
  font-weight: 800;
  color: var(--text);
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  line-height: 1.3;
  position: relative;
  padding-bottom: 12px;
  opacity: 0;
}

.services-page .service-detailed-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-blue), rgba(26, 67, 191, 0.5));
  border-radius: 2px;
}

.services-page .service-detailed-description {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 24px;
  opacity: 0;
}

.services-page .service-detailed-features,
.services-page .service-detailed-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}

.services-page .service-detailed-feature,
.services-page .service-detailed-benefit {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--stroke);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.services-page .service-detailed-feature::before,
.services-page .service-detailed-benefit::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--brand-blue), var(--brand-blue));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.services-page .service-detailed-feature:hover,
.services-page .service-detailed-benefit:hover {
  border-color: var(--brand-blue);
  background: rgba(26, 67, 191, 0.03);
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(26, 67, 191, 0.1);
}

.services-page .service-detailed-feature:hover::before,
.services-page .service-detailed-benefit:hover::before {
  opacity: 1;
}

.services-page .service-detailed-feature svg,
.services-page .service-detailed-benefit svg {
  margin-top: 2px;
  flex-shrink: 0;
  color: var(--brand-blue);
  width: 18px;
  height: 18px;
}

.services-page .service-detailed-feature span,
.services-page .service-detailed-benefit span {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

.services-page .service-detailed-cta {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  text-align: center;
  opacity: 0;
}

.services-page .service-detailed-cta .btn-primary {
  min-width: 200px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
}

.services-page .panel.has-detailed-view {
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
  border-color: rgba(26, 67, 191, 0.3);
}

.services-page .service-detailed-view {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.services-page .service-detailed-view::-webkit-scrollbar {
  width: 6px;
}

.services-page .service-detailed-view::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.6);
  border-radius: 999px;
}

/* ============================================
   MOBILE OPTIMIZATIONS
   ============================================ */

@media (max-width: 968px) {
  .services-page .panel {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto;
  }

  .services-page .panel > div:first-of-type {
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 32px 24px;
  }

  .services-page .panel > .panel-media {
    grid-row: 2;
    min-height: 300px;
  }
}

@media (max-width: 640px) {
  .services-page .services-content-section {
    padding-left: clamp(1rem, 2vw, 1.5rem) !important;
    padding-right: clamp(1rem, 2vw, 1.5rem) !important;
  }

  .services-page .panel > div:first-of-type {
    padding: 24px 20px;
  }

  .services-page .panel > .panel-media {
    min-height: 250px;
  }

  .services-page .related-row {
    grid-template-columns: 1fr;
    padding: clamp(2rem, 3vw, 2.5rem) clamp(1.5rem, 2.5vw, 2rem);
    gap: clamp(20px, 3vw, 28px);
  }

  .services-page .card {
    min-height: auto !important; /* Remove fixed min-height on mobile */
  }

  .services-page .panel {
    min-height: auto !important;
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem) !important;
  }
}
/* ============================================
   REDUCED MOTION SUPPORT
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .services-page .panel,
  .services-filter-btn,
  .services-page .card,
  .services-page .project-shot,
  .services-page .service-detailed-view {
    animation: none !important;
    transition: none !important;
  }

  .services-page .panel--entering,
  .services-page .panel--exiting {
    animation: none !important;
  }

  .services-page .service-detailed-view.is-visible {
    max-height: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
