/* ==========================================================================
   OUR BEST SERVICES SECTION - STYLES
   Interactive Accordion with Editorial Agency Aesthetic
   Light Gray Canvas (#F5F5F5) with Elevated White Active Panel Cards
   Scoped strictly to .services-* to avoid interference with other sections
   ========================================================================== */

:root {
  --srv-accent: #00CFE8;
  --srv-accent-hover: #00b4ca;
  --srv-text-dark: #111317;
  --srv-text-muted: #8E95A2;
  --srv-text-desc: #555E6D;
  --srv-border: #E0E2E6;
  --srv-border-light: #ECEEF2;
  --srv-bg: #F5F5F5;
  --srv-card-bg: #FFFFFF;
  --srv-card-border: rgba(0, 0, 0, 0.06);
  --srv-card-shadow: 0 10px 30px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(0, 0, 0, 0.02);
  --srv-tag-bg: #F8F9FA;
  --srv-tag-border: #E5E7EB;
  --srv-tag-text: #4B5563;
  --srv-placeholder-bg: #E8EAED;
  --srv-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --srv-radius-card: 20px;
  --srv-radius-img: 18px;
  --srv-radius-pill: 9999px;
  --srv-transition-timing: cubic-bezier(0.16, 1, 0.3, 1);
  --srv-transition-duration: 0.35s;
}

/* ==========================================================================
   BASE SECTION CONTAINER
   ========================================================================== */
.services-section {
  width: 100%;
  background-color: var(--srv-bg);
  font-family: var(--srv-font);
  color: var(--srv-text-dark);
  box-sizing: border-box;
  padding: 100px 0 120px 0;
  position: relative;
  overflow: hidden;
}

.services-section *,
.services-section *::before,
.services-section *::after {
  box-sizing: border-box;
}

.services-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ==========================================================================
   1. SECTION HEADING
   ========================================================================== */
.services-header-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 64px;
}

/* Top Label Badge */
.services-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}

.services-badge-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.services-badge-icon svg,
.services-badge-icon svg path {
  width: 100%;
  height: 100%;
  fill: var(--srv-accent);
}

.services-badge-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--srv-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
}

/* Main Section Title */
.services-title {
  margin: 0 auto;
  max-width: 760px;
  font-size: clamp(34px, 3.8vw, 52px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--srv-text-dark);
  text-align: center;
}

/* Subtitle Description */
.services-subtitle {
  margin: 18px auto 0 auto;
  max-width: 620px;
  font-size: clamp(16px, 1.2vw, 18px);
  font-weight: 450;
  line-height: 1.6;
  color: #64748B;
  text-align: center;
}

/* ==========================================================================
   2. ACCORDION LIST & ROWS
   ========================================================================== */
.services-accordion-list {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Single Accordion Row */
.services-item {
  width: 100%;
  background: transparent;
  padding: 0 32px;
  border-radius: var(--srv-radius-card);
  transition: background-color var(--srv-transition-duration) ease,
              box-shadow var(--srv-transition-duration) ease,
              border-color var(--srv-transition-duration) ease,
              margin var(--srv-transition-duration) var(--srv-transition-timing),
              padding var(--srv-transition-duration) var(--srv-transition-timing);
}

/* Collapsed items divider logic */
.services-item:not(.is-active) {
  border-bottom: 1px solid var(--srv-border);
}

.services-item:first-child:not(.is-active) {
  border-top: 1px solid var(--srv-border);
}

.services-item.is-active + .services-item:not(.is-active) {
  border-top: 1px solid var(--srv-border);
}

.services-item:not(.is-active):hover {
  background-color: rgba(255, 255, 255, 0.45);
}

/* Active State: Elevated White Card with 20px radius */
.services-item.is-active {
  background-color: var(--srv-card-bg);
  border: 1px solid var(--srv-card-border);
  border-radius: var(--srv-radius-card);
  box-shadow: var(--srv-card-shadow);
  margin: 14px 0;
  padding: 10px 44px 44px 44px;
}

/* Accordion Header Trigger */
.services-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 34px 0;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  outline: none;
  font-family: inherit;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  gap: 20px;
  transition: padding var(--srv-transition-duration) ease;
}

