/* ===================================
   John's Chimney Service - Services Page Styles
   Organized with media queries directly after each component
   =================================== */

/**
 * =====================================================
 * SERVICES HERO SECTION
 * =====================================================
 */
.services-hero-section {
  position: relative;
  min-height: 500px;
  background: url('https://storage.googleapis.com/kws-clientele/John%27s%20Chimney%20Service/b.%20services.html/services-hero-optimized.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 70px;
  overflow: hidden;
}

.services-hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.services-hero-background {
  display: none;
}

.services-hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  color: var(--white);
  padding: 3rem 2rem;
  max-width: 900px;
}

.services-hero-title {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--white);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 0.8s ease;
}

.services-hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.8s ease 0.2s both;
  color: white;
}

/* Services Hero - All Mobile Devices */
@media screen and (max-width: 768px) {
  .services-hero-section {
    min-height: 400px;
    background-attachment: initial !important;
    background-size: auto 100% !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
  }

  .services-hero-section::before {
    background: rgba(0, 0, 0, 0.6);
  }

  .services-hero-title {
    font-size: 2rem;
  }

  .services-hero-subtitle {
    font-size: 1rem;
  }
}

/* Services Hero - Small Mobile */
@media (max-width: 480px) {
  .services-hero-title {
    font-size: 1.5rem;
  }

  .services-hero-content {
    padding: 2rem 1.5rem;
  }
}

/* Fix Services Hero - iPhone Landscape Orientation */
@media screen and (max-height: 480px) {
  .services-hero-section {
    background-attachment: initial !important;
    background-size: cover !important;
    background-position: center center !important;
  }
}

/**
 * =====================================================
 * SERVICES QUICK NAVIGATION
 * =====================================================
 */
.services-quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.services-nav-pill {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
}

.services-nav-pill:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  color: var(--white);
}

/* Quick Nav - Tablet */
@media (max-width: 768px) {
  .services-quick-nav {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .services-nav-pill {
    width: 100%;
    text-align: center;
  }
}

/**
 * =====================================================
 * SCROLL INDICATOR
 * =====================================================
 */
.services-hero-scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
  cursor: pointer;
  z-index: 10;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}

.services-hero-scroll-indicator:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateX(-50%) scale(1.1);
}

.services-hero-scroll-indicator svg {
  width: 30px;
  height: 30px;
  color: var(--white);
}

/**
 * =====================================================
 * SERVICE DETAIL SECTIONS
 * =====================================================
 */
.service-detail-section {
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.service-detail-section:nth-child(even) {
  background: var(--light-gray);
}

/* Service Detail Sections - Mobile */
@media (max-width: 480px) {
  .service-detail-section {
    padding: 3rem 0;
  }
}

/**
 * =====================================================
 * SERVICE DETAIL CONTAINER
 * =====================================================
 */
.service-detail-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.service-detail-left .service-detail-container {
  direction: ltr;
}

.service-detail-right .service-detail-container {
  direction: rtl;
}

.service-detail-right .service-detail-content {
  direction: ltr;
}

/* Service Detail Container - Laptop */
@media (max-width: 1024px) {
  .service-detail-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .service-detail-right .service-detail-container {
    direction: ltr;
  }
}

/**
 * =====================================================
 * SERVICE DETAIL CONTENT
 * =====================================================
 */
.service-detail-content {
  animation: fadeInLeft 0.8s ease;
}

.service-detail-right .service-detail-content {
  animation: fadeInRight 0.8s ease;
}

.service-detail-badge {
  display: inline-block;
  background: var(--bright-red);
  color: var(--white);
  padding: 0.25rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  animation: pulse 2s ease infinite;
}

.service-detail-title {
  font-size: 2.5rem;
  color: var(--dark-gray);
  margin-bottom: 0.5rem;
}

.service-detail-price {
  font-size: 1.5rem;
  color: var(--primary-red);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.service-detail-description {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-light);
  margin-bottom: 2rem;
}

/* Service Detail Content - Tablet */
@media (max-width: 768px) {
  .service-detail-title {
    font-size: 1.75rem;
  }

  .service-detail-price {
    font-size: 1.25rem;
  }
}

/**
 * =====================================================
 * PROCESS TIMELINE
 * =====================================================
 */
.service-process-timeline {
  margin: 2rem 0;
  padding: 2rem;
  background: rgba(154, 5, 24, 0.05);
  border-radius: 10px;
}

.service-process-title {
  font-size: 1.5rem;
  color: var(--dark-gray);
  margin-bottom: 2rem;
}

.service-timeline-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2rem;
  position: relative;
  padding-left: 3rem;
  opacity: 0;
  animation: slideInLeft 0.6s ease forwards;
  animation-delay: calc(var(--item-index, 1) * 0.1s);
}

