/* Doctor Profile Page */

.profile-page {
  background: var(--bg-canvas);
  overflow-x: clip;
}

.profile-main {
  padding-bottom: 48px;
}

/* Cover & Identity */
.profile-hero {
  position: relative;
  margin-bottom: 0;
}

.profile-hero__cover {
  height: 280px;
  overflow: hidden;
  background: var(--primary);
  position: relative;
}

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

.profile-hero__cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.55));
}

.profile-hero__container {
  position: relative;
  margin-top: -72px;
  z-index: 2;
  padding-bottom: 24px;
}

.profile-identity {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.profile-identity__avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.profile-identity__avatar {
  width: 140px;
  height: 140px;
  border-radius: var(--radius-xl);
  object-fit: cover;
  border: 4px solid var(--bg-panel);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  background: var(--primary-light);
}

.profile-identity__verified {
  position: absolute;
  bottom: 4px;
  left: 4px;
  width: 28px;
  height: 28px;
  background: var(--secondary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-panel);
}

.profile-identity__verified .lucide {
  width: 14px;
  height: 14px;
}

.profile-identity__info {
  flex: 1;
  min-width: 0;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.profile-identity__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 0;
}

.profile-identity__specialty {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 8px;
}

.profile-identity__name {
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--text-dark);
  line-height: 1.3;
  margin-bottom: 4px;
}

.profile-identity__title {
  font-size: 0.9rem;
  color: var(--text-medium);
  font-weight: 600;
}

.profile-identity__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.profile-action-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-canvas);
  color: var(--text-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.profile-action-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.profile-action-btn.is-active {
  color: #ef4444;
  border-color: #fecaca;
  background: #fef2f2;
}

.profile-action-btn.is-active .lucide {
  fill: #ef4444;
}

.profile-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-color);
}

.profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  flex: 1;
  min-width: 0;
}

.profile-stat {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-stat > .lucide {
  width: 22px;
  height: 22px;
  color: var(--primary);
  flex-shrink: 0;
}

.profile-stat strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
}

.profile-stat span {
  font-size: 0.72rem;
  color: var(--text-light);
  font-weight: 600;
}

.profile-contact {
  flex-shrink: 0;
}

.profile-contact__links {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.profile-contact__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-canvas);
  color: var(--text-medium);
  text-decoration: none;
  transition: var(--transition);
}

.profile-contact__link .lucide,
.profile-contact__link img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.profile-contact__link img {
  object-fit: contain;
}

.profile-contact__link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.profile-contact__link--phone {
  color: var(--primary);
  border-color: rgba(58, 107, 212, 0.25);
  background: var(--primary-light);
}

.profile-contact__link--phone:hover {
  border-color: var(--primary);
  color: var(--primary-hover);
}

.profile-contact__link--whatsapp {
  color: #16a34a;
}

.profile-contact__link--whatsapp:hover {
  border-color: #86efac;
  background: #f0fdf4;
  color: #15803d;
}

.profile-contact__link--facebook {
  color: #1877f2;
}

.profile-contact__link--facebook:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.profile-contact__link--instagram {
  color: #db2777;
}

.profile-contact__link--instagram:hover {
  border-color: #f9a8d4;
  background: #fdf2f8;
}

.profile-contact__link--twitter {
  color: #0f1419;
}

.profile-contact__link--twitter:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.profile-contact__link--youtube {
  color: #dc2626;
}

.profile-contact__link--youtube:hover {
  border-color: #fca5a5;
  background: #fef2f2;
}

/* Layout */
.profile-body {
  padding-top: 32px;
}

.profile-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.profile-content {
  min-width: 0;
  max-width: 100%;
}