.services-item.is-active .services-trigger {
  padding: 30px 0 26px 0;
}

.services-trigger:focus-visible {
  outline: 2px solid var(--srv-accent);
  outline-offset: 4px;
  border-radius: 6px;
}

/* Left portion: Number + Title */
.services-trigger-left {
  display: flex;
  align-items: baseline;
  gap: 28px;
  flex-grow: 1;
  min-width: 0;
}

.services-number {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--srv-accent);
  line-height: 1;
  flex-shrink: 0;
}

.services-name {
  font-size: clamp(26px, 2.6vw, 38px);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--srv-text-dark);
  line-height: 1.15;
  transition: color 0.25s ease;
}

.services-trigger:hover .services-name {
  color: #000000;
}

/* Right portion: Arrow */
.services-trigger-right {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
}

.services-arrow {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--srv-text-dark);
  transition: transform var(--srv-transition-duration) var(--srv-transition-timing),
              color 0.25s ease;
}

.services-arrow svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.services-trigger:hover .services-arrow {
  color: var(--srv-accent);
}

.services-item:not(.is-active) .services-trigger:hover .services-arrow {
  transform: translateX(4px);
}

/* Active Arrow: Cyan color and rotated diagonal */
.services-item.is-active .services-arrow {
  color: var(--srv-accent);
  transform: rotate(-45deg);
}

.services-item.is-active .services-trigger:hover .services-arrow {
  transform: rotate(-45deg) scale(1.08);
}

/* ==========================================================================
   3. EXPANDABLE PANEL (GRID-BASED HEIGHT TRANSITION)
   ========================================================================== */
.services-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--srv-transition-duration) var(--srv-transition-timing);
}

.services-item.is-active .services-panel {
  grid-template-rows: 1fr;
}

.services-panel-inner {
  overflow: hidden;
  min-height: 0;
}

/* 55% Content / 45% Image layout */
.services-content-layout {
  display: grid;
  grid-template-columns: 1.22fr 1fr;
  gap: 36px;
  align-items: stretch;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease 0.05s, transform 0.3s var(--srv-transition-timing) 0.05s;
}

.services-item.is-active .services-content-layout {
  opacity: 1;
  transform: translateY(0);
}

/* Content Left Column (Description + Tags) */
.services-content-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-left: 0;
  padding-right: 12px;
}

.services-desc {
  font-size: 17.5px;
  line-height: 1.65;
  color: var(--srv-text-desc);
  font-weight: 450;
  margin: 0 0 32px 0;
  max-width: 580px;
}

/* Tags List */
.services-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: auto;
  padding-top: 10px;
}

.services-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--srv-radius-pill);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  background-color: var(--srv-tag-bg);
  border: 1px solid var(--srv-tag-border);
  color: var(--srv-tag-text);
  transition: all 0.2s ease;
}

.services-pill:hover {
  border-color: var(--srv-accent);
  color: var(--srv-text-dark);
}

/* Primary/Featured Tag */
.services-pill.pill-primary {
  background-color: var(--srv-accent);
  border-color: var(--srv-accent);
  color: #FFFFFF;
}

.services-pill.pill-primary:hover {
  background-color: var(--srv-accent-hover);
  border-color: var(--srv-accent-hover);
}

/* Content Right Column (Image/Visual Area) */
.services-content-right {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.services-visual-wrapper {
  width: 100%;
  height: 100%;
  min-height: 280px;
  max-height: 360px;
  border-radius: var(--srv-radius-img);
  overflow: hidden;
  background-color: var(--srv-placeholder-bg);
  position: relative;
}

.services-img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  max-height: 360px;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: var(--srv-radius-img);
  transition: transform 0.5s var(--srv-transition-timing);
}

.services-visual-wrapper:hover .services-img {
  transform: scale(1.02);
}