.service-timeline-item[data-step='1'] {
  --item-index: 1;
}
.service-timeline-item[data-step='2'] {
  --item-index: 2;
}
.service-timeline-item[data-step='3'] {
  --item-index: 3;
}
.service-timeline-item[data-step='4'] {
  --item-index: 4;
}

.service-timeline-item::before {
  content: '';
  position: absolute;
  left: 1.5rem;
  top: 2rem;
  bottom: -2rem;
  width: 2px;
  background: var(--primary-red);
  opacity: 0.3;
}

.service-timeline-item:last-child::before {
  display: none;
}

.service-timeline-marker {
  position: absolute;
  left: 1rem;
  top: 0;
  width: 1rem;
  height: 1rem;
  background: var(--primary-red);
  border-radius: 50%;
  border: 3px solid var(--white);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.service-timeline-content h4 {
  color: var(--dark-gray);
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

.service-timeline-content p {
  color: var(--text-light);
  margin: 0;
}

/* Process Timeline - Mobile */
@media (max-width: 480px) {
  .service-process-timeline {
    padding: 1rem;
  }

  .service-timeline-item {
    padding-left: 2rem;
  }
}

/**
 * =====================================================
 * SERVICE BENEFITS GRID
 * =====================================================
 */
.service-benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.service-benefit-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--white);
  border-radius: 8px;
  border: 1px solid rgba(154, 5, 24, 0.1);
  transition: all 0.3s ease;
}

.service-benefit-item:hover {
  transform: translateX(5px);
  border-color: var(--primary-red);
  box-shadow: 0 2px 8px rgba(154, 5, 24, 0.1);
}

.service-benefit-icon {
  width: 24px;
  height: 24px;
  color: var(--bright-red);
  flex-shrink: 0;
}

/* Benefits Grid - Tablet */
@media (max-width: 768px) {
  .service-benefit-item {
    font-size: 0.85rem;
    padding: 0.6rem;
    gap: 0.5rem;
  }

  .service-benefit-icon {
    width: 20px;
    height: 20px;
  }
}

/**
 * =====================================================
 * BEFORE/AFTER SLIDER
 * =====================================================
 */
.service-before-after-slider {
  position: relative;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.service-ba-container {
  position: relative;
  width: 100%;
  padding-bottom: 75%;
  background: var(--dark-gray);
  cursor: col-resize;
}

.service-ba-before,
.service-ba-after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-ba-after {
  clip-path: inset(0 50% 0 0);
}

.service-ba-slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: var(--white);
  transform: translateX(-50%);
  cursor: col-resize;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.service-ba-slider-handle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: var(--white);
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.service-ba-arrow-left,
.service-ba-arrow-right {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dark-gray);
  font-weight: bold;
  pointer-events: none;
}

.service-ba-arrow-left {
  left: -12px;
}

.service-ba-arrow-right {
  right: -12px;
}

.service-ba-labels {
  display: flex;
  justify-content: space-between;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.05);
}

.service-ba-label-before,
.service-ba-label-after {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 1px;
}

.service-ba-label-before {
  color: var(--dark-gray);
}

.service-ba-label-after {
  color: var(--primary-red);
}

/**
 * =====================================================
 * INSPECTION LEVEL CARDS
 * =====================================================
 */