/* Booking sidebar */
.profile-booking {
  position: sticky;
  top: 88px;
  align-self: start;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-booking__card {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: 0 8px 32px rgba(58, 107, 212, 0.08);
}

.profile-booking__head {
  margin-bottom: 16px;
}

.profile-booking__title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.profile-booking__title .lucide {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.profile-booking__lead {
  font-size: 0.78rem;
  color: var(--text-medium);
  line-height: 1.55;
}

.profile-booking__fee {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--primary-light);
  border: 1px solid rgba(58, 107, 212, 0.15);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 0.82rem;
  color: var(--text-medium);
}

.profile-booking__fee--before-cta {
  margin-top: 18px;
  margin-bottom: 12px;
}

.profile-booking__step {
  margin-bottom: 16px;
}

.profile-booking__step-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-medium);
  margin-bottom: 10px;
}

.profile-booking__step-label .lucide {
  width: 14px;
  height: 14px;
  color: var(--primary);
}

.profile-booking__schedule {
  background: var(--bg-canvas);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.profile-booking__schedule-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-medium);
  margin-bottom: 10px;
}

.profile-booking__schedule-label .lucide {
  width: 14px;
  height: 14px;
  color: var(--primary);
}

.profile-schedule-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-schedule-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  padding: 10px 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.profile-schedule-list li.is-selectable {
  cursor: pointer;
}

.profile-schedule-list li.is-selectable:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.profile-schedule-list li.is-selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 1px rgba(58, 107, 212, 0.2);
}

.profile-schedule-list li.is-off {
  opacity: 0.55;
  background: transparent;
  cursor: default;
}

.profile-schedule-list__days {
  font-weight: 700;
  color: var(--text-dark);
  flex-shrink: 0;
}

.profile-schedule-list__meta {
  text-align: left;
  color: var(--text-medium);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.45;
}

.profile-schedule-list__badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: 50px;
  margin-inline-start: 4px;
  white-space: nowrap;
}

.profile-schedule-list li.is-off .profile-schedule-list__meta {
  color: var(--text-light);
}

.profile-schedule-list li.is-selected .profile-schedule-list__days {
  color: var(--primary);
}

.profile-dates-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  padding-bottom: 4px;
}

.profile-dates-scroll::-webkit-scrollbar {
  height: 4px;
}

.profile-dates-scroll::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.profile-dates-track {
  display: flex;
  gap: 10px;
  min-width: min-content;
  padding: 2px 2px 6px;
}

.profile-date-card {
  flex: 0 0 auto;
  scroll-snap-align: start;
  min-width: 76px;
  padding: 12px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-canvas);
  font-family: var(--font-family);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.profile-date-card:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.profile-date-card--selected {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.profile-date-card__weekday {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  opacity: 0.75;
  margin-bottom: 2px;
}

.profile-date-card__num {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
}

.profile-date-card__month {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  margin-top: 2px;
  opacity: 0.85;
}

.profile-date-card--selected .profile-date-card__month {
  opacity: 0.95;
}

.profile-periods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.profile-periods__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-canvas);
  font-family: var(--font-family);
  cursor: pointer;
  transition: var(--transition);
  min-height: 72px;
}

.profile-periods__btn .lucide {
  width: 22px;
  height: 22px;
  color: var(--text-light);
}

.profile-periods__btn span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-medium);
}

.profile-periods__btn small {
  font-size: 0.65rem;
  color: var(--text-light);
  font-weight: 600;
}

.profile-periods__btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.profile-periods__btn:hover .lucide {
  color: var(--primary);
}

.profile-periods__btn--selected {
  border-color: var(--primary);
  background: var(--primary);
}

.profile-periods__btn--selected .lucide,
.profile-periods__btn--selected span,
.profile-periods__btn--selected small {
  color: #fff;
}

.profile-booking__fee strong {
  font-size: 1rem;
  color: var(--primary);
  font-weight: 800;
}

.profile-booking__group {
  margin-bottom: 14px;
}

.profile-booking__group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-medium);
  margin-bottom: 6px;
}

.profile-booking__group label .lucide {
  width: 14px;
  height: 14px;
  color: var(--primary);
}

.profile-booking__select,
.profile-booking__input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 0.85rem;
  background: var(--bg-canvas);
  outline: none;
  transition: var(--transition);
}

