/**
 * Services Widget Styles
 * Extracted from inline styles for better performance and maintainability
 */

.services-widget-wrapper {
  /* Padding now controlled via Elementor responsive controls */
  background-color: var(--services-bg-color, #0a0a09);
  position: relative;
  overflow: hidden;
}

.services-gradient-bg {
  position: absolute;
  top: -50%;
  inset-inline-end: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, var(--services-primary-color, #F2B713)08 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  /* Animation handled by GSAP */
}

.services-container {
  position: relative;
  max-width: 1600px;
  margin-inline: auto;
  padding-inline: 24px;
  z-index: 1;
  width: 100%;
}

@media (min-width: 1024px) {
  .services-container {
    padding-inline: 48px;
  }
}

.services-header {
  text-align: center;
  margin-bottom: 80px;
}

.services-section-label {
  display: block;
  font-size: 0.875rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 24px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--services-primary-color, #F2B713);
}

.services-heading {
  color: #ffffff;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

@media (min-width: 1024px) {
  .services-heading {
    font-size: 4.375rem;
  }
}

.services-heading-gradient {
  background: linear-gradient(to right, #ffffff, var(--services-primary-color, #F2B713));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.services-grid-wrapper {
  position: relative;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  width: 100%;
  box-sizing: border-box;
}

/* Mobile Slider Styles - Compact Design */
@media (max-width: 767px) {
  /* Hide desktop design on mobile */
  .service-card-desktop {
    display: none !important;
  }

  /* Show mobile design */
  .service-card-mobile {
    display: block !important;
  }

  .services-mobile-slider-enabled .services-grid-wrapper {
    overflow: hidden;
    position: relative;
    margin: 0 -24px;
    padding: 0 24px;
  }

  .services-mobile-slider-enabled .services-grid.services-slider {
    display: flex;
    grid-template-columns: none;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    padding-bottom: 20px;
    margin-bottom: -20px;
    cursor: grab;
    scroll-padding-inline: 24px;
    scroll-behavior: smooth;
  }

  .services-mobile-slider-enabled .services-grid.services-slider.services-slider-active {
    cursor: grabbing;
    user-select: none;
    scroll-snap-type: none;
  }

  .services-mobile-slider-enabled .services-grid.services-slider::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }

  .services-mobile-slider-enabled .service-card {
    flex: 0 0 calc(85vw - 48px);
    min-width: calc(85vw - 48px);
    max-width: calc(85vw - 48px);
    scroll-snap-align: center;
    scroll-snap-stop: always;
    margin: 0 auto;
    height: auto;
    min-height: 200px;
  }

  .services-mobile-slider-enabled .service-card:first-child {
    margin-inline-start: 0;
  }

  .services-mobile-slider-enabled .service-card:last-child {
    margin-inline-end: 0;
  }

  /* Mobile Compact Card Design */
  .service-card-mobile {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    position: relative;
  }

  .service-card-mobile-content {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: linear-gradient(135deg, rgba(10, 10, 9, 0.95), rgba(30, 29, 27, 0.95));
    border: 1px solid rgba(242, 183, 19, 0.2);
    border-radius: 12px;
    height: 100%;
    min-height: 200px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
  }

  .service-card-mobile-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(242, 183, 19, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .service-card-mobile:hover .service-card-mobile-content,
  .service-card-mobile:active .service-card-mobile-content {
    border-color: rgba(242, 183, 19, 0.5);
    transform: translateY(-2px);
  }

  .service-card-mobile:hover .service-card-mobile-content::before,
  .service-card-mobile:active .service-card-mobile-content::before {
    opacity: 1;
  }

  /* Mobile Icon */
  .service-card-mobile-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
  }

  .service-card-mobile-icon i,
  .service-card-mobile-icon svg {
    width: 24px;
    height: 24px;
    color: var(--services-bg-color, #0a0a09);
  }

  .service-card-mobile:hover .service-card-mobile-icon {
    transform: scale(1.1) rotate(5deg);
  }

  /* Mobile Title */
  .service-card-mobile-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 12px 0;
    line-height: 1.3;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
      'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  }

  /* Mobile Features - 2 columns */
  .service-card-mobile-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    margin-bottom: 16px;
    flex: 1;
  }

  .service-card-mobile-feature {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
      'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
    position: relative;
    padding-inline-start: 14px;
  }

  .service-card-mobile-feature::before {
    content: '•';
    position: absolute;
    inset-inline-start: 0;
    color: var(--services-primary-color, #F2B713);
    font-weight: bold;
    font-size: 1rem;
    line-height: 1.2;
  }

  /* Mobile Button */
  .service-card-mobile-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(242, 183, 19, 0.1);
    border: 1px solid rgba(242, 183, 19, 0.3);
    border-radius: 8px;
    color: var(--services-primary-color, #F2B713);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: auto;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
      'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  }

  .service-card-mobile-button svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
  }

  .service-card-mobile:hover .service-card-mobile-button {
    background: rgba(242, 183, 19, 0.2);
    border-color: rgba(242, 183, 19, 0.5);
  }

  .service-card-mobile:hover .service-card-mobile-button svg {
    transform: translateX(4px);
  }
}

/* Desktop - Hide mobile design */
@media (min-width: 768px) {
  .service-card-mobile {
    display: none !important;
  }

  .service-card-desktop {
    display: block !important;
  }
}

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

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.service-card {
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  cursor: pointer;
  pointer-events: auto;
  /* Initial state - GSAP will set opacity and visibility */
}

/* Desktop card height */
@media (min-width: 768px) {
  .service-card {
    height: 500px;
    background: linear-gradient(to bottom right, #0a0a09, var(--services-bg-color, #0a0a09));
    border: 2px solid var(--services-primary-color, #F2B713)33;
    transition: border-color 0.3s ease;
  }
}

.service-card.is-visible {
  /* GSAP handles all animations */
  pointer-events: auto;
}

.service-card-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
  position: relative;
}

/* Hide mobile by default (desktop) */
.service-card-mobile {
  display: none;
}

/* Image Container - matching React structure */
.service-card-image-container {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.service-card-image-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* Animation handled by GSAP */
}

.service-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Animation handled by GSAP */
}

.service-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--services-bg-color, #0a0a09) 0%, var(--services-bg-color, #0a0a09)E6 50%, var(--services-bg-color, #0a0a09)80 100%);
  z-index: 1;
  pointer-events: none;
}

/* Content - matching React flexbox justify-between structure (p-8 = 32px) */
.service-card-content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px;
  z-index: 2;
}

/* Icon at top */
.service-card-icon-wrapper {
  /* Icon positioned at top via justify-between */
}

.service-card-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Animation handled by GSAP */
}

.service-card-icon i {
  font-size: var(--service-icon-size-desktop, 32px);
}

.service-card-icon svg {
  width: var(--service-icon-size-desktop, 32px);
  height: var(--service-icon-size-desktop, 32px);
}

@media (max-width: 1024px) {
  .service-card-icon i {
    font-size: var(--service-icon-size-tablet, 32px);
  }

  .service-card-icon svg {
    width: var(--service-icon-size-tablet, 32px);
    height: var(--service-icon-size-tablet, 32px);
  }
}

@media (max-width: 767px) {
  .service-card-icon i {
    font-size: var(--service-icon-size-mobile, 32px);
  }

  .service-card-icon svg {
    width: var(--service-icon-size-mobile, 32px);
    height: var(--service-icon-size-mobile, 32px);
  }
}

.service-card-text {
  /* Content at bottom via justify-between */
}

.service-card-title {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 16px 0;
  line-height: 1.2;
  /* Animation handled by GSAP */
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

.service-card-description {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0 0 24px 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

.service-card-features {
  margin-bottom: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  /* Animation handled by GSAP */
}

.service-card-features-border {
  border-top: 1px solid var(--services-primary-color, #F2B713)4D;
  padding-top: 16px;
  margin-bottom: 16px;
}

.service-card-feature-badge {
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  /* Initial state for stagger animation */
  opacity: 0;
  transform: translateY(10px);
}

.service-card-features-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-card-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.875rem;
  /* Animation handled by GSAP */
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

.service-card-cta-arrow {
  /* Animation handled by GSAP */
}
