/* ========================================
   Hospital / Clinic Detail Page Styles
   DentaGo - Dental Tourism Thailand
   ======================================== */

/* === Gallery Slider === */
.gallery-main {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 1rem;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.08), rgba(15, 118, 110, 0.04));
  border: 1px solid #e2e8f0;
}

.gallery-main img,
.gallery-main .gallery-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  background: linear-gradient(135deg, #f0fdfa, #fef3c7);
  color: var(--brand);
}

.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
  color: #475569;
}

.gallery-nav-btn:hover {
  background: white;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  color: var(--brand);
}

.gallery-nav-prev { left: 1rem; }
.gallery-nav-next { right: 1rem; }

.gallery-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.gallery-dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.gallery-dot.active {
  background: white;
  border-color: white;
  transform: scale(1.2);
}

.gallery-thumbs {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.gallery-thumb {
  width: 5rem;
  height: 3.5rem;
  border-radius: 0.5rem;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  opacity: 0.6;
}

.gallery-thumb:hover {
  opacity: 0.85;
}

.gallery-thumb.active {
  border-color: var(--brand);
  opacity: 1;
}

.gallery-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  color: #94a3b8;
}

/* === Quick Stats Bar === */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .stats-bar {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-item {
  text-align: center;
  padding: 1.25rem 0.75rem;
  background: #f8fafc;
  border-radius: 0.75rem;
  border: 1px solid #f1f5f9;
  transition: all 0.2s;
}

.stat-item:hover {
  background: #f0fdfa;
  border-color: rgba(13, 148, 136, 0.2);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.3;
}

/* === Hero Area === */
.clinic-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .clinic-hero {
    grid-template-columns: 1.5fr 1fr;
    align-items: start;
  }
}

.clinic-hero-info h1 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
  .clinic-hero-info h1 {
    font-size: 2.25rem;
  }
}

.clinic-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.clinic-hero-desc {
  font-size: 1.0625rem;
  color: #64748b;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.clinic-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* === Hero Sidebar Card === */
.hero-sidebar {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.hero-sidebar-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
}

.hero-sidebar-item + .hero-sidebar-item {
  border-top: 1px solid #f1f5f9;
}

.hero-sidebar-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  background: rgba(13, 148, 136, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--brand);
}

.hero-sidebar-label {
  font-size: 0.75rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.125rem;
}

.hero-sidebar-value {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1e293b;
}

/* === Section Headers === */
.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-badge {
  display: inline-block;
  padding: 0.25rem 0.875rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: rgba(13, 148, 136, 0.1);
  color: var(--brand);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

@media (min-width: 640px) {
  .section-title {
    font-size: 1.75rem;
  }
}

.section-subtitle {
  font-size: 1rem;
  color: #64748b;
  max-width: 36rem;
  margin: 0 auto;
  line-height: 1.6;
}

/* === Divider === */
.section-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, #e2e8f0, transparent);
  margin: 3rem 0;
}

/* === Service Tabs === */
.service-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.service-tab-btn {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid #e2e8f0;
  background: white;
  color: #64748b;
}

.service-tab-btn:hover {
  background: #f8fafc;
  border-color: var(--brand);
  color: var(--brand);
}

.service-tab-btn.active {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

/* === Service Detail Card === */
.service-detail-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s;
}

.service-detail-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  border-color: rgba(13, 148, 136, 0.2);
}

.service-price-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
  font-size: 0.875rem;
  font-weight: 600;
}

/* === Doctor Card (Detail Page Variant) === */
.doctor-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s;
  text-align: center;
}

.doctor-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.doctor-avatar {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.15), rgba(245, 158, 11, 0.1));
  color: var(--brand);
  border: 3px solid rgba(13, 148, 136, 0.1);
}

/* === Facility Card === */
.facility-card {
  text-align: center;
  padding: 1.75rem 1rem;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background: white;
  transition: all 0.3s;
}

.facility-card:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 20px rgba(13, 148, 136, 0.08);
}

.facility-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: rgba(13, 148, 136, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
}

/* === Review Card === */
.review-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s;
}

.review-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.review-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.reviewer-avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  background: linear-gradient(135deg, #0d9488, #0f766e);
  color: white;
  flex-shrink: 0;
}

.review-stars {
  display: flex;
  gap: 0.125rem;
  color: #eab308;
}

.review-text {
  font-size: 0.9375rem;
  color: #475569;
  line-height: 1.7;
}

/* === Location Card === */
.location-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  overflow: hidden;
}

.location-map {
  height: 16rem;
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}

.location-info {
  padding: 1.5rem;
}

/* === Sidebar (Detail Page) === */
.detail-sidebar {
  position: sticky;
  top: 5rem;
}

.sidebar-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.sidebar-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}

/* === FAQ Accordion === */
.faq-item {
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: white;
  border: none;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #1e293b;
  text-align: left;
  transition: background 0.2s;
}

.faq-question:hover {
  background: #f8fafc;
}

.faq-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  transition: transform 0.2s;
  color: #94a3b8;
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
  color: var(--brand);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 20rem;
}

.faq-answer-inner {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.9375rem;
  color: #64748b;
  line-height: 1.7;
}

/* === Working Hours Table === */
.hours-table {
  width: 100%;
  font-size: 0.875rem;
}

.hours-table td {
  padding: 0.5rem 0;
  color: #475569;
}

.hours-table td:first-child {
  color: #64748b;
  width: 40%;
}

.hours-table td:last-child {
  font-weight: 500;
  text-align: right;
}

/* === Price Table === */
.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.price-table th {
  text-align: left;
  padding: 0.75rem 0;
  border-bottom: 2px solid #e2e8f0;
  color: #64748b;
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.price-table td {
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}

.price-table tr:hover td {
  background: #f8fafc;
}

.price-table td:last-child {
  text-align: right;
  font-weight: 600;
  color: var(--brand);
}

/* === Certification Badges === */
.cert-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border-radius: 0.625rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.8125rem;
  color: #475569;
  transition: all 0.2s;
}

.cert-badge:hover {
  border-color: var(--brand);
}

.cert-check {
  color: var(--brand);
  font-weight: 700;
}

/* === Responsive adjustments === */
@media (max-width: 768px) {
  .clinic-hero {
    gap: 1.5rem;
  }

  .gallery-thumbs {
    gap: 0.5rem;
  }

  .gallery-thumb {
    width: 4rem;
    height: 2.75rem;
  }

  .section-title {
    font-size: 1.375rem;
  }
}