.profile-booking__select:focus,
.profile-booking__input:focus {
  border-color: var(--primary);
  background: #fff;
}

.profile-booking__map-link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--primary-light);
  border: 1px dashed rgba(58, 107, 212, 0.35);
  border-radius: var(--radius-md);
  color: var(--primary);
  font-family: var(--font-family);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  text-align: right;
}

.profile-booking__map-link:hover {
  background: rgba(58, 107, 212, 0.12);
  border-color: var(--primary);
  color: var(--primary-hover);
}

.profile-booking__map-link-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-booking__map-link-icon .lucide {
  width: 15px;
  height: 15px;
}

.profile-booking__map-link-text {
  flex: 1;
}

.profile-booking__map-link-arrow {
  width: 16px;
  height: 16px;
  opacity: 0.7;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.profile-booking__map-link:hover .profile-booking__map-link-arrow {
  transform: translateX(-3px);
  opacity: 1;
}

.profile-booking__cta {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  margin-top: 4px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
}

.profile-booking__cta:hover:not(:disabled) {
  background: var(--primary-hover);
  box-shadow: 0 8px 20px rgba(58, 107, 212, 0.3);
}

.profile-booking__cta:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Tabs & content */
.profile-about {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.profile-about__title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-about__title .lucide {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.profile-about__text {
  font-size: 0.88rem;
  color: var(--text-medium);
  line-height: 1.8;
  white-space: pre-line;
  margin: 0;
}

.profile-about__bio {
  position: relative;
}

.profile-about__text-wrap,
.profile-expandable__wrap {
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.profile-about__text-wrap.is-collapsed::after,
.profile-expandable__wrap.is-collapsed::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2em;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--bg-panel));
  pointer-events: none;
}

.profile-about__toggle,
.profile-expandable__toggle,
.profile-expandable-list__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
}

.profile-expandable-list__toggle {
  width: 100%;
  justify-content: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
}

.profile-about__toggle:hover,
.profile-expandable__toggle:hover,
.profile-expandable-list__toggle:hover {
  color: var(--primary-hover);
}

.profile-about__toggle-icon,
.profile-expandable__toggle-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.35s ease;
}

.profile-about__toggle.is-open .profile-about__toggle-icon,
.profile-expandable__toggle.is-open .profile-expandable__toggle-icon,
.profile-expandable-list__toggle.is-open .profile-expandable__toggle-icon {
  transform: rotate(180deg);
}

.profile-expandable__content {
  margin: 0;
}

.profile-expandable-list__item--hidden {
  display: none !important;
}

