.page-top-space { height: 70px; }
.page-header { background: var(--gradient-hero); padding: 4rem 0 3rem; text-align: center; color: #fff; }
.page-header h1 { font-size: 2.5rem; color: #fff; margin-bottom: 0.5rem; }
.page-header .highlight { background: linear-gradient(135deg,#FBBF24,#F97316); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.page-header p { color: rgba(255,255,255,0.85); font-size: 1.1rem; margin-bottom: 1rem; }
.free-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(245,158,11,0.9); padding: 0.5rem 1.25rem; border-radius: var(--radius-full);
  font-size: 0.9rem; font-weight: 600; color: #fff;
}
.free-badge .material-icons-outlined { font-size: 16px; }

/* Mode Tabs */
.consult-section { padding-top: 2rem; }
.mode-tabs {
  display: flex; gap: 1rem; justify-content: center; margin-bottom: 2rem; flex-wrap: wrap;
}
.mode-tab {
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
  padding: 1.25rem 2rem; background: #fff; border-radius: var(--radius-lg);
  border: 2px solid var(--border-light); cursor: pointer; transition: var(--transition);
  min-width: 140px;
}
.mode-tab .material-icons-outlined { font-size: 32px; color: var(--text-muted); }
.mode-tab span { font-weight: 700; color: var(--text-dark); font-size: 1rem; }
.mode-tab small { color: var(--text-muted); font-size: 0.8rem; }
.mode-tab.active {
  border-color: var(--primary); background: rgba(14,165,233,0.05);
  box-shadow: var(--shadow-primary);
}
.mode-tab.active .material-icons-outlined { color: var(--primary); }
.mode-tab:hover { border-color: var(--primary); transform: translateY(-3px); }

/* Sub Banner */
.sub-banner {
  display: flex; align-items: center; gap: 1rem; background: rgba(245,158,11,0.1);
  border: 1px solid var(--accent); border-radius: var(--radius-lg); padding: 1.25rem 1.5rem;
  margin-bottom: 2rem; flex-wrap: wrap;
}
.sub-banner .material-icons-outlined { font-size: 32px; color: var(--accent); }
.sub-banner > div { flex: 1; }
.sub-banner strong { color: var(--text-dark); font-size: 1rem; }
.sub-banner p { color: var(--text-muted); font-size: 0.9rem; }

/* Chat UI */
.chat-ui {
  max-width: 750px; margin: 0 auto; background: #fff;
  border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); overflow: hidden;
}
.chat-header {
  display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem;
  background: var(--gradient-primary); color: #fff;
}
.chat-doc-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.5); }
.chat-header > div:nth-child(2) { flex: 1; }
.chat-header strong { font-size: 1rem; }
.chat-header p { font-size: 0.8rem; opacity: 0.85; display: flex; align-items: center; gap: 0.35rem; }
.online-dot { width: 8px; height: 8px; background: #4ade80; border-radius: 50%; display: inline-block; }
.chat-header-actions { display: flex; gap: 0.5rem; }
.chat-header-actions .btn-icon { background: rgba(255,255,255,0.2); color: #fff; }
.chat-header-actions .btn-icon:hover { background: rgba(255,255,255,0.35); }

.chat-messages {
  height: 420px; overflow-y: auto; padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem;
  background: #F8FAFC;
}
.msg-date { text-align: center; font-size: 0.75rem; color: var(--text-muted); }
.chat-msg { display: flex; gap: 0.6rem; align-items: flex-end; }
.chat-msg.user { flex-direction: row-reverse; }
.msg-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.msg-bubble {
  max-width: 70%; padding: 0.75rem 1rem; border-radius: 18px; font-size: 0.9rem;
  line-height: 1.5; position: relative;
}
.chat-msg.bot .msg-bubble { background: #fff; border-radius: 4px 18px 18px 18px; box-shadow: var(--shadow-sm); }
.chat-msg.user .msg-bubble { background: var(--primary); color: #fff; border-radius: 18px 4px 18px 18px; }
.msg-time { display: block; font-size: 0.7rem; opacity: 0.6; margin-top: 4px; text-align: right; }

.typing-indicator .msg-bubble { padding: 0.75rem 1rem; }
.typing-dots { display: flex; gap: 4px; align-items: center; }
.typing-dots span {
  width: 8px; height: 8px; background: var(--text-muted); border-radius: 50%;
  animation: typingBounce 1.2s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-8px); } }

.chat-input-bar {
  display: flex; gap: 0.75rem; padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-light); background: #fff;
}
.chat-input-bar .form-input { border-radius: var(--radius-full); }

/* Call UI */
.start-call-wrap {
  max-width: 480px; margin: 0 auto; text-align: center; padding: 3rem 1rem;
}
.start-call-wrap h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.start-call-wrap p { color: var(--text-muted); margin-bottom: 1.5rem; }

.call-ui {
  max-width: 420px; margin: 0 auto; text-align: center; padding: 3rem 1rem;
  display: none;
}
.call-avatar-wrap { position: relative; width: 140px; height: 140px; margin: 0 auto 1.5rem; }
.call-avatar { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; position: relative; z-index: 2; border: 4px solid var(--primary); }
.call-ripple {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  border-radius: 50%; border: 2px solid var(--primary); opacity: 0.5;
  animation: rippleOut 2s infinite;
}
.call-ripple.delay1 { animation-delay: 0.5s; }
.call-ripple.delay2 { animation-delay: 1s; }
@keyframes rippleOut { 0% { transform: scale(1); opacity: 0.5; } 100% { transform: scale(1.8); opacity: 0; } }
.call-ui h3 { font-size: 1.4rem; margin-bottom: 0.25rem; }
.call-ui p { color: var(--text-muted); margin-bottom: 0.75rem; }
.call-status { color: var(--primary); font-weight: 600; margin-bottom: 1rem; animation: pulse 1.5s infinite; }
.call-timer { font-size: 2rem; font-weight: 700; color: var(--text-dark); margin-bottom: 1.5rem; font-family: monospace; }
.call-controls { display: flex; gap: 1.5rem; justify-content: center; align-items: center; }
.call-btn {
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem; padding: 1rem;
  border-radius: 50%; border: none; background: #E2E8F0; cursor: pointer; transition: var(--transition);
  width: 65px; height: 65px;
}
.call-btn .material-icons-outlined { font-size: 28px; }
.call-btn small { font-size: 0.7rem; }
.call-btn.call-end { background: var(--danger); color: #fff; width: 75px; height: 75px; }
.call-btn:not(.call-end):hover { background: var(--border-light); }

/* Video UI */
.video-ui { max-width: 800px; margin: 0 auto; }
.video-grid {
  display: grid; grid-template-columns: 1fr; gap: 0.75rem; border-radius: var(--radius-xl); overflow: hidden; position: relative;
}
.video-box {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; background: #0F172A;
}
.remote-video { height: 400px; }
.remote-video img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.local-video { height: 140px; width: 200px; position: absolute; bottom: 1rem; right: 1rem; }
.local-video video { width: 100%; height: 100%; object-fit: cover; }
.video-label {
  position: absolute; bottom: 0.5rem; left: 0.75rem; color: #fff; font-size: 0.8rem;
  font-weight: 600; background: rgba(0,0,0,0.4); padding: 0.2rem 0.6rem; border-radius: var(--radius-full);
}
.video-status-overlay {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15,23,42,0.7); display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: #fff; gap: 1rem;
}
.video-spinner {
  width: 48px; height: 48px; border: 3px solid rgba(255,255,255,0.2);
  border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite;
}
.video-controls {
  display: flex; gap: 1rem; justify-content: center; margin-top: 1.25rem;
}
.video-ctrl-btn {
  width: 56px; height: 56px; border-radius: 50%; border: none; background: #1E293B;
  color: #fff; cursor: pointer; transition: var(--transition); display: flex; align-items: center; justify-content: center;
}
.video-ctrl-btn .material-icons-outlined { font-size: 24px; }
.video-ctrl-btn.red { background: var(--danger); }
.video-ctrl-btn:hover { transform: scale(1.1); }

.video-preview-icon {
  width: 100px; height: 100px; border-radius: 50%; background: rgba(14,165,233,0.1);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem;
}
.video-preview-icon .material-icons-outlined { font-size: 48px; color: var(--primary); }

/* Sub Teaser */
.sub-teaser { background: #0F172A; padding: 5rem 0; margin-top: 4rem; }
.sub-teaser-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.sub-teaser-text h2 { color: #fff; font-size: 2rem; margin-bottom: 0.75rem; }
.sub-teaser-text p { color: #94A3B8; }
.sub-teaser-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.sub-teaser-card {
  background: rgba(255,255,255,0.05); border-radius: var(--radius-lg); padding: 1.25rem;
  text-align: center; border: 1px solid rgba(255,255,255,0.08);
}
.sub-teaser-card .material-icons-outlined { font-size: 32px; color: var(--primary-light); margin-bottom: 0.5rem; }
.sub-teaser-card h4 { color: #fff; font-size: 0.95rem; margin-bottom: 0.3rem; }
.sub-teaser-card p { color: #64748B; font-size: 0.8rem; }

@media (max-width: 768px) {
  .page-header h1 { font-size: 1.75rem; }
  .mode-tab { min-width: 100px; padding: 1rem; }
  .chat-messages { height: 320px; }
  .msg-bubble { max-width: 85%; }
  .sub-teaser-grid { grid-template-columns: 1fr; }
  .sub-teaser-cards { grid-template-columns: 1fr; }
  .local-video { width: 120px; height: 90px; }
  .remote-video { height: 280px; }
}