/* Clean neutral blank image placeholder for services without local images */
.services-placeholder {
  width: 100%;
  height: 100%;
  min-height: 280px;
  max-height: 360px;
  border-radius: var(--srv-radius-img);
  background-color: var(--srv-placeholder-bg);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

/* Explicitly hide any residual placeholder icons, titles, and subtitles */
.services-placeholder-icon,
.services-placeholder-title,
.services-placeholder-subtitle {
  display: none !important;
}

/* ==========================================================================
   4. RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* Medium Desktops & Large Tablets */
@media (max-width: 1200px) {
  .services-container {
    padding: 0 32px;
  }

  .services-item {
    padding: 0 24px;
  }

  .services-item.is-active {
    padding: 8px 32px 36px 32px;
  }

  .services-content-layout {
    grid-template-columns: 1.15fr 1fr;
    gap: 30px;
  }
}

/* Tablets (1024px down to 768px) */
@media (max-width: 1024px) {
  .services-section {
    padding: 70px 0 90px 0;
  }

  .services-header-group {
    margin-bottom: 50px;
  }

  .services-trigger {
    padding: 28px 0;
  }

  .services-item.is-active .services-trigger {
    padding: 24px 0 20px 0;
  }

  .services-trigger-left {
    gap: 20px;
  }

  .services-desc {
    font-size: 16.5px;
    margin-bottom: 24px;
  }

  .services-pill {
    padding: 8px 18px;
    font-size: 12px;
  }
}

/* Mobile & Small Tablets (< 768px) - Strict Single Column Stack */
@media (max-width: 768px) {
  .services-section {
    padding: 56px 0 72px 0;
  }

  .services-container {
    padding: 0 16px;
  }

  .services-header-group {
    margin-bottom: 36px;
  }

  .services-badge-text {
    font-size: 15px;
  }

  .services-badge-icon {
    width: 15px;
    height: 15px;
  }

  .services-title {
    font-size: 30px;
    line-height: 1.2;
  }

  .services-subtitle {
    font-size: 15px;
    margin-top: 12px;
  }

  .services-item {
    padding: 0 16px;
    border-radius: 16px;
  }

  .services-item.is-active {
    padding: 4px 20px 24px 20px;
    margin: 12px 0;
    border-radius: 20px;
  }

  .services-trigger {
    padding: 22px 0;
    gap: 12px;
  }

  .services-item.is-active .services-trigger {
    padding: 20px 0 16px 0;
  }

  .services-trigger-left {
    gap: 14px;
  }

  .services-number {
    font-size: 16px;
  }

  .services-name {
    font-size: 23px;
  }

  .services-arrow {
    width: 26px;
    height: 26px;
  }

  .services-arrow svg {
    width: 18px;
    height: 18px;
  }

  /* Single Column Stack on Mobile: Service title -> Description -> Tags -> Image */
  .services-content-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .services-content-left {
    padding-left: 0;
    padding-right: 0;
  }

  .services-desc {
    font-size: 15px;
    line-height: 1.55;
    margin-bottom: 16px;
    max-width: 100%;
  }

  .services-tags {
    gap: 8px;
    margin-top: 0;
    padding-top: 0;
    margin-bottom: 4px;
  }

  .services-pill {
    padding: 7px 15px;
    font-size: 11.5px;
  }

  .services-content-right {
    width: 100%;
  }

  .services-visual-wrapper,
  .services-placeholder,
  .services-img {
    width: 100%;
    min-height: 200px;
    max-height: 240px;
    border-radius: 16px;
  }
}

/* Very Small Mobile (< 380px) */
@media (max-width: 380px) {
  .services-container {
    padding: 0 12px;
  }

  .services-item.is-active {
    padding: 4px 16px 20px 16px;
  }

  .services-title {
    font-size: 26px;
  }

  .services-name {
    font-size: 20px;
  }

  .services-number {
    font-size: 14px;
  }

  .services-desc {
    font-size: 14px;
  }

  .services-pill {
    padding: 6px 12px;
    font-size: 10.5px;
  }

  .services-visual-wrapper,
  .services-placeholder,
  .services-img {
    min-height: 180px;
    max-height: 220px;
    border-radius: 14px;
  }
}

/* Accessibility: Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .services-item,
  .services-panel,
  .services-content-layout,
  .services-arrow,
  .services-img,
  .services-number,
  .services-pill {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}