.profile-stat--rating {
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.profile-stat--rating:hover {
  background: var(--primary-light);
}

.profile-stat--rating:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Patient reviews */
.profile-reviews {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 22px 24px;
  margin-top: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.profile-reviews__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.profile-reviews__title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.profile-reviews__title .lucide {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.profile-reviews__summary {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--primary-light);
  border: 1px solid rgba(58, 107, 212, 0.15);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
}

.profile-reviews__score {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.profile-reviews__summary-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-reviews__stars {
  display: flex;
  gap: 2px;
  color: var(--accent);
}

.profile-reviews__stars .lucide {
  width: 13px;
  height: 13px;
  fill: var(--accent);
}

.profile-reviews__count {
  font-size: 0.68rem;
  color: var(--text-medium);
  font-weight: 600;
}

.profile-reviews__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-review {
  padding: 16px 18px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.profile-review__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.profile-review__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary-light);
  flex-shrink: 0;
}

.profile-review__meta {
  flex: 1;
  min-width: 0;
}

.profile-review__name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 2px;
}

.profile-review__date {
  font-size: 0.68rem;
  color: var(--text-light);
}

.profile-review__rating {
  display: flex;
  gap: 2px;
  color: var(--accent);
  flex-shrink: 0;
}

.profile-review__rating .lucide {
  width: 13px;
  height: 13px;
  fill: var(--accent);
}

.profile-review__text {
  font-size: 0.82rem;
  color: var(--text-medium);
  line-height: 1.65;
  margin: 0;
}

.profile-conditions {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.profile-conditions__title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-conditions__title .lucide {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.profile-conditions__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-conditions__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  border-radius: 50px;
  background: var(--bg-canvas);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
}

.profile-conditions__tag .lucide {
  width: 14px;
  height: 14px;
  color: var(--secondary-hover);
  flex-shrink: 0;
}

.profile-tabs-wrap {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.profile-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 0;
  margin: 0;
  background: var(--bg-canvas);
  border-bottom: 1px solid var(--border-color);
}

.profile-tabs__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 10px;
  border: none;
  border-inline-start: 1px solid var(--border-color);
  border-radius: 0;
  background: transparent;
  font-family: var(--font-family);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-medium);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.profile-tabs__btn:first-child {
  border-inline-start: none;
}

.profile-tabs__btn .lucide {
  width: 18px;
  height: 18px;
  color: var(--text-light);
  transition: var(--transition);
}

.profile-tabs__btn span {
  line-height: 1.2;
}

.profile-tabs__btn:hover {
  background: rgba(58, 107, 212, 0.06);
  color: var(--primary);
}

.profile-tabs__btn:hover .lucide {
  color: var(--primary);
}

.profile-tabs__btn--active {
  background: var(--bg-panel);
  color: var(--primary);
}

.profile-tabs__btn--active::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 16%;
  left: 16%;
  height: 3px;
  background: var(--primary);
  border-radius: 3px 3px 0 0;
}

.profile-tabs__btn--active .lucide {
  color: var(--primary);
}

.profile-tabs-body {
  padding: 22px 24px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.profile-panel {
  min-width: 0;
  max-width: 100%;
}

.profile-panel[hidden] {
  display: none !important;
}

/* Posts */
.profile-posts {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-post {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 18px 20px;
  transition: var(--transition);
}

.profile-post:hover {
  border-color: var(--primary);
}

.profile-post__date {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-post__title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.5;
}

.profile-post__excerpt {
  font-size: 0.82rem;
  color: var(--text-medium);
  line-height: 1.65;
}

/* Gallery */
.profile-clinic-photos {
  margin-bottom: 28px;
  min-width: 0;
  max-width: 100%;
}

.profile-clinic-photos__head {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 0 0 12px;
  margin-bottom: 8px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-color);
}

.profile-clinic-photos__title,
.profile-gallery__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 14px;
}

.profile-clinic-photos__title {
  margin-bottom: 0;
}

.profile-clinic-photos__title .lucide,
.profile-gallery__title .lucide {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.profile-clinic-photos__scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  padding-bottom: 4px;
}

.profile-clinic-photos__scroll::-webkit-scrollbar {
  height: 4px;
}

.profile-clinic-photos__scroll::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.profile-clinic-photos__track {
  display: inline-flex;
  gap: 12px;
  padding: 2px 2px 6px;
  vertical-align: top;
}

.profile-clinic-photos__item {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: 240px;
  max-width: none;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-canvas);
}

.profile-clinic-photos__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.profile-clinic-photos__item:hover img {
  transform: scale(1.04);
}

.profile-gallery-wrap {
  padding-top: 4px;
  min-width: 0;
  max-width: 100%;
}

.profile-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}

.profile-gallery__item {
  aspect-ratio: 1;
  min-width: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.profile-gallery__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.profile-gallery__item:hover img {
  transform: scale(1.05);
}

/* Videos */
.profile-videos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.profile-video {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.profile-video__thumb {
  position: relative;
  height: 160px;
  background: var(--primary-light);
}

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

.profile-video__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.35);
  color: #fff;
}

.profile-video__play .lucide {
  width: 48px;
  height: 48px;
}

.profile-video__body {
  padding: 14px 16px;
}

.profile-video__title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.45;
}

.profile-video__meta {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 4px;
}

/* Achievements */
.profile-achievements {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-right: 20px;
}

.profile-achievements::before {
  content: '';
  position: absolute;
  right: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border-color);
}

