/* Services Section CSS - Prefix: .services- */

.services-section {
  background-color: #F8FAFC;
  font-family: 'Inter', sans-serif;
}

@media (min-width: 992px) {
  .services-scroll-wrapper {
    position: relative;
    height: 250vh; /* Scroll duration length */
  }

  .services-section {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding: 0;
  }
}

@media (max-width: 991.98px) {
  .services-scroll-wrapper {
    height: auto;
  }

  .services-section {
    position: relative;
    height: auto;
    padding: 70px 0;
  }
}

.services-container {
  max-width: 1280px;
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: 24px;
  padding-left: 24px;
}

.services-header {
  margin-bottom: 60px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  flex-wrap: wrap;
}

.services-header-left {
  max-width: 600px;
}

.services-badge {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: #A31D24;
  letter-spacing: 2px;
  margin-bottom: 16px;
  display: inline-block;
}

.services-title {
  font-family: 'Outfit', sans-serif;
  font-size: 40px;
  font-weight: 800;
  color: #111827;
  line-height: 1.2;
  margin: 0;
}

.services-subtitle {
  font-size: 16px;
  line-height: 1.6;
  color: #64748B;
  max-width: 500px;
  margin: 0;
}

/* Services Cards Grid - Horizontal Scroll Layout */
.services-grid {
  overflow: hidden; /* Hide scrollbars and clip overflow on desktop */
  padding-top: 20px;
  padding-bottom: 40px; /* Room for hover shadow */
  margin: 0 -10px; /* Offset the padding on sides */
  padding-left: 10px;
  padding-right: 10px;
}

.services-grid-inner {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 30px;
  align-items: stretch;
  width: max-content;
  will-change: transform;
  transition: none;
}

/* Chrome, Safari and Opera scrollbar styling */
.services-grid::-webkit-scrollbar {
  display: none;
}

@media (max-width: 991.98px) {
  .services-grid {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #A31D24 rgba(15, 23, 42, 0.05);
    margin: 0;
    padding-left: 0;
    padding-right: 0;
  }
  .services-grid::-webkit-scrollbar {
    display: block;
    height: 8px;
  }
  .services-grid::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.03);
    border-radius: 4px;
  }
  .services-grid::-webkit-scrollbar-thumb {
    background-color: #A31D24;
    border-radius: 4px;
    border: 2px solid transparent;
  }
  .services-grid-inner {
    transform: none !important;
  }
}

.services-card {
  flex: 0 0 350px;
  max-width: 85vw;
  background-color: #FFFFFF;
  border: none;
  border-radius: 24px; /* Highly rounded corners */
  overflow: hidden;
  position: relative;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
}

.services-card:hover {
  transform: translateY(-15px);
  box-shadow: 0 30px 60px rgba(163, 29, 36, 0.1);
}

.services-img-wrapper {
  position: relative;
  height: 200px;
  width: 100%;
  overflow: hidden;
  background-color: #0F172A;
  border-bottom-right-radius: 80px; /* Asymmetric, non-boxy shape */
  border-bottom-left-radius: 0;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.services-card:hover .services-img-wrapper {
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 80px;
  height: 220px;
}

/* Premium gradient overlay over card images */
.services-img-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.6) 100%);
  z-index: 1;
  transition: all 0.5s ease;
  opacity: 0.8;
}

.services-card:hover .services-img-overlay {
  opacity: 1;
  background: linear-gradient(180deg, rgba(163, 29, 36, 0.2) 0%, rgba(163, 29, 36, 0.8) 100%);
}

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

.services-card:hover .services-card-img {
  transform: scale(1.1);
}

/* Circular floating icon */
.services-icon-box {
  position: absolute;
  bottom: -28px;
  right: 30px; /* Moved to right side */
  width: 64px;
  height: 64px;
  background-color: #FFFFFF;
  border-radius: 50%; /* Circle, not square box */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.services-card:hover .services-icon-box {
  background-color: #A31D24;
  transform: rotate(360deg) scale(1.1);
  box-shadow: 0 15px 35px rgba(163, 29, 36, 0.4);
}

.services-card-icon {
  color: #A31D24;
  font-size: 24px;
  transition: color 0.5s ease;
}

.services-card:hover .services-card-icon {
  color: #FFFFFF;
}

.services-content-body {
  padding: 40px 30px 30px 30px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  background-color: #FFFFFF;
}

.services-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 16px;
  transition: color 0.3s ease;
  line-height: 1.3;
}

.services-card:hover .services-card-title {
  color: #A31D24;
}

.services-card-desc {
  font-size: 15px;
  line-height: 1.6;
  color: #64748B;
  margin-bottom: 24px;
  flex-grow: 1;
}

.services-link {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #A31D24;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: rgba(163, 29, 36, 0.05);
  border-radius: 50px; /* Pill shape */
  width: fit-content;
  transition: all 0.4s ease;
}

.services-link:hover {
  background: #A31D24;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(163, 29, 36, 0.3);
}

.services-link-arrow {
  transition: transform 0.3s ease;
  font-size: 14px;
}

.services-link:hover .services-link-arrow {
  transform: translateX(4px);
}

/* Modal details popup */
.services-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1200;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.services-modal-active {
  display: flex;
  opacity: 1;
}

.services-modal-content {
  background-color: #FFFFFF;
  border-radius: 4px;
  width: 90%;
  max-width: 600px;
  padding: 40px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border-left: 4px solid #A31D24;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.services-modal-active .services-modal-content {
  transform: translateY(0);
}

.services-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  color: #64748B;
  cursor: pointer;
  transition: color 0.3s ease;
}

.services-modal-close:hover {
  color: #A31D24;
}

.services-modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 16px;
}

.services-modal-body {
  font-size: 15px;
  line-height: 1.6;
  color: #475569;
}

.services-modal-list {
  margin-top: 20px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.services-modal-list-item {
  font-size: 14px;
  color: #475569;
}

/* Responsiveness */
@media (max-width: 991.98px) {
  .services-section {
    padding: 70px 0;
  }
  .services-title {
    font-size: 32px;
  }
  /* Services grid is flex scrollable, no columns rule needed on mobile */
}
