/* Modern Responsive Design for Best Rehab Nearby */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700;800&family=Playfair+Display:wght@400;500;600;700;800&display=swap');

/* CSS Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f7ff;
  overflow-x: hidden;
}

/* CSS Variables for consistent theming */
:root {
  --primary-color: #312f65;
  --secondary-color: #6366f1;
  --accent-color: #a78bfa;
  --text-color: #333;
  --light-bg: #f8f7ff;
  --gradient: linear-gradient(135deg, var(--primary-color) 0%, #4c4981 100%);
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --border-radius: 8px;
  --container-max-width: 1200px;
  --section-padding: 80px 0;
  --mobile-section-padding: 40px 0;
}

/* Container and Layout Utilities */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: var(--section-padding);
}

.section-mobile {
  padding: var(--mobile-section-padding);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 600;
}

h3 {
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 500;
}

p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  line-height: 1.8;
}

strong {
  color: var(--primary-color);
  font-weight: 600;
}

/* Header and Hero Section */
.hero-section {
  background: url('./images/hero.png');
  background-size: cover;
  background-position: center;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  color: white;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 1;
  animation: heroGlassAppear 2s ease-out;
}

@keyframes heroGlassAppear {
  0% {
    opacity: 0;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
  }
  100% {
    opacity: 1;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }
}

.header {
  padding: 20px 0;
  position: relative;
  z-index: 10;
}

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

.logo-section {
  display: flex;
  align-items: center;
  gap: 15px;
  filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 80px rgba(255, 255, 255, 0.6)) drop-shadow(0 0 150px rgba(255, 255, 255, 0.4));
  padding: 10px;
  border-radius: 10px;
}

.logo {
  height: 150px;
  width: auto;
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 1)) drop-shadow(0 0 60px rgba(255, 255, 255, 1)) drop-shadow(0 0 120px rgba(255, 255, 255, 1)) drop-shadow(0 0 200px rgba(255, 255, 255, 1)) drop-shadow(0 0 300px rgba(255, 255, 255, 0.8));
}

.brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #72589c;
  margin: 0;
  text-shadow: 0 0 15px rgba(255, 255, 255, 1), 0 0 40px rgba(255, 255, 255, 1), 0 0 80px rgba(255, 255, 255, 1), 0 0 150px rgba(255, 255, 255, 1), 0 0 250px rgba(255, 255, 255, 1), 0 0 400px rgba(255, 255, 255, 0.8);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

.hero-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  padding: 80px 0 40px 0;
  position: relative;
  z-index: 10;
}

.hero-content h1 {
  color: white;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  font-family: 'Playfair Display', serif;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  line-height: 1.3;
  
  /* Simple fade-in animation */
  animation: titleAppear 1.5s ease-out;
}

@keyframes titleAppear {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-subtitle {
  font-size: 1.5rem;
  color: #e0e0e0;
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 300;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 15px 30px;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  text-align: center;
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.6);
}

.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid white;
}

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

.btn-large {
  padding: 20px 40px;
  font-size: 1.3rem;
}

/* CTA Sections */
.cta-section {
  background: var(--gradient);
  color: white;
  text-align: center;
  padding: 60px 0;
}

.cta-content h2 {
  color: white;
  margin-bottom: 1rem;
}

