﻿/* ==========================================================================
   REUSABLE UI COMPONENTS
   ========================================================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-full);
  transition: all var(--transition-normal);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
}

.btn svg {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-fast);
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-darker) 100%);
  color: #FFFFFF;
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.4);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--secondary);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(20, 184, 166, 0.3);
}

.btn-secondary:hover {
  background-color: var(--secondary-hover);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(20, 184, 166, 0.4);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #FFFFFF;
  box-shadow: var(--shadow-coral);
}

.btn-accent:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, #BE123C 100%);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -5px rgba(251, 113, 133, 0.45);
}

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

.btn-outline:hover {
  background-color: var(--primary);
  color: #FFFFFF;
  transform: translateY(-2px);
}

.btn-outline-white {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border: 2px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
}

.btn-outline-white:hover {
  background: #FFFFFF;
  color: var(--primary-darker);
  border-color: #FFFFFF;
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--primary-dark);
  padding: 0.6rem 1.2rem;
}

.btn-ghost:hover {
  background: var(--primary-light);
  color: var(--primary-darker);
}

.btn-sm {
  padding: 0.55rem 1.25rem;
  font-size: 0.88rem;
}

.btn-lg {
  padding: 1.1rem 2.25rem;
  font-size: 1.08rem;
}

/* Service & Feature Cards */
.service-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-medium);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon-box {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: all var(--transition-normal);
}

.service-card:hover .service-icon-box {
  background: var(--primary);
  color: #fff;
  transform: scale(1.08) rotate(3deg);
}

.service-icon-box svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

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

.service-card-desc {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex: 1 0 auto;
}

.service-card-features {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.service-feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-main);
  font-weight: 500;
}

.service-feature-item svg {
  width: 16px;
  height: 16px;
  color: var(--secondary);
  flex-shrink: 0;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

.service-card-footer {
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.service-card-link {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.service-card-link:hover {
  color: var(--secondary-hover);
  gap: 0.65rem;
}

/* Doctor Cards */
.doctor-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.doctor-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-medium);
}

.doctor-img-wrapper {
  position: relative;
  height: 290px;
  overflow: hidden;
  background-color: var(--bg-section-light);
}

.doctor-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform var(--transition-slow);
}

.doctor-card:hover .doctor-img {
  transform: scale(1.05);
}

.doctor-badge-floating {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-dark);
  box-shadow: var(--shadow-sm);
}

.doctor-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.doctor-specialty {
  color: var(--secondary-hover);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.doctor-name {
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
}

.doctor-credentials {
  font-size: 0.88rem;
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 1rem;
}

.doctor-bio-short {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex: 1 0 auto;
}

.doctor-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.5rem;
}

.meta-chip {
  font-size: 0.78rem;
  padding: 0.25rem 0.65rem;
  background: var(--primary-ultralight);
  color: var(--primary-dark);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.doctor-actions {
  display: flex;
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

/* Trust Stats Bar */
.trust-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  padding: 2.75rem 2rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-subtle);
  margin-top: -3.5rem;
  position: relative;
  z-index: 10;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 1rem;
  border-right: 1px solid var(--border-subtle);
}

.stat-item:last-child {
  border-right: none;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.85rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
}

.stat-number span {
  color: var(--accent);
}

.stat-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.25rem;
}

.stat-subtext {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Testimonial Cards */
.testimonial-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
}

.rating-stars {
  display: flex;
  gap: 0.25rem;
  color: #F59E0B;
  margin-bottom: 1.25rem;
}

.rating-stars svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.testimonial-quote {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-main);
  font-style: italic;
  margin-bottom: 1.5rem;
  flex: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--secondary-light);
}

.author-info h5 {
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.author-info span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
}

.verified-badge svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

/* FAQ Accordion */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 860px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.faq-item.active {
  border-color: var(--secondary);
  box-shadow: var(--shadow-md);
}

.faq-question {
  width: 100%;
  padding: 1.35rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-heading);
  cursor: pointer;
}

.faq-question:hover {
  color: var(--primary);
}

.faq-chevron {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition-normal), background-color var(--transition-normal);
}

.faq-chevron svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
  background: var(--primary);
  color: #fff;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out, padding 0.35s ease;
  padding: 0 1.75rem;
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 1rem;
}

.faq-item.active .faq-answer {
  max-height: 400px;
  padding: 0 1.75rem 1.5rem 1.75rem;
}

/* Modal Popup Dialog */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 43, 43, 0.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  position: relative;
  transform: translateY(20px) scale(0.96);
  transition: all var(--transition-normal);
  padding: 2.5rem;
}

.modal-overlay.open .modal-content {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--bg-section-light);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.modal-close-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: #FFFFFF;
  border-left: 5px solid var(--primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  padding: 1rem 1.5rem;
  min-width: 320px;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 1rem;
  transform: translateX(120%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  transform: translateX(0);
}

.toast-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-text {
  flex: 1;
}

.toast-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-heading);
}

.toast-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}