/* Homepage Specific Styles */

/* Hero section styles moved to css/hero.css */

/* Why Choose Elite HomeCare Section */
.why-choose-section {
  padding: 70px 0;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 50%, #f1f5f9 100%);
  position: relative;
}

.why-choose-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="10" cy="10" r="0.5" fill="rgba(30,58,138,0.05)"/><circle cx="90" cy="30" r="0.3" fill="rgba(59,130,246,0.05)"/><circle cx="30" cy="80" r="0.4" fill="rgba(251,191,36,0.05)"/><circle cx="70" cy="60" r="0.2" fill="rgba(30,58,138,0.03)"/></svg>');
  opacity: 0.6;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-top: 50px;
  position: relative;
  z-index: 1;
  max-width: 100%;
}

.service-item {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  border: 1px solid rgba(30, 58, 138, 0.1);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.service-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-blue);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: left;
}

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

.service-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(30, 58, 138, 0.12);
  border-color: var(--primary-blue);
}

.service-image {
  height: 140px;
  min-height: 140px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  /* Prevent layout shift */
  aspect-ratio: 16 / 9;
  background-color: #f3f4f6;
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.service-item:nth-child(4) .service-image img {
  object-position: center 30%;
}

.service-item:hover .service-image img {
  transform: scale(1.05);
}

.service-content {
  padding: 18px 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.service-content h5 {
  color: var(--primary-blue);
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 1.05rem;
  line-height: 1.3;
  font-family: 'Inter', sans-serif;
  transition: color 0.3s ease;
}

.service-item:hover .service-content h5 {
  color: var(--secondary-blue);
}

.service-description {
  color: var(--medium-gray);
  line-height: 1.5;
  margin-bottom: 0;
  flex-grow: 1;
  font-size: 0.875rem;
  transition: color 0.3s ease;
}

.service-item:hover .service-description {
  color: var(--dark-gray);
}

/* Testimonials Section */
.testimonials-section {
  padding: 70px 0;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #f8fafc 100%);
  position: relative;
  overflow: hidden;
}

.testimonials-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(30, 58, 138, 0.03) 0%, transparent 70%);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 50px;
  position: relative;
  z-index: 1;
  max-width: 100%;
}

.testimonial-item {
  background: var(--white);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  border: 1px solid rgba(30, 58, 138, 0.1);
  position: relative;
  display: flex;
  flex-direction: column;
}

.testimonial-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-blue);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.testimonial-item:hover::before {
  transform: scaleX(1);
}

.testimonial-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(30, 58, 138, 0.12);
}

.testimonial-text {
  color: var(--dark-gray);
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 16px;
  font-size: 0.9rem;
  flex-grow: 1;
  position: relative;
  padding-left: 30px;
}

.testimonial-text::before {
  content: '"';
  position: absolute;
  left: 0;
  top: -5px;
  font-size: 3rem;
  color: var(--primary-blue);
  opacity: 0.6;
  font-family: Georgia, serif;
  line-height: 1;
}

.testimonial-author {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(30, 58, 138, 0.1);
  text-align: center;
}

.testimonial-author strong {
  display: block;
  color: var(--primary-blue);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
}

.testimonial-author .location {
  display: block;
  color: var(--medium-gray);
  font-size: 0.85rem;
  font-weight: 500;
}

/* Testimonials Carousel (Mobile Only) - Bootstrap 5 Carousel */
.testimonials-section #testimonialsCarousel {
  margin-top: 30px;
  position: relative;
  z-index: 1;
  padding: 0 10px;
  padding-bottom: 70px;
}

.testimonials-section #testimonialsCarousel .carousel-inner {
  padding-bottom: 0;
}

.testimonials-section #testimonialsCarousel .carousel-item {
  padding: 0 5px;
}

.testimonials-section #testimonialsCarousel .carousel-control-prev,
.testimonials-section #testimonialsCarousel .carousel-control-next {
  display: none;
}

/* Testimonial Carousel Pagination - Scoped to testimonials section only */
.testimonials-section #testimonialsCarousel .carousel-indicators {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  margin-top: 25px;
  padding: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Testimonial carousel pagination bullets - scoped to testimonials section only */
/* Override Bootstrap 5 default carousel indicator styles with !important */
.testimonials-section #testimonialsCarousel .carousel-indicators button {
  width: 10px !important;
  height: 10px !important;
  min-width: 10px !important;
  min-height: 10px !important;
  max-width: 10px !important;
  max-height: 10px !important;
  border-radius: 50% !important;
  background-color: rgba(30, 58, 138, 0.3) !important;
  border: none !important;
  margin: 0 3px !important;
  padding: 0 !important;
  transition: all 0.3s ease !important;
  opacity: 0.5 !important;
  flex-shrink: 0 !important;
  display: none !important;
  box-sizing: border-box !important;
}