.cta-subtitle {
  font-style: italic;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

/* Content Sections */
.content-section {
  padding: 80px 0;
  background: white;
}

.content-section:nth-child(even) {
  background: var(--light-bg);
}

/* Therapy Section with distinct background */
.therapy-section {
  background: #faf9ff !important;
  border-top: 1px solid #e5e4f0;
  border-bottom: 1px solid #e5e4f0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 1.2rem;
  color: #6b7280;
  max-width: 800px;
  margin: 0 auto;
}

/* Two Column Layout */
.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.column {
  display: flex;
  flex-direction: column;
}

/* Checkmarks List */
.checkmarks-list {
  list-style: none;
  margin-top: 20px;
}

.checkmarks-list li {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.checkmarks-list li::before {
  content: '✅';
  margin-right: 15px;
  font-size: 1.2rem;
}

/* Clinical Specialties */
.specialties-section {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 60px;
  align-items: start;
}

.doctor-image {
  width: 100%;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.specialties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.specialty-item {
  background: var(--primary-color);
  color: white;
  padding: 15px 20px;
  border-radius: var(--border-radius);
  text-align: center;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
}

/* Treatment Types Grid */
.treatment-types {
  background: linear-gradient(rgba(99, 102, 241, 0.9), rgba(167, 139, 250, 0.9)), url('./images/footer.png');
  background-size: cover;
  background-position: center;
  padding: 60px 0;
  color: white;
}

.treatment-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.treatment-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: var(--border-radius);
  text-align: center;
  font-weight: 600;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

/* Therapy Programs Toggle */
.therapy-programs {
  max-width: 900px;
  margin: 0 auto;
}

.toggle-item {
  border-bottom: 1px solid #e5e4f0;
  margin-bottom: 10px;
}

.toggle-header {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 25px 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.toggle-header:hover {
  background-color: #faf9ff;
}

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

.toggle-header.active .toggle-icon {
  transform: rotate(90deg);
}

.toggle-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0;
}

.toggle-content {
  display: none;
  padding: 0 40px 25px 40px;
  background: #faf9ff;
  border-radius: var(--border-radius);
  margin-bottom: 10px;
}

.toggle-content.active {
  display: block;
}

/* Gallery */
.gallery {
  height: 400px;
  overflow: hidden;
  border-radius: var(--border-radius);
  position: relative;
  box-shadow: var(--shadow);
}

.gallery-track {
  display: flex;
  height: 100%;
  animation: scroll 60s linear infinite;
}

.gallery img {
  height: 100%;
  width: 300px;
  object-fit: cover;
  flex-shrink: 0;
  margin-right: 10px;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Lightbox Styles */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
  display: flex;
  opacity: 1;
}

.lightbox-container {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 40px;
  cursor: pointer;
  z-index: 10001;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.lightbox-close:hover {
  opacity: 0.7;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  font-size: 30px;
  cursor: pointer;
  width: 50px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
  border-radius: 4px;
}

.lightbox-nav:hover {
  background: rgba(0, 0, 0, 0.8);
}

.lightbox-prev {
  left: -60px;
}

.lightbox-next {
  right: -60px;
}

.lightbox-counter {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 16px;
  background: rgba(0, 0, 0, 0.7);
  padding: 8px 16px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Reviews Section */
.reviews-section {
  background: #faf9ff;
  text-align: left;
  border-top: 1px solid #e5e4f0;
  border-bottom: 1px solid #e5e4f0;
}

.reviews-section .section-header {
  text-align: center;
}

.google-logo {
  max-width: 300px;
  margin-bottom: 20px;
}

.reviews-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 25px;
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.review-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #f0f0f0;
}

.review-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.review-header {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.review-profile-image {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: 16px;
  object-fit: cover;
  border: 2px solid #f0f0f0;
}

.review-author {
  flex: 1;
}

.review-author-name {
  font-weight: 600;
  font-size: 16px;
  color: var(--primary-color);
  margin-bottom: 2px;
}

.review-count {
  font-size: 12px;
  color: #666;
}

.review-rating-date {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.review-rating {
  display: flex;
  gap: 2px;
}

.review-star {
  color: #ddd;
  font-size: 16px;
  transition: color 0.2s ease;
}

.review-star.filled {
  color: #ffd700;
}

.review-date {
  font-size: 12px;
  color: #666;
}

.review-text {
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  font-style: italic;
}

/* Popup Styles */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.popup-content {
  background: white;
  padding: 40px;
  border-radius: var(--border-radius);
  max-width: 600px;
  width: 90%;
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
  color: #333;
  text-align: justify;
}

.close-popup {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--primary-color);
  font-weight: bold;
}

.popup-content h3 {
  color: var(--primary-color);
  margin-bottom: 20px;
  text-align: center;
}

.popup-content p {
  margin-bottom: 15px;
  line-height: 1.6;
  color: #333;
}

.popup-content a {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Info Button */
.info-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: white;
  padding: 10px 15px;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.info-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.info-icon {
  width: 16px;
  height: 16px;
}

/* Footer */
.footer {
  background: var(--primary-color);
  color: var(--accent-color);
  text-align: center;
  padding: 40px 0;
}

.footer p {
  margin-bottom: 10px;
  font-size: 0.6rem;
  line-height: 1.4;
}

.footer a {
  color: var(--accent-color);
  text-decoration: underline;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
  :root {
    --section-padding: 40px 0;
  }

  .container {
    padding: 0 15px;
  }

  .hero-section {
    min-height: 70vh;
  }

  .header-content {
    flex-direction: column;
    gap: 20px;
  }

  .hero-actions {
    display: none;
  }

  .logo {
    height: 85px;
  }

  .hero-content h1 {
    font-size: clamp(1.4rem, 4vw, 2.2rem);
  }

  .two-column {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .specialties-section {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .doctor-image {
    max-width: 300px;
    margin: 0 auto;
  }

  .specialties-grid {
    grid-template-columns: 1fr;
  }

  .treatment-grid {
    grid-template-columns: 1fr;
  }

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

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

  .toggle-content {
    padding: 0 20px 25px 20px;
  }

  .reviews-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .review-card {
    padding: 20px;
  }

  .review-profile-image {
    width: 45px;
    height: 45px;
    margin-right: 12px;
  }

  .review-author-name {
    font-size: 15px;
  }

  .review-text {
    font-size: 13px;
  }

  .gallery {
    height: 250px;
  }

  .gallery img {
    width: 200px;
  }

  .popup-content {
    padding: 30px 20px;
    margin: 20px;
  }

  /* Lightbox Mobile Styles */
  .lightbox-close {
    top: -40px;
    font-size: 30px;
    width: 40px;
    height: 40px;
  }

  .lightbox-nav {
    font-size: 24px;
    width: 40px;
    height: 60px;
  }

  .lightbox-prev {
    left: -50px;
  }

  .lightbox-next {
    right: -50px;
  }

  .lightbox-counter {
    font-size: 14px;
    padding: 6px 12px;
  }
}

@media (max-width: 480px) {
  .hero-section {
    min-height: 60vh;
  }

  .btn {
    padding: 12px 20px;
    font-size: 1rem;
  }

  .btn-large {
    padding: 15px 25px;
    font-size: 1.1rem;
  }

  .section-padding {
    padding: 30px 0;
  }

  .gallery {
    height: 200px;
  }

  .gallery img {
    width: 150px;
  }

  /* Lightbox Small Mobile Styles */
  .lightbox-container {
    max-width: 95%;
    max-height: 95%;
  }

  .lightbox-close {
    top: -30px;
    right: -10px;
    font-size: 24px;
    width: 35px;
    height: 35px;
  }

  .lightbox-nav {
    font-size: 20px;
    width: 35px;
    height: 50px;
  }

  .lightbox-prev {
    left: -40px;
  }

  .lightbox-next {
    right: -40px;
  }

  .lightbox-counter {
    bottom: -30px;
    font-size: 12px;
    padding: 4px 8px;
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.hidden { display: none; }
.visible { display: block; }

/* Focus and Accessibility */
.btn:focus,
.toggle-header:focus,
.info-btn:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .hero-section,
  .cta-section,
  .footer {
    background: white !important;
    color: black !important;
  }
  
  .btn {
    border: 1px solid black !important;
    background: white !important;
    color: black !important;
  }
}