/* ==========================================================================
   OUR BEST SERVICES SECTION - STYLES
   Interactive Accordion with Editorial Agency Aesthetic
   Scoped strictly to .services-* to avoid interference with other sections
   ========================================================================== */

:root {
  --srv-accent: #00CFE8;
  --srv-accent-hover: #1687F5;
  --srv-text-dark: #111317;
  --srv-text-muted: #8E95A2;
  --srv-text-desc: #667085;
  --srv-border: #E5E7EB;
  --srv-border-light: #F0F2F5;
  --srv-bg: #FFFFFF;
  --srv-bg-subtle: #F9FAFB;
  --srv-tag-bg: #FFFFFF;
  --srv-tag-border: #E5E7EB;
  --srv-tag-text: #4B5563;
  --srv-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --srv-radius-img: 22px;
  --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: 80px 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: 72px;
}

/* 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: 19px;
  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: 720px;
  font-size: clamp(34px, 3.8vw, 52px);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.03em;
  color: var(--srv-text-dark);
}

/* ==========================================================================
   2. ACCORDION LIST
   ========================================================================== */
.services-accordion-list {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-top: 1px solid var(--srv-border);
}

/* Accordion Item */
.services-item {
  width: 100%;
  border-bottom: 1px solid var(--srv-border);
  transition: background-color 0.25s ease;
}

/* Entire Header Button */
.services-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 36px 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;
}

.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: 32px;
  flex-grow: 1;
  min-width: 0;
}

.services-number {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--srv-text-dark);
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.3s ease;
}

.services-item.is-active .services-number {
  color: var(--srv-accent);
}

.services-name {
  font-size: clamp(26px, 2.8vw, 42px);
  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: #2b2f38;
}

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

/* 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;
}

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

/* ==========================================================================
   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;
}

.services-content-layout {
  padding-bottom: 50px;
  display: grid;
  grid-template-columns: 52% 48%;
  gap: 48px;
  align-items: stretch;
  opacity: 0;
  transform: translateY(10px);
  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: flex-start;
  padding-left: 56px;
  padding-right: 20px;
}

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

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

.services-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: var(--srv-radius-pill);
  font-size: 13px;
  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: #CBD5E1;
  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: 380px;
  border-radius: var(--srv-radius-img);
  overflow: hidden;
  background-color: var(--srv-bg-subtle);
  position: relative;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.services-img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  max-height: 380px;
  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);
}

/* Neutral Placeholder for services without local images */
.services-placeholder {
  width: 100%;
  height: 100%;
  min-height: 280px;
  max-height: 380px;
  border-radius: var(--srv-radius-img);
  background: linear-gradient(135deg, #F8FAFC 0%, #EFF2F6 100%);
  border: 1.5px dashed #D1D5DB;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
  gap: 14px;
}

.services-placeholder-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  color: var(--srv-accent);
}

.services-placeholder-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.services-placeholder-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--srv-text-dark);
  letter-spacing: -0.01em;
}

.services-placeholder-subtitle {
  font-size: 13px;
  color: var(--srv-text-muted);
  max-width: 260px;
  line-height: 1.4;
}

/* ==========================================================================
   4. RESPONSIVE BREAKPOINTS (MOBILE FIRST ADAPTATION)
   ========================================================================== */

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

  .services-content-layout {
    grid-template-columns: 50% 50%;
    gap: 36px;
  }

  .services-content-left {
    padding-left: 44px;
  }
}

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

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

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

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

  .services-content-left {
    padding-left: 36px;
    padding-right: 12px;
  }

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

  .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 80px 0;
  }

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

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

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

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

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

  .services-trigger {
    padding: 24px 0;
    min-height: 64px;
  }

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

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

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

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

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

  /* Single Column Stack on Mobile: Number+Title+Arrow -> Description -> Tags -> Image */
  .services-content-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-bottom: 36px;
  }

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

  .services-desc {
    font-size: 16px;
    line-height: 1.58;
    margin-bottom: 22px;
  }

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

  .services-pill {
    padding: 8px 16px;
    font-size: 11.5px;
  }

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

  .services-visual-wrapper,
  .services-placeholder,
  .services-img {
    width: 100%;
    min-height: 220px;
    max-height: 280px;
    border-radius: 18px;
  }
}

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

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

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

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

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

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

  .services-pill {
    padding: 6px 13px;
    font-size: 11px;
  }

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

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