.service-inspection-levels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.inspection-level-card {
  background: var(--white);
  border: 2px solid rgba(154, 5, 24, 0.1);
  border-radius: 10px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.inspection-level-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--primary-red), var(--bright-red));
  transition: width 0.3s ease;
  opacity: 0.05;
}

.inspection-level-card:hover::before,
.inspection-level-card.active::before {
  width: 100%;
}

.inspection-level-card.active {
  border-color: var(--primary-red);
  box-shadow: 0 5px 20px rgba(154, 5, 24, 0.2);
}

.inspection-level-number {
  display: inline-block;
  background: var(--primary-red);
  color: var(--white);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.inspection-level-card.active .inspection-level-number {
  background: var(--bright-red);
  animation: pulse 2s ease infinite;
}

.inspection-level-title {
  color: var(--dark-gray);
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.inspection-level-desc {
  color: var(--text-light);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.inspection-level-list {
  list-style: none;
  padding: 0;
}

.inspection-level-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-light);
  font-size: 0.9rem;
}

.inspection-level-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--bright-red);
  font-weight: bold;
}

/**
 * =====================================================
 * INSPECTION FEATURES
 * =====================================================
 */
.service-inspection-features {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

.inspection-feature-item {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem;
  background: var(--white);
  border-radius: 10px;
  border: 1px solid rgba(154, 5, 24, 0.1);
  transition: all 0.3s ease;
}

.inspection-feature-item:hover {
  transform: translateX(10px);
  box-shadow: 0 5px 15px rgba(154, 5, 24, 0.1);
}

.inspection-feature-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-red), var(--bright-red));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.inspection-feature-icon svg {
  width: 30px;
  height: 30px;
  color: var(--white);
}

.inspection-feature-content h4 {
  color: var(--dark-gray);
  margin-bottom: 0.25rem;
}

.inspection-feature-content p {
  color: var(--text-light);
  margin: 0;
  font-size: 0.95rem;
}

/* Inspection Features - Mobile */
@media (max-width: 480px) {
  .inspection-feature-item {
    flex-direction: column;
    text-align: center;
  }
}

/**
 * =====================================================
 * SERVICE ALERT BOX
 * =====================================================
 */
.service-alert-box {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(224, 25, 33, 0.05);
  border-left: 4px solid var(--bright-red);
  border-radius: 5px;
  margin: 2rem 0;
}

.service-alert-icon {
  width: 24px;
  height: 24px;
  color: var(--bright-red);
  flex-shrink: 0;
}

.service-alert-box p {
  margin: 0;
  color: var(--text-dark);
}

/**
 * =====================================================
 * SERVICE REPAIR GRID - UNIFORM CARDS
 * =====================================================
 */
.service-repair-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
  /* Ensure all cards are exactly the same size */
  grid-auto-rows: 1fr;
}

.repair-type-card {
  /* Layout */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem;

  /* Ensure equal height within grid */
  min-height: 250px;
  height: 100%;

  /* Styling */
  background: var(--white);
  border-radius: 10px;
  border: 1px solid rgba(154, 5, 24, 0.1);
  transition: all 0.3s ease;
  cursor: default;

  /* Prevent content from breaking layout */
  overflow: hidden;
  word-wrap: break-word;
}

.repair-type-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(154, 5, 24, 0.15);
  border-color: var(--primary-red);
}

.repair-type-icon {
  /* Fixed size for consistency */
  width: 80px;
  height: 80px;
  min-width: 80px;
  min-height: 80px;
  margin: 0 auto 1rem;

  /* Styling */
  background: linear-gradient(135deg, var(--primary-red), var(--bright-red));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.repair-type-icon i {
  font-size: 40px;
  color: var(--white);
}

.repair-type-card h4 {
  color: var(--dark-gray);
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;

  /* Ensure consistent height for titles */
  min-height: 1.5em;
  line-height: 1.3;

  /* Handle long titles */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.repair-type-card p {
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;

  /* Flex grow to fill available space */
  flex-grow: 1;

  /* Handle long descriptions */
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Optional: Add max-width to container for very wide screens */
@media (min-width: 1400px) {
  .service-repair-grid {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Repair Grid - Laptop */
@media (max-width: 1024px) {
  .service-repair-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .repair-type-card {
    min-height: 230px;
  }
}

/* Repair Grid - Tablet */
@media (max-width: 768px) {
  .service-repair-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .repair-type-card {
    min-height: auto;
  }
}

/* Repair Grid - Mobile */
@media (max-width: 480px) {
  .service-repair-grid {
    gap: 1rem;
  }

  .repair-type-card {
    padding: 1.25rem;
  }

  .repair-type-icon {
    width: 70px;
    height: 70px;
    min-width: 70px;
    min-height: 70px;
  }

  .repair-type-icon i {
    font-size: 35px;
  }
}

/**
 * =====================================================
 * WARRANTY BANNER
 * =====================================================
 */
.service-warranty-banner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--primary-red), var(--bright-red));
  color: var(--white);
  border-radius: 10px;
  margin: 2rem 0;
  box-shadow: 0 5px 20px rgba(154, 5, 24, 0.3);
}

.warranty-icon {
  font-size: 3rem;
}

.warranty-content h4 {
  color: var(--white);
  margin-bottom: 0.25rem;
  font-size: 1.25rem;
}

.warranty-content p {
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

/**
 * =====================================================
 * REPAIR SHOWCASE
 * =====================================================
 */
.service-repair-showcase {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.repair-showcase-main {
  width: 100%;
  height: 700px;
  object-fit: cover;
  display: block;
}

.repair-showcase-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin-top: 2px;
  background: var(--dark-gray);
}

.repair-showcase-thumb {
  width: 100%;
  height: 100px;
  object-fit: cover;
  transition: all 0.3s ease;
  cursor: pointer;
}

.repair-showcase-thumb:hover {
  opacity: 0.7;
  transform: scale(1.05);
}

/* Repair Showcase - Tablet */
@media (max-width: 768px) {
  .repair-showcase-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/**
 * =====================================================
 * INSTALLATION CAROUSEL
 * =====================================================
 */
.service-installation-carousel {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.installation-carousel-track {
  position: relative;
  height: 400px;
}

.installation-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.installation-slide.active {
  opacity: 1;
}

.installation-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.installation-slide-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 2rem;
  color: var(--white);
}

.installation-slide-info h4 {
  color: var(--white);
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.installation-slide-info p {
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

.installation-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 1rem;
  pointer-events: none;
}

.carousel-nav-prev,
.carousel-nav-next {
  background: rgba(0, 0, 0, 0.5);
  color: var(--white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: all;
}

.carousel-nav-prev:hover,
.carousel-nav-next:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: scale(1.1);
}

.installation-carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dot.active {
  background: var(--white);
  width: 30px;
  border-radius: 5px;
}

.accordion-content {
  transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
}

/**
 * =====================================================
 * PRODUCT ACCORDION - FIXED FOR CONTENT SIZE
 * =====================================================
 */
.service-product-accordion {
  margin: 2rem 0;
}

.accordion-item {
  background: var(--white);
  border: 1px solid rgba(154, 5, 24, 0.1);
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none; /* Prevent text selection on click */
}

.accordion-header:hover {
  background: rgba(154, 5, 24, 0.05);
}

.accordion-item.active .accordion-header {
  background: rgba(154, 5, 24, 0.05);
  border-bottom: 1px solid rgba(154, 5, 24, 0.1);
}

.accordion-header h4 {
  margin: 0;
  color: var(--dark-gray);
  font-size: 1.125rem;
}

.accordion-toggle {
  font-size: 1.5rem;
  color: var(--primary-red);
  transition: transform 0.3s ease;
  line-height: 1;
  font-weight: 300;
}

.accordion-item.active .accordion-toggle {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

.accordion-item.active .accordion-content {
  /* Remove fixed height - let content determine height */
  max-height: none;
  padding: 1.25rem;
  opacity: 1;

  /* Alternative: Use a larger fixed height if animation is important */
  /* max-height: 1000px; */
}

/* Better approach for smooth animation while handling dynamic content */
@keyframes slideDown {
  from {
    max-height: 0;
    opacity: 0;
  }
  to {
    max-height: 1000px; /* Large enough for any content */
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    max-height: 1000px;
    opacity: 1;
  }
  to {
    max-height: 0;
    opacity: 0;
  }
}

.accordion-item.active .accordion-content {
  animation: slideDown 0.4s ease forwards;
  padding: 1.25rem;
}

.accordion-item:not(.active) .accordion-content {
  animation: slideUp 0.3s ease forwards;
  padding: 0 1.25rem;
}

.accordion-content p {
  margin: 0 0 0.75rem 0;
  color: var(--text-dark);
  line-height: 1.6;
}

.accordion-content ul {
  margin: 0.5rem 0 0 1.5rem;
  padding: 0;
  color: var(--text-light);
  line-height: 1.8;
}

.accordion-content ul li {
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

.accordion-content ul li:last-child {
  margin-bottom: 0;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .accordion-header {
    padding: 1rem;
  }

  .accordion-header h4 {
    font-size: 1rem;
  }

  .accordion-toggle {
    font-size: 1.25rem;
  }

  .accordion-item.active .accordion-content {
    padding: 1rem;
  }

  .accordion-content ul {
    margin-left: 1.25rem;
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .accordion-content ul {
    margin-left: 1rem;
    font-size: 0.9rem;
  }
}

/**
 * =====================================================
 * ADDITIONAL SERVICES SECTION
 * =====================================================
 */
.service-additional-section {
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  padding: 5rem 0;
  position: relative;
}

.service-additional-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(154, 5, 24, 0.3) 50%,
    transparent 100%
  );
}

.service-additional-title {
  text-align: center;
  font-size: 2.5rem;
  color: var(--dark-gray);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.service-additional-subtitle {
  text-align: center;
  font-size: 1.125rem;
  color: var(--text-light);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/**
 * =====================================================
 * SERVICES GRID
 * =====================================================
 */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto 3rem;
}

/**
 * =====================================================
 * SERVICE CARDS
 * =====================================================
 */
.service-card {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-red), var(--bright-red));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(154, 5, 24, 0.15);
  border-color: rgba(154, 5, 24, 0.1);
}

/* Featured Card */
.service-card.featured {
  grid-column: span 2;
  background: linear-gradient(
    135deg,
    var(--primary-red) 0%,
    var(--bright-red) 100%
  );
  color: var(--white);
}

.service-card.featured::before {
  background: var(--white);
}

.service-card.featured h3,
.service-card.featured p {
  color: var(--white);
}

.service-card.featured .service-card-icon {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

.service-card.featured .service-card-link {
  color: var(--white);
  border-color: var(--white);
}

.service-card.featured .service-card-link:hover {
  background: var(--white);
  color: var(--primary-red);
}

/**
 * =====================================================
 * CARD COMPONENTS
 * =====================================================
 */
.service-card-icon {
  width: 60px;
  height: 60px;
  background: rgba(154, 5, 24, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--primary-red);
  transition: all 0.3s ease;
}

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

.service-card-icon svg {
  width: 32px;
  height: 32px;
}

.service-card-content h3 {
  font-size: 1.5rem;
  color: var(--dark-gray);
  margin-bottom: 1rem;
  font-weight: 600;
}

.service-card-content p {
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.service-card-link {
  display: inline-flex;
  align-items: center;
  color: var(--primary-red);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--primary-red);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.service-card-link:hover {
  background: var(--primary-red);
  color: var(--white);
  transform: translateX(5px);
}

/**
 * =====================================================
 * SERVICES CTA
 * =====================================================
 */
.services-cta {
  text-align: center;
  padding: 2.5rem;
  background: var(--white);
  border-radius: 12px;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.services-cta p {
  font-size: 1.25rem;
  color: var(--dark-gray);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.services-cta .btn {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

/**
 * =====================================================
 * RESPONSIVE DESIGN
 * =====================================================
 */

/* Laptop */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-card.featured {
    grid-column: span 2;
  }
}

/* Tablet */
@media (max-width: 768px) {
  .service-additional-section {
    padding: 3rem 0;
  }

  .service-additional-title {
    font-size: 2rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .service-card.featured {
    grid-column: span 1;
  }

  .service-card {
    padding: 1.5rem;
  }

  .services-cta {
    padding: 2rem;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .service-additional-title {
    font-size: 1.75rem;
  }

  .service-additional-subtitle {
    font-size: 1rem;
  }

  .service-card-content h3 {
    font-size: 1.25rem;
  }

  .service-card-icon {
    width: 50px;
    height: 50px;
  }

  .service-card-icon svg {
    width: 28px;
    height: 28px;
  }

  .services-cta p {
    font-size: 1.1rem;
  }
}

/**
 * =====================================================
 * SERVICE AREA CTA SECTION
 * =====================================================
 */
.service-area-cta-section {
  background: var(--dark-gray);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

/* Animated gradient background */
.service-area-cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
      circle at 20% 80%,
      var(--primary-red),
      transparent 50%
    ),
    radial-gradient(circle at 80% 20%, var(--bright-red), transparent 50%),
    radial-gradient(circle at 40% 40%, var(--primary-red), transparent 50%);
  animation: gradientShift 15s ease infinite;
  opacity: 0.3;
}

@keyframes gradientShift {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }
  33% {
    transform: rotate(120deg) scale(1.1);
  }
  66% {
    transform: rotate(240deg) scale(0.9);
  }
}

.service-area-cta-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.service-area-cta-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--white);
  line-height: 1.2;
  position: relative;
}

/* Decorative underline */
.service-area-cta-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--bright-red);
  border-radius: 2px;
}

.service-area-cta-text {
  font-size: 1.375rem;
  margin-bottom: 3.5rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.service-area-cta-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.area-feature {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2rem 1rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
}

.area-feature::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, var(--bright-red), transparent);
  opacity: 0;
  border-radius: 20px;
  transition: opacity 0.4s ease;
  z-index: 0;
}

.area-feature:hover {
  transform: translateY(-10px) scale(1.05);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--bright-red);
  box-shadow: 0 20px 40px rgba(224, 25, 33, 0.3),
    0 0 60px rgba(224, 25, 33, 0.1);
}

.area-feature:hover::before {
  opacity: 0.1;
}

.area-feature-icon {
  position: relative;
  z-index: 1;
  width: 70px;
  height: 70px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--primary-red), var(--bright-red));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(154, 5, 24, 0.3);
  transition: all 0.4s ease;
}

.area-feature:hover .area-feature-icon {
  transform: rotate(10deg) scale(1.1);
  box-shadow: 0 15px 35px rgba(224, 25, 33, 0.4);
}

.area-feature-icon svg {
  width: 35px;
  height: 35px;
  color: var(--white);
}

.area-feature span {
  position: relative;
  z-index: 1;
  display: block;
  color: var(--white);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: 0.5px;
}

/* Stagger animation on scroll */
.area-feature {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.area-feature:nth-child(1) {
  animation-delay: 0.1s;
}
.area-feature:nth-child(2) {
  animation-delay: 0.2s;
}
.area-feature:nth-child(3) {
  animation-delay: 0.3s;
}
.area-feature:nth-child(4) {
  animation-delay: 0.4s;
}

/* Service Area CTA - Tablet */
@media (max-width: 768px) {
  .service-area-cta-features {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .service-area-cta-title {
    font-size: 2.25rem;
  }

  .service-area-cta-text {
    font-size: 1.125rem;
  }

  .area-feature {
    padding: 1.5rem 1rem;
  }

  .area-feature-icon {
    width: 60px;
    height: 60px;
  }

  .area-feature-icon svg {
    width: 30px;
    height: 30px;
  }
}

/* Service Area CTA - Mobile */
@media (max-width: 480px) {
  .service-area-cta-section {
    padding: 3rem 0;
  }

  .service-area-cta-title {
    font-size: 1.75rem;
  }

  .service-area-cta-text {
    font-size: 1rem;
    margin-bottom: 2.5rem;
  }

  .service-area-cta-features {
    grid-template-columns: 1fr;
    max-width: 320px;
  }

  .area-feature {
    padding: 1.5rem;
  }
}

/**
 * =====================================================
 * FAQ SECTION
 * =====================================================
 */
.service-faq-section {
  padding: 5rem 0;
  background: var(--white);
}

.service-faq-title {
  text-align: center;
  font-size: 2.5rem;
  color: var(--dark-gray);
  margin-bottom: 3rem;
}

.service-faq-grid {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.faq-item {
  border: 1px solid rgba(154, 5, 24, 0.1);
  border-radius: 8px;
  margin-bottom: 1rem;
  background: var(--white);
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  box-shadow: 0 5px 15px rgba(154, 5, 24, 0.1);
}

.faq-question {
  width: 100%;
  padding: 1.25rem;
  background: none;
  border: none;
  text-align: left;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--dark-gray);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.faq-question:hover {
  background: rgba(154, 5, 24, 0.02);
}

.faq-toggle {
  font-size: 1.5rem;
  color: var(--primary-red);
  transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
  /* JavaScript will set the actual max-height dynamically */
  padding: 0 1.25rem 1.25rem;
  opacity: 1;
}

.faq-answer p {
  color: var(--text-light);
  line-height: 1.6;
  margin: 0;
}

/* FAQ - Mobile */
@media (max-width: 480px) {
  .service-faq-title {
    font-size: 1.75rem;
  }

  .faq-question {
    font-size: 1rem;
    padding: 1rem;
  }
}

/**
 * =====================================================
 * FINAL CTA SECTION
 * =====================================================
 */
.services-final-cta {
  background: linear-gradient(135deg, var(--dark-gray), var(--primary-red));
  padding: 5rem 0;
  position: relative;
}

.services-cta-card {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem;
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
  position: relative;
}

.services-cta-badge {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bright-red);
  color: var(--white);
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.services-cta-title {
  font-size: 2.5rem;
  color: var(--dark-gray);
  margin-bottom: 1rem;
  margin-top: 1rem;
}

.services-cta-text {
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.services-cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.services-cta-disclaimer {
  font-size: 0.875rem;
  color: var(--text-light);
  font-style: italic;
  margin: 0;
}

/* Final CTA - Tablet */
@media (max-width: 768px) {
  .services-cta-card {
    padding: 2rem 1.5rem;
  }

  .services-cta-title {
    font-size: 1.75rem;
  }

  .services-cta-text {
    font-size: 1rem;
  }

  .services-cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .services-cta-buttons .btn {
    width: 100%;
    max-width: 300px;
  }
}

/**
 * =====================================================
 * SERVICE CTA GROUP
 * =====================================================
 */
.service-cta-group {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .service-cta-group {
    justify-content: center;
  }
}

/**
 * =====================================================
 * ANIMATIONS
 * =====================================================
 */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(-100px, -100px);
  }
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(224, 25, 33, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(224, 25, 33, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(224, 25, 33, 0);
  }
}

/**
 * =====================================================
 * END OF STYLESHEET
 * =====================================================
 */
/* Force white backgrounds on Cleaning + Repair sections (body is black) */
#cleaning-service,
#repair-service {
  background-color: #fff !important; /* hard override */
  color: var(--dark-gray);
}

/* Optional: subtle separation from the black page background */
#cleaning-service::before,
#repair-service::before {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 -1px 0 rgba(0, 0, 0, 0.06);
  pointer-events: none;
}

/* Ensure headings/paragraphs read well on white */
#cleaning-service .service-detail-title,
#repair-service .service-detail-title {
  color: var(--dark-gray);
}

#cleaning-service .service-detail-description,
#repair-service .service-detail-description,
#cleaning-service .service-timeline-content p,
#repair-service .service-timeline-content p {
  color: var(--text-light);
}
