/* ==========================================================================
   Lifecare Physiotherapy - Global Styles
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Colors */
  --color-primary: #1e3a8a; /* Deep Navy Blue */
  --color-primary-dark: #1e40af;
  --color-secondary: #0d9488; /* Turquoise */
  --color-secondary-dark: #0f766e;
  --color-cta: #ea580c; /* High-conversion Orange */
  --color-cta-dark: #c2410c;
  --color-text-main: #0f172a;
  --color-text-muted: #475569;
  --color-bg-light: #f1f5f9;
  --color-white: #ffffff;
  
  /* Styling Tokens */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-hover: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 300ms ease-in-out;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--color-text-main);
  background-color: var(--color-bg-light);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-text-main);
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-light {
  background-color: var(--color-white);
}

.section-dark {
  background-color: var(--color-bg-light);
}

.text-center {
  text-align: center;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-text-main);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 700px;
  margin: 0 auto 3rem;
}

/* ==========================================================================
   Components: Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-cta), #f97316);
  color: var(--color-white);
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-cta-dark), var(--color-cta));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.6);
}

.btn-secondary {
  background-color: var(--color-primary);
  color: var(--color-white);
  box-shadow: var(--shadow-md);
}

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

.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

/* ==========================================================================
   Layout: Header & Nav
   ========================================================================== */
.top-bar {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 0.5rem 0;
  font-size: 0.875rem;
  font-weight: 500;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-contact {
  display: flex;
  gap: 1.5rem;
}

.top-bar-contact a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color var(--transition-fast);
}

.top-bar-contact a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.header {
  background-color: var(--color-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow var(--transition-normal);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 5rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  color: var(--color-secondary);
}

.nav-links {
  display: flex;
  gap: 2rem;
  margin-left: auto;
  margin-right: 2.5rem;
}

.nav-links a {
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.nav-links a:hover, .nav-links a.active {
  color: var(--color-primary);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-text-main);
  cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  position: relative;
  height: calc(100vh - 5rem - 40px); /* Minus header and top bar */
  min-height: 500px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-text-main);
}

.hero-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

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

.slide.active {
  opacity: 1;
}

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

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--color-white);
  max-width: 600px;
  padding-bottom: 5rem;
}

.hero-badge {
  display: inline-block;
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-white);
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

/* ==========================================================================
   Features / Stats
   ========================================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: -3rem;
  position: relative;
  z-index: 10;
}

.feature-card {
  background: var(--color-white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
  transition: transform var(--transition-normal);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.feature-card > p, .feature-card > div {
  flex-grow: 1;
}

.feature-card:hover {
  transform: translateY(-5px);
}

/* Distinct light colors for the 3 feature cards */
.features-grid .feature-card:nth-child(1) {
  background-color: #f0fdf4;
  border-top: 4px solid #22c55e;
}

.features-grid .feature-card:nth-child(2) {
  background-color: #f0f9ff;
  border-top: 4px solid #0ea5e9;
}

.features-grid .feature-card:nth-child(3) {
  background-color: #fff7ed;
  border-top: 4px solid #f97316;
}

.features-grid .feature-card:nth-child(4) {
  background-color: #f0fdf4;
  border-top: 4px solid #c516f9;
}

.feature-icon {
  width: 60px;
  height: 60px;
  background-color: var(--color-bg-light);
  color: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
}

/* ==========================================================================
   Services Section
   ========================================================================== */
.section-services {
  background: linear-gradient(135deg, #f0fdfa 0%, #e0f2fe 100%);
}

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

.service-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0,0,0,0.05);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-primary);
}

.service-icon {
  color: var(--color-secondary);
  margin-bottom: 1.5rem;
}

.service-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.service-problem {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.service-benefit {
  font-weight: 500;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

/* Image Collage */
.image-collage {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 200px);
  gap: 10px;
}

.collage-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal);
}

.collage-item:hover {
  transform: scale(1.02);
  z-index: 2;
}

.collage-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collage-item.main {
  grid-column: span 2;
  grid-row: span 2;
}

@media (max-width: 480px) {
  .image-collage {
    grid-template-rows: repeat(2, 150px);
  }
}

.about-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
  border-radius: var(--radius-lg);
  pointer-events: none;
}

.about-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.about-content p {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
}

.check-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.check-list li svg {
  color: var(--color-secondary);
}

/* ==========================================================================
   Doctor Section
   ========================================================================== */
.doctor-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
}

.doctor-img {
  width: 40%;
  object-fit: cover;
}

