/**
 * ASK Digital Agency - Services Directory Page Styles
 * Reference Design: Pure black, clean typography, neon-lime accents (#98E209),
 * 3-card horizontal layout with smooth Swiper carousel for categories > 3 services.
 */

:root {
  --services-bg: #000000;
  --services-card-bg: #0d0e12;
  --services-card-border: rgba(255, 255, 255, 0.08);
  --services-card-hover-border: rgba(152, 226, 9, 0.4);
  --services-lime: #98e209;
  --services-lime-glow: rgba(152, 226, 9, 0.2);
  --services-text-white: #ffffff;
  --services-text-muted: #9ca3af;
  --services-text-subtle: #71717a;
}

/* Page Wrapper */
.services-directory-page {
  background-color: var(--services-bg);
  color: var(--services-text-white);
  min-height: 100vh;
  padding-bottom: 100px;
  position: relative;
  overflow-x: hidden;
  font-family: inherit;
}

/* 1. Breadcrumb */
.services-breadcrumb-wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 24px 8px 24px;
}

.services-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--services-text-subtle);
  margin: 0;
  padding: 0;
  list-style: none;
}

.services-breadcrumb a {
  color: #a1a1aa;
  text-decoration: none;
  transition: color 0.2s ease;
}

.services-breadcrumb a:hover {
  color: var(--services-text-white);
}

.services-breadcrumb-separator {
  color: #52525b;
  font-size: 12px;
  user-select: none;
}

.services-breadcrumb-current {
  color: var(--services-lime);
  font-weight: 600;
}

/* 2. Hero Section */
.services-hero-section {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 24px 64px 24px;
}

.services-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.services-hero-left {
  max-width: 680px;
}

.services-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--services-text-white);
  margin-bottom: 22px;
}

.services-hero-title {
  font-size: clamp(34px, 4.2vw, 56px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.2px;
  color: var(--services-text-white);
  margin: 0 0 20px 0;
}

.services-hero-title .accent-lime {
  color: var(--services-lime);
}

.services-hero-desc {
  font-size: 16px;
  line-height: 1.65;
  color: var(--services-text-muted);
  margin: 0;
  max-width: 600px;
}

.services-hero-visual {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 280px;
}

.hero-glow-backdrop {
  position: absolute;
  width: 360px;
  height: 260px;
  background: radial-gradient(circle, rgba(152, 226, 9, 0.16) 0%, rgba(0, 0, 0, 0) 70%);
  filter: blur(45px);
  pointer-events: none;
  z-index: 1;
}

.services-hero-img-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 490px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0d0e12;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.8), 0 0 30px rgba(152, 226, 9, 0.08);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.services-hero-img-wrap:hover {
  transform: translateY(-3px);
  border-color: rgba(152, 226, 9, 0.35);
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.9), 0 0 35px rgba(152, 226, 9, 0.15);
}

.services-hero-img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

/* 3. Category Blocks */
.services-category-block {
  max-width: 1320px;
  margin: 0 auto 72px auto;
  padding: 0 24px;
}

.services-category-block:last-child {
  margin-bottom: 24px;
}

/* Category Header */
.services-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 20px;
}

.services-cat-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.services-cat-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #101115;
  border: 1px solid rgba(152, 226, 9, 0.5);
  box-shadow: 0 0 12px rgba(152, 226, 9, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--services-lime);
  flex-shrink: 0;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.services-category-block:hover .services-cat-icon-box {
  border-color: var(--services-lime);
  box-shadow: 0 0 18px rgba(152, 226, 9, 0.25);
  transform: scale(1.04);
}

.services-cat-header-text {
  display: flex;
  flex-direction: column;
}

.services-cat-name {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--services-text-white);
  margin: 0;
  line-height: 1.25;
}

.services-cat-desc {
  font-size: 14px;
  color: var(--services-text-muted);
  margin: 4px 0 0 0;
  line-height: 1.45;
}

.services-cat-header-right {
  flex-shrink: 0;
}

.services-cat-view-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-radius: 9999px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--services-text-white);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
}

.services-cat-view-all .view-all-arrow {
  width: 14px;
  height: 14px;
  transition: transform 0.25s ease;
}

.services-cat-view-all:hover {
  border-color: var(--services-lime);
  color: var(--services-lime);
  background: rgba(152, 226, 9, 0.05);
}

.services-cat-view-all:hover .view-all-arrow {
  transform: translateX(4px);
}

/* 4. Carousel / Grid Layout */
.services-row-wrap {
  position: relative;
  padding: 0 52px; /* Flanking area for prev/next buttons on desktop */
}

/* Flanking Slider Navigation Arrows */
.services-slider-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #0d0e12;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--services-lime);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.25s ease;
  padding: 0;
}

.services-slider-nav-btn.prev-btn {
  left: 0;
}

.services-slider-nav-btn.next-btn {
  right: 0;
}

.services-slider-nav-btn:hover:not(.swiper-button-disabled) {
  background: rgba(152, 226, 9, 0.12);
  border-color: var(--services-lime);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(152, 226, 9, 0.25);
  transform: translateY(-50%) scale(1.06);
}

.services-slider-nav-btn.swiper-button-disabled {
  opacity: 0.2;
  cursor: not-allowed;
  pointer-events: none;
  border-color: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.3);
}

/* Swiper Container */
.services-swiper-container {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.services-swiper-container .swiper-wrapper {
  display: flex;
  align-items: stretch;
}

.services-swiper-container .swiper-slide {
  height: auto;
  display: flex;
  box-sizing: border-box;
}

/* Static Grid (for <= 3 services) */
.services-static-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
}

/* 5. Service Cards Design */
.services-card-item {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--services-card-bg);
  border: 1px solid var(--services-card-border);
  border-radius: 18px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.services-card-item:hover {
  transform: translateY(-4px);
  border-color: var(--services-card-hover-border);
  box-shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.8), 0 0 20px rgba(152, 226, 9, 0.08);
}

/* Image at top */
.services-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #08090b;
  position: relative;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.services-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.services-card-item:hover .services-card-thumb img {
  transform: scale(1.04);
}

/* Card Body */
.services-card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.services-card-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--services-text-white);
  margin: 0 0 10px 0;
  line-height: 1.3;
  transition: color 0.25s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.services-card-item:hover .services-card-title {
  color: var(--services-lime);
}

.services-card-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.services-card-desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--services-text-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
}

.services-card-arrow-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #14151a;
  border: 1px solid rgba(152, 226, 9, 0.4);
  color: var(--services-lime);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.services-card-item:hover .services-card-arrow-circle {
  background: var(--services-lime);
  color: #000000;
  border-color: var(--services-lime);
  transform: scale(1.08) rotate(-15deg);
  box-shadow: 0 0 12px rgba(152, 226, 9, 0.4);
}

/* 6. Responsive Breakpoints */
@media (max-width: 1024px) {
  .services-hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .services-hero-visual {
    justify-content: flex-start;
  }

  .services-hero-img-wrap {
    max-width: 520px;
  }

  .services-static-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .services-hero-section {
    padding: 16px 20px 48px 20px;
  }

  .services-hero-visual {
    min-height: auto;
  }

  .services-hero-img-wrap {
    max-width: 100%;
    border-radius: 14px;
  }

  .services-category-block {
    margin-bottom: 56px;
    padding: 0 20px;
  }

  .services-cat-header {
    flex-wrap: wrap;
    gap: 14px;
  }

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

  .services-row-wrap {
    padding: 0; /* Remove side padding so touch carousel spans edge-to-edge */
  }

  .services-slider-nav-btn {
    display: none; /* Rely on fluid touch swipe on mobile */
  }

  .services-static-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .services-hero-title {
    font-size: 30px;
  }

  .services-hero-desc {
    font-size: 14.5px;
  }

  .services-hero-img {
    aspect-ratio: 16 / 10;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
