/* Patient-facing visual system. Loaded after legacy styles and theme overrides. */
:root {
    --color-primary: #087b39;
    --color-primary-hover: #06632e;
    --color-primary-active: #064d26;
    --color-primary-light: #e7f8ec;
    --color-primary-rgb: 8, 123, 57;
    --color-text: #14231a;
    --color-text-secondary: #506457;
    --color-text-muted: #5e7265;
    --color-background: #f6f8f5;
    --color-border: #dce6e0;
    --color-border-light: #eaf0eb;
    --gradient-primary: linear-gradient(120deg, #087b39, #076630);
    --gradient-primary-subtle: linear-gradient(135deg, #e5f8ea, #f4faf5);
    --shadow-glow: 0 6px 16px rgba(8, 123, 57, .15);
    --brand-green: #00e653;
    --page-warm: #f0f6ee;
    --chat-surface: #f1f7f1;
}

[data-theme="dark"] {
    --color-text: #f2f2f2;
    --color-text-secondary: #c2c2c2;
    --color-text-muted: #a6a6a6;
    --color-background: #000000;
    --color-surface: #111111;
    --color-surface-hover: #242424;
    --color-surface-elevated: #1b1b1b;
    --color-border: #333333;
    --color-border-light: #252525;
    --color-divider: #333333;
    --color-primary-light: #203c29;
    --page-warm: #000000;
    --chat-surface: #090909;
}

html { scroll-padding-top: 100px; }
body { background: var(--color-background); }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
:where(button, a, input, select, [tabindex]):focus-visible {
    outline: 3px solid #18a54a;
    outline-offset: 4px;
}
.btn, .filter-chip, .chat-chip { transition: background .18s, border-color .18s, box-shadow .18s, transform .18s; }
.btn { min-height: 46px; border-radius: 12px; font-weight: 700; gap: 10px; }
.btn-lg { min-height: 54px; padding: 14px 24px; font-size: 1.05rem; }
.btn-primary { background: var(--gradient-primary); color: white; box-shadow: var(--shadow-glow); border: 1px solid transparent; }
.btn-primary:hover:not(:disabled) { background: var(--color-primary-hover); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(8,118,111,.2); }
.btn-secondary, [data-theme="dark"] .btn-secondary { background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border); box-shadow: none; }
.btn-glow::after { display: none; }
.btn:disabled { transform: none; cursor: wait; }
.site-header, .site-header.is-scrolled, [data-theme="dark"] .site-header, [data-theme="dark"] .site-header.is-scrolled { background: #050c07; border-bottom: 1px solid #263a2b; }
.site-header .header-nav-link { color: #c9d7cb; }
.site-header .header-nav-link:hover { color: var(--brand-green); background: #14291a; }
.site-header .theme-toggle, .site-header .header-staff-link, .site-header .mobile-menu-btn { background: #142219; border-color: #304636; color: #eef6ef; }
.site-header .hamburger-icon span { background: #eef6ef; }
.site-header .btn-primary { background: var(--brand-green); color: #05200e; box-shadow: none; }
.site-header .btn-primary:hover { background: #39f477; color: #05200e; }
.header-inner { height: 82px; gap: 24px; }
.header-logo-img { height: 48px; box-shadow: none; }
.header-logo-wrap { flex-shrink: 0; }
.header-nav-link { font-size: .95rem; white-space: nowrap; }
.header-actions { flex-shrink: 0; gap: 10px; }
.theme-toggle, .mobile-menu-btn, .header-staff-link { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }
.mobile-menu-btn { display: none; }
.hero, [data-theme="dark"] .hero {
    padding: 58px 0 64px;
    background: radial-gradient(ellipse at 5% 35%, rgba(70,185,98,.12), transparent 55%), var(--page-warm);
    border-bottom: 1px solid var(--color-border);
}
.hero-content { grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); }
.hero-text { max-width: 560px; }
.hero-badge-pill, [data-theme="dark"] .hero-badge-pill { padding: 6px 0; border: 0; background: transparent; box-shadow: none; color: var(--color-text-secondary); font-size: .9rem; }
.hero-title { font-family: 'Cairo', var(--font-arabic); font-size: clamp(2.5rem, 4.5vw, 4.1rem); line-height: 1.55; letter-spacing: normal; font-weight: 800; margin-bottom: 18px; }
.hero-title-gradient { display: block; background: none; -webkit-text-fill-color: currentColor; color: var(--color-primary); }
[data-theme="dark"] .hero-title-gradient { color: #56e685; }
.hero-description { font-size: 1.12rem; line-height: 1.85; max-width: 440px; margin-bottom: 26px; }
.hero-actions { gap: 12px; margin-bottom: 28px; }
.hero-chat-guide { border-top: 1px solid var(--color-border); padding-top: 20px; }
.hero-chat-guide-title { margin: 0 0 10px; font-weight: 700; color: var(--color-text); font-size: .95rem; }
.hero-help-list, [data-theme="dark"] .hero-help-list { padding: 0; gap: 10px 18px; border: 0; border-radius: 0; box-shadow: none; background: transparent; backdrop-filter: none; }
.hero-help-list span, [data-theme="dark"] .hero-help-list span { flex: 0 1 auto; padding: 0; background: transparent; font-weight: 500; color: var(--color-text-secondary); }
.hero-help-list span::before { content: '✓'; color: var(--color-primary); font-weight: 800; margin-inline-end: 6px; }
.hero-main-card, [data-theme="dark"] .hero-main-card { height: 490px; max-height: none; border: 1px solid var(--color-border); border-radius: 24px; box-shadow: 0 20px 50px -22px rgba(21,60,48,.32); }
.hero-card-header { padding: 18px 20px; border-bottom: 1px solid var(--color-border); }
.booking-chat-title { font-size: 1.1rem; font-weight: 800; color: var(--color-text); }
.booking-chat-status { font-size: .8rem; color: var(--color-text-secondary); display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.hero-bot-avatar { border-radius: 14px; height: 44px; width: 44px; box-shadow: none; }
.hero-chat-messages, [data-theme="dark"] .hero-chat-messages { background: var(--chat-surface); padding: 20px; gap: 14px; text-align: start; }
.chat-msg-bubble { line-height: 1.8; font-size: .98rem; border-radius: 16px; box-shadow: none; }
.chat-msg-bot .chat-msg-bubble, [data-theme="dark"] .chat-msg-bot .chat-msg-bubble { background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border); }
.chat-msg-user .chat-msg-bubble { background: var(--color-primary); color: white; }
.chat-chips { gap: 8px; }
.chat-chip, [data-theme="dark"] .chat-chip { min-height: 44px; padding: 10px 14px; font-size: .9rem; border-radius: 10px; color: var(--color-text); background: var(--color-surface); border: 1px solid var(--color-border); text-align: start; }
.chat-chip:hover, [data-theme="dark"] .chat-chip:hover { background: var(--color-primary-light); border-color: var(--color-primary); transform: none; }
.hero-chat-input-wrap { padding: 14px; }
.hero-chat-input, .chat-input { min-width: 0; min-height: 48px; font-size: 1rem; border-radius: 12px; background: var(--color-background); }
.chat-send-btn { min-width: 46px; min-height: 46px; border-radius: 12px; background: var(--color-primary); }
.quick-booking-strip { margin-top: 28px; margin-bottom: 12px; }
.quick-booking-card, [data-theme="dark"] .quick-booking-card { border: 1px solid var(--color-border); border-radius: 20px; padding: 28px; box-shadow: 0 4px 20px rgba(21,60,48,.04); }
.quick-booking-title { font-size: 1.3rem; font-weight: 800; }
.quick-booking-subtitle { font-size: .95rem; margin-top: 5px; }
.quick-label { font-size: .9rem; }
.quick-input, .quick-select { width: 100%; min-width: 0; min-height: 50px; font-size: 1rem; border-width: 1px; border-radius: 10px; background: var(--color-background); }
.quick-field { min-width: 0; }
.section-header { margin-bottom: 32px; }
.section-tag { background: none; border: 0; padding-inline: 0; color: var(--color-primary); letter-spacing: 0; }
[data-theme="dark"] .section-tag { color: #56e685; }
.section-title { font-weight: 800; font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.4; }
.section-subtitle { font-size: 1rem; color: var(--color-text-secondary); }
.services-section, .doctors-section, .testimonials-section, .clinic-info-section, .location-section, .faq-section { padding: 64px 0; }
.services-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.service-card-modern, .doctor-card, .testimonial-card, .clinic-info-card, .location-box, .faq-item { border-radius: 18px; box-shadow: none; }
.service-card-modern:hover, .doctor-card:hover, .feature-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px -14px rgba(21,60,48,.2); border-color: var(--color-primary); }
.filter-chip { min-height: 44px; border-radius: 10px; }
.filter-chip.is-active, .filter-chip:hover { box-shadow: none; }
.service-price-value { color: var(--color-primary); font-size: 1.5rem; }
[data-theme="dark"] .service-price-value { color: #56e685; }
.faq-question { min-height: 60px; font-size: 1.05rem; }
.faq-answer { color: var(--color-text-secondary); line-height: 1.9; }
.chat-fab { padding: 12px 20px; border-radius: 16px; box-shadow: 0 8px 24px rgba(8,78,68,.22); }
.chat-fab-icon { animation: none; }
.chat-fab-badge { display: none; }
.footer-desc { color: #a8bcb6; }
.site-footer { background: #050c07; }
.badge-pulse-dot, .chat-status-dot { background: var(--brand-green); }
.chat-header { background: #10291a; color: #fff; }
.chat-title, .chat-header .chat-status { color: #f0f7f1; }

/* Neutral black surfaces let the logo's green remain the accent in dark mode. */
[data-theme="dark"] .hero { background: #000000; }
[data-theme="dark"] .site-header,
[data-theme="dark"] .site-header.is-scrolled,
[data-theme="dark"] .site-footer { background: #000000; border-color: var(--color-border); }
[data-theme="dark"] .site-header .theme-toggle,
[data-theme="dark"] .site-header .header-staff-link,
[data-theme="dark"] .site-header .mobile-menu-btn,
[data-theme="dark"] .chat-header,
[data-theme="dark"] option { background: var(--color-surface); border-color: var(--color-border); }

@media (max-width: 1100px) {
    .header-nav, .header-staff-link { display: none; }
    .mobile-menu-btn { display: inline-flex; }
}
@media (max-width: 992px) {
    .hero-content { grid-template-columns: 1fr; gap: 32px; }
    .hero-text { max-width: 640px; margin-inline: auto; }
    .hero-description { margin-inline: auto; }
    .hero-help-list { justify-content: center; }
    .hero-visual { width: 100%; max-width: 600px; margin-inline: auto; }
    .hero-main-card { height: 460px; }
    .quick-booking-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .container { padding-inline: 20px; }
    .header-inner { height: 70px; gap: 12px; }
    .header-logo-img { width: 102px; height: auto; }
    .header-actions { gap: 6px; }
    #header-book-btn { padding: 10px 12px; font-size: .9rem; }
    #header-book-btn > span { display: none; }
    .hero, [data-theme="dark"] .hero { padding: 28px 0 32px; }
    .hero-title { font-size: 2.5rem; }
    .hero-description { font-size: 1rem; margin-bottom: 20px; }
    .hero-actions { gap: 10px; margin-bottom: 22px; }
    .hero-actions .btn { width: 100%; min-height: 48px; }
    .hero-help-list { gap: 8px 14px; }
    .hero-main-card, [data-theme="dark"] .hero-main-card { height: 440px; border-radius: 18px; }
    .hero-card-header { padding: 14px 12px; gap: 8px; }
    .hero-card-bot-info { gap: 8px; }
    .booking-chat-title { font-size: 1rem; }
    .hero-chat-messages { padding: 14px; }
    .quick-booking-card, [data-theme="dark"] .quick-booking-card { padding: 20px; }
    .quick-booking-grid, .services-grid, .doctors-grid, .testimonials-grid { grid-template-columns: minmax(0, 1fr); }
    .services-section, .doctors-section, .testimonials-section, .clinic-info-section, .location-section, .faq-section { padding: 44px 0; }
    .chat-fab { bottom: max(16px, env(safe-area-inset-bottom)); left: 16px; padding: 10px 16px; }
    .footer-bottom { flex-direction: column; gap: 16px; align-items: flex-start; padding-bottom: 64px; }
}
@media (max-width: 360px) {
    .header-inner { gap: 6px; }
    .header-actions { gap: 4px; }
    .header-logo-img { width: 86px; }
    .site-header .theme-toggle, .site-header .mobile-menu-btn { min-width: 40px; width: 40px; }
    .hero-title { font-size: 2.2rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