.doctor-info {
  padding: 3rem;
  width: 60%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.doctor-name {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.doctor-qual {
  font-weight: 600;
  color: var(--color-text-main);
  margin-bottom: 1rem;
}

.doctor-exp {
  display: inline-block;
  background-color: var(--color-bg-light);
  color: var(--color-secondary-dark);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

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

.review-card {
  background: var(--color-white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.stars {
  color: #fbbf24; /* Yellow */
  margin-bottom: 1rem;
  display: flex;
  gap: 0.25rem;
}

.review-text {
  font-style: italic;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.reviewer {
  font-weight: 600;
}

/* ==========================================================================
   Callback Form (Lead Magnet)
   ========================================================================== */
.cta-section {
  background-color: var(--color-primary);
  background-image: linear-gradient(rgba(30, 58, 138, 0.85), rgba(30, 58, 138, 0.95)), url('../images/lifecare-1.jpeg');
  background-size: cover;
  background-position: center;
  color: var(--color-white);
  padding: 6rem 0;
}

.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.cta-content h2 {
  color: var(--color-white);
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.cta-content p {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.form-card {
  background: var(--color-white);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  color: var(--color-text-main);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.form-card .btn {
  width: 100%;
  padding: 1rem;
  font-size: 1.125rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background-color: var(--color-text-main);
  color: var(--color-white);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-col h3 {
  color: var(--color-white);
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: #94a3b8;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-white);
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: #94a3b8;
}

.footer-contact svg {
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.875rem;
}

/* ==========================================================================
   Floating Action Buttons
   ========================================================================== */
.fab-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: row;
  z-index: 999;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.fab {
  flex: 1;
  height: 60px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  transition: background-color var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
}

.fab i {
  width: 24px;
  height: 24px;
}

.fab:hover {
  filter: brightness(0.9);
}

.fab-whatsapp {
  background-color: #25D366;
}

.fab-call {
  background-color: var(--color-primary);
}

.fab-map {
  background-color: #ea4335; /* Google Maps Red */
}

@media (min-width: 768px) {
  .fab-container {
    bottom: 2rem;
    right: 2rem;
    left: auto;
    flex-direction: column;
    gap: 1rem;
    box-shadow: none;
  }
  
  .fab {
    width: 60px;
    flex: none;
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-fast);
  }
  
  .fab:hover {
    transform: scale(1.1);
    filter: none;
  }
}

/* ==========================================================================
   Animations
   ========================================================================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  body {
    padding-bottom: 60px; /* Prevent sticky FAB bar from hiding content */
  }

  /* Make header elements fit elegantly on mobile */
  .header .container {
    gap: 0.5rem;
  }

  .header .logo img {
    height: 45px !important;
  }

  .header .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    white-space: nowrap;
    border-radius: var(--radius-sm);
    margin-left: auto; /* Push button and menu to the right */
  }

  .top-bar-contact {
    display: none; /* Hide top bar contact on mobile, keep just text or hide bar */
  }
  
  .top-bar .container {
    justify-content: center;
  }

  .nav-links {
    position: fixed;
    top: 5rem;
    left: -100%;
    width: 100%;
    height: calc(100vh - 5rem);
    background-color: var(--color-white);
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    margin: 0;
    transition: left var(--transition-normal);
    box-shadow: var(--shadow-md);
  }

  .nav-links.active {
    left: 0;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero {
    height: auto;
    padding: 3rem 0; /* Shift content area slight up */
  }

  .hero-title {
    font-size: 1.8rem;
    text-align: center;
  }

  .hero-subtitle {
    font-size: 0.9rem;
    text-align: center;
  }

  .hero-badge {
    font-size: 0.65rem;
    padding: 0.4rem 0.6rem;
    white-space: normal;
    line-height: 1.4;
    text-align: center;
    width: 100%;
    margin-top: 1rem !important; /* Shift slight up */
  }

  .top-bar-text {
    font-size: 0.65rem;
    letter-spacing: -0.2px;
    white-space: nowrap;
    text-align: center;
  }
  
  .hero-buttons {
    flex-direction: row;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
  }

  .hero-buttons .btn {
    flex: 1;
    padding: 0.5rem 0.5rem;
    font-size: 0.8rem;
    justify-content: center;
  }

  .about-grid, .cta-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .doctor-card {
    flex-direction: column;
  }
  
  .doctor-img, .doctor-info {
    width: 100%;
  }
  
    .section-title {
    font-size: 2.0rem;
    margin-bottom: 1rem;
    color: var(--color-text-main);
}

.cta-content h2 {
    color: var(--color-white);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .section {
    padding: 3rem 0;
  }
}

/* Inner Page Header */
.page-header {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 4rem 0;
  text-align: center;
}

.page-header h1 {
  color: var(--color-white);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.content-article {
  max-width: 800px;
  margin: 0 auto;
}

.content-article h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.content-article p {
  margin-bottom: 1.5rem;
}

.content-article ul {
  list-style: disc;
  margin-left: 2rem;
  margin-bottom: 1.5rem;
}

.faq-item {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 1.5rem;
}

.faq-q {
  font-weight: 600;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  color: var(--color-text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.faq-a {
  color: var(--color-text-muted);
}

/* ==========================================================================
   Gallery Section
   ========================================================================== */
.gallery-scroll-wrapper {
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  padding-bottom: 1rem;
}

.gallery-scroll-wrapper::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}

.gallery-scroll-container {
  display: flex;
  gap: 1.5rem;
  padding: 0.5rem;
}

.gallery-item {
  scroll-snap-align: center;
  flex: 0 0 85%;
  max-width: 600px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal);
}

@media (min-width: 768px) {
  .gallery-item {
    flex: 0 0 45%;
  }
}

@media (min-width: 1024px) {
  .gallery-item {
    flex: 0 0 30%;
  }
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.gallery-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

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

.gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: var(--color-white);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  color: var(--color-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.gallery-btn:hover {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: var(--shadow-lg);
}

.gallery-btn.prev {
  left: 0.5rem;
}

.gallery-btn.next {
  right: 0.5rem;
}

@media (max-width: 768px) {
  .gallery-btn {
    display: none;
  }
}
