/* ================================
   Enhanced Services Page - Reliance Eldercare
   Modern UI/UX with responsive design
================================ */

/* --------- Global Variables --------- */
:root {
  --primary: #059669;
  --primary-dark: #047857;
  --primary-light: #3AAFA9;
  --primary-lightest: #DEF2F1;
  --text-dark: #1f2937;
  --text-medium: #4b5563;
  --text-light: #6b7280;
  --bg-light: #f8fafc;
  --bg-gray: #f3f4f6;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.1), 0 6px 6px rgba(0, 0, 0, 0.1);
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-full: 9999px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --------- Base Styles --------- */
body {
  scroll-behavior: smooth;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: var(--text-medium);
}

/* --------- Hero Section --------- */
.hero-section {
  background-color: var(--primary-lightest);
  padding: 6rem 0;
  overflow: hidden;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 3rem;
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-medium);
  margin-bottom: 2rem;
  max-width: 90%;
}

.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  color: var(--white);
  padding: 0.875rem 2rem;
  border-radius: var(--radius-full);
  font-size: 1.125rem;
  font-weight: 500;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.hero-cta-btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.hero-image-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
}

.hero-image-container {
  width: 100%;
  max-width: 400px;
  height: 400px;
  border-radius: var(--radius-full);
  border: 12px solid var(--white);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-image:hover {
  transform: scale(1.05);
}

/* --------- Services Section --------- */
.services-section {
  padding: 6rem 0;
  background-color: var(--primary-lightest);
}

.services-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background-color: var(--primary);
  margin: 1rem auto 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background-color: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.card-image-container {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 50%);
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.service-card:hover .image-overlay {
  opacity: 0.6;
}

.service-card:hover .card-image {
  transform: scale(1.1);
}

.card-content {
  padding: 1.5rem;
  position: relative;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}

.card-description {
  color: var(--text-medium);
  margin-bottom: 1.5rem;
}

.card-hover-content {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.5s ease;
}

.service-card:hover .card-hover-content {
  opacity: 1;
  max-height: 200px;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  padding: 0.5rem 0;
  position: relative;
  padding-left: 1.5rem;
  color: var(--text-medium);
}

.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

/* --------- Story Section --------- */
.story-section {
  padding: 6rem 0;
  background-color: var(--bg-gray);
}

.story-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}

.story-image-wrapper {
  flex: 1;
}

.story-image {
  width: 100%;
  max-width: 550px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.hover-prompt {
  font-size: 0.95rem;
  color: var(--primary);
  margin-top: 0.75rem;
  font-weight: 600;
  text-align: center;
  background: rgba(43, 122, 120, 0.1); /* light glow base */
  padding: 0.5rem 1rem;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(58, 175, 169, 0.25);
  animation: hoverGlowZoom 2s ease-in-out infinite;
  transition: all 0.3s ease;
}

/* 🔁 Fancy glow + zoom pulse */
@keyframes hoverGlowZoom {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(58, 175, 169, 0.25);
  }
  50% {
    transform: scale(1.07);
    box-shadow: 0 0 20px rgba(58, 175, 169, 0.5);
  }
}

.story-image:hover {
  transform: scale(1.02);
}

.story-content {
  flex: 1;
  max-width: 550px;
}

.story-text {
  font-size: 1.125rem;
  color: var(--text-medium);
  margin-bottom: 2rem;
}

.story-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  color: var(--text-dark);
}

.highlight-icon {
  font-size: 1.5rem;
}

/* --------- CTA Section --------- */
.cta-section {
  padding: 6rem 0;
  background-color: var(--primary);
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.3;
}

.cta-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
}

.cta-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.cta-description {
  font-size: 1.125rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--white);
  color: var(--primary);
  padding: 0.875rem 2.5rem;
  border-radius: var(--radius-full);
  font-size: 1.125rem;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  gap: 0.5rem;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.cta-icon {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.3s ease;
}

.cta-button:hover .cta-icon {
  transform: translateX(3px);
}

/* --------- Responsive Design --------- */
@media (min-width: 768px) {
  .hero-container {
    flex-direction: row;
    gap: 4rem;
  }
  
  .story-container {
    flex-direction: row;
  }
  
  .hero-image-container {
    max-width: 450px;
    height: 450px;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 3.5rem;
  }
  
  .services-grid {
    gap: 2.5rem;
  }
  
  .card-image-container {
    height: 250px;
  }
}

/* --------- Animations --------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.8s ease forwards;
}