/* Show only indicators with visible-indicator class */
.testimonials-section #testimonialsCarousel .carousel-indicators button.visible-indicator {
  display: block !important;
}

/* Hover state */
.testimonials-section #testimonialsCarousel .carousel-indicators button:hover {
  opacity: 0.7 !important;
}

/* Active bullet state - keep styling intact */
.testimonials-section #testimonialsCarousel .carousel-indicators button.active {
  background-color: var(--primary-blue) !important;
  opacity: 1 !important;
  width: 10px !important;
  height: 10px !important;
  min-width: 10px !important;
  min-height: 10px !important;
  max-width: 10px !important;
  max-height: 10px !important;
}

/* News Section */
.news-section {
  padding: 70px 0;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  position: relative;
}

.news-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><polygon points="20,20 30,10 40,20 30,30" fill="rgba(251,191,36,0.03)"/><polygon points="70,60 80,50 90,60 80,70" fill="rgba(30,58,138,0.03)"/></svg>');
  opacity: 0.5;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 50px;
  position: relative;
  z-index: 1;
  max-width: 100%;
}

.news-item {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  border: 1px solid rgba(30, 58, 138, 0.1);
  position: relative;
  overflow: hidden;
}

.news-image {
  width: 100%;
  height: 180px;
  min-height: 180px;
  overflow: hidden;
  position: relative;
  /* Prevent layout shift */
  aspect-ratio: 16 / 9;
  background-color: #f3f4f6;
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-item:hover .news-image img {
  transform: scale(1.05);
}

.news-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--primary-blue);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.news-item:hover::before {
  transform: scaleY(1);
}

.news-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(30, 58, 138, 0.12);
}

.news-date {
  position: absolute;
  top: 15px;
  left: 15px;
  text-align: center;
  background: var(--primary-blue);
  color: var(--white);
  padding: 12px;
  border-radius: 8px;
  width: 60px;
  box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
  z-index: 2;
}

.news-item:hover .news-date {
  transform: scale(1.05);
}

.date-number {
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1;
}

.date-month {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.news-content {
  padding: 20px 24px;
}

.news-content h6 {
  color: var(--dark-gray);
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
  font-size: 1rem;
}

.news-content p {
  color: var(--medium-gray);
  line-height: 1.5;
  margin-bottom: 0;
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 992px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

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

  .service-image {
    height: 130px;
  }

  .service-content {
    padding: 18px 16px;
  }
}

/* Tablet & Below */
/* Laptop screens - Reduce content width */
@media (min-width: 1024px) and (max-width: 1920px) {
  .why-choose-section .container,
  .testimonials-section .container,
  .news-section .container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
  }

  .services-grid {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 768px) {
  .why-choose-section,
  .testimonials-section,
  .news-section {
    padding: 50px 15px;
  }

  .services-grid {
    margin-top: 40px;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 10px;
  }

  .service-item {
    margin-bottom: 20px;
  }

  .service-image {
    height: 130px;
  }

  .testimonials-grid {
    margin-top: 30px;
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 0 10px;
  }

  .testimonial-item {
    padding: 20px 15px;
  }

  .testimonial-text {
    font-size: 0.85rem;
    margin-bottom: 15px;
    padding-left: 25px;
  }

  .news-grid {
    margin-top: 40px;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 10px;
  }

  .news-item {
    padding: 0;
  }

  .news-image {
    height: 160px;
  }

  .news-content {
    padding: 18px 20px;
  }
}

/* Mobile */
@media (max-width: 576px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 0 10px;
    margin-top: 30px;
  }

  .service-item {
    margin-bottom: 15px;
  }

  .service-content {
    padding: 15px;
  }

  .service-content h5 {
    font-size: 1.1rem;
    margin-bottom: 10px;
  }

  .service-description {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .service-image {
    height: 120px;
  }

  .testimonial-item {
    padding: 18px 15px;
    margin-bottom: 0;
  }

  .quote-icon.small {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .news-item {
    padding: 0;
  }

  .news-image {
    height: 180px;
  }

  .news-date {
    width: 50px;
    padding: 8px;
    top: 10px;
    left: 10px;
  }

  .date-number {
    font-size: 1.2rem;
  }

  .date-month {
    font-size: 0.6rem;
  }

  .news-content {
    padding: 20px 15px;
  }

  .news-content h6 {
    font-size: 0.95rem;
  }

  .news-content p {
    font-size: 0.85rem;
  }
}

/* Animation Classes */
.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Enhanced Hover Effects - Homepage Specific Only */
.home-page .service-item:hover,
.home-page .testimonial-item:hover,
.home-page .news-item:hover {
  border-color: var(--primary-blue);
}

/* Loading States */
.service-item,
.testimonial-item,
.news-item {
  will-change: transform, box-shadow;
}