.profile-achievement {
  position: relative;
  padding: 0 0 24px 0;
  padding-right: 28px;
}

.profile-achievement::before {
  content: '';
  position: absolute;
  right: 0;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg-panel);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.profile-achievement__year {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.profile-achievement__title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.profile-achievement__desc {
  font-size: 0.8rem;
  color: var(--text-medium);
  line-height: 1.55;
}

/* Responsive */
@media (max-width: 1024px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-booking {
    position: static;
    order: -1;
  }
}

@media (max-width: 768px) {
  .profile-hero__cover {
    height: 200px;
  }

  .profile-identity {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-identity__info {
    width: 100%;
  }

  .profile-identity__top {
    flex-direction: column;
    align-items: center;
  }

  .profile-identity__actions {
    justify-content: center;
  }

  .profile-stats-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .profile-stats {
    justify-content: center;
  }

  .profile-contact__links {
    justify-content: center;
  }

  .profile-identity__avatar {
    width: 120px;
    height: 120px;
  }

  .profile-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-clinic-photos__item {
    width: 200px;
  }

  .profile-videos {
    grid-template-columns: 1fr;
  }

  .profile-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .profile-tabs__btn:nth-child(odd) {
    border-inline-start: none;
  }

  .profile-tabs__btn:nth-child(-n+2) {
    border-bottom: 1px solid var(--border-color);
  }

  .profile-tabs__btn {
    font-size: 0.72rem;
    padding: 12px 8px;
  }

  .profile-tabs-body {
    padding: 16px;
  }
}

/* Doctor card link cursor on index */
.doctor-card[data-profile] {
  cursor: pointer;
}

.doctor-card[data-profile] .doctor-card__name-link {
  color: inherit;
}

.doctor-card[data-profile] .doctor-card__name-link:hover {
  color: var(--primary);
}

/* Profile booking drawer extras */
.profile-page .booking-form__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.profile-page .booking-gender {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.profile-page .booking-gender__option {
  cursor: pointer;
}

.profile-page .booking-gender__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.profile-page .booking-gender__option span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-canvas);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-medium);
  transition: var(--transition);
}

.profile-page .booking-gender__option span .lucide {
  width: 16px;
  height: 16px;
}

.profile-page .booking-gender__option:hover span {
  border-color: var(--primary);
  color: var(--primary);
}

.profile-page .booking-gender__option input:checked + span {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.profile-page .booking-drawer-fee {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: var(--primary-light);
  border: 1px solid rgba(58, 107, 212, 0.18);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-medium);
}

.profile-page .booking-drawer-fee strong {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary);
}

.profile-page .booking-payment {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-page .booking-payment__option {
  cursor: pointer;
}

.profile-page .booking-payment__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.profile-page .booking-payment__card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-canvas);
  transition: var(--transition);
}

.profile-page .booking-payment__logo {
  flex-shrink: 0;
  border-radius: 10px;
  object-fit: cover;
}

.profile-page .booking-payment__name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
}

.profile-page .booking-payment__option:hover .booking-payment__card {
  border-color: var(--primary);
  background: var(--primary-light);
}

.profile-page .booking-payment__option input:checked + .booking-payment__card {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 1px rgba(58, 107, 212, 0.15);
}


.profile-content--full {
  grid-column: 1 / -1;
}

.profile-gallery-wrap {
  margin-top: 24px;
}

.profile-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 24px;
  text-align: center;
  border: 1px dashed var(--border-color, #e2e8f0);
  border-radius: var(--radius-lg, 16px);
  background: var(--bg-canvas, #f8fafc);
}

.profile-empty-state__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light, #eff6ff);
  color: var(--primary, #3a6bd4);
}

.profile-empty-state__icon .lucide {
  width: 22px;
  height: 22px;
}

.profile-empty-state__text {
  margin: 0;
  max-width: 36ch;
  font-size: 0.92rem;
  color: var(--text-medium, #64748b);
  line-height: 1.6;
}
