/* ==========================================================================
   components.css — buttons, cards, chips, tabs, accordion, forms, timeline
   ========================================================================== */

/* ================================ buttons ================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px; border-radius: var(--r-pill);
  font-weight: 700; font-size: var(--fs-sm); line-height: 1.2;
  text-align: center; white-space: nowrap;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), background .22s var(--ease), color .22s var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--grad-primary); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--c-primary) 32%, transparent); }
.btn--primary:hover { color: #fff; box-shadow: 0 12px 26px color-mix(in srgb, var(--c-primary) 42%, transparent); }

.btn--ghost { background: var(--c-surface); color: var(--c-primary); border: 1.5px solid var(--c-line); }
.btn--ghost:hover { border-color: var(--c-primary); color: var(--c-primary); background: var(--c-primary-soft); }

.btn--accent { background: var(--c-accent); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--c-accent) 34%, transparent); }
.btn--accent:hover { color: #fff; }

.btn--light { background: #fff; color: var(--c-primary-dark); }
.btn--light:hover { color: var(--c-primary-dark); }

.btn--outline-light { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.42); }
.btn--outline-light:hover { background: rgba(255,255,255,.12); color: #fff; }

.btn--sm { padding: 9px 17px; font-size: var(--fs-xs); }
.btn--lg { padding: 16px 32px; font-size: var(--fs-md); }
.btn--block { width: 100%; }

/* ================================= cards ================================= */
.card {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--r-lg); padding: 26px;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s var(--ease);
}
.card--hover:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--c-primary) 34%, var(--c-line)); }
.card--flat { background: var(--c-surface-2); border-color: transparent; }
.card--glass { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }

.card__icon {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: var(--c-primary-soft); color: var(--c-primary); margin-bottom: 16px;
}
.card__icon svg { width: 23px; height: 23px; }
.card__icon--accent { background: var(--c-accent-soft); color: var(--c-accent); }
.card__title { font-weight: 700; font-size: var(--fs-lg); margin-bottom: 8px; line-height: 1.4; }
.card__text { font-size: var(--fs-sm); color: var(--c-ink-2); line-height: 1.75; }
.card__list { margin-top: 14px; display: grid; gap: 8px; }
.card__list li { display: flex; gap: 8px; font-size: var(--fs-sm); color: var(--c-ink-2); }
.card__list svg { width: 16px; height: 16px; color: var(--c-primary); flex: none; margin-top: 4px; }

/* ================================= badges ================================= */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: 700; line-height: 1.5;
  background: var(--c-primary-soft); color: var(--c-primary);
}
.badge--accent { background: var(--c-accent-soft); color: var(--c-accent); }
.badge--line { background: transparent; border: 1px solid var(--c-line); color: var(--c-muted); }
.badge--ink { background: rgba(255,255,255,.12); color: #fff; }
.badge svg { width: 13px; height: 13px; }

/* ============================== stat blocks ============================== */
.stat { text-align: center; }
.stat__num {
  font-size: clamp(1.9rem, 1.2rem + 2vw, 2.9rem); font-weight: 800; line-height: 1;
  color: var(--c-primary); letter-spacing: -.02em;
}
.stat__num sup { font-size: .5em; top: -.7em; }
.stat__label { margin-top: 9px; font-size: var(--fs-sm); color: var(--c-muted); font-weight: 600; }
.stat--light .stat__num { color: #fff; }
.stat--light .stat__label { color: rgba(255,255,255,.7); }

.trustbar {
  display: grid; gap: 20px; grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 30px clamp(18px, 3vw, 40px); border-radius: var(--r-xl);
  background: var(--c-surface); border: 1px solid var(--c-line); box-shadow: var(--shadow-md);
  margin-top: -58px; position: relative; z-index: 5;
}
.trustbar__div { border-inline-end: 1px solid var(--c-line); }
@media (max-width: 860px) { .trustbar { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: -34px; } .trustbar__div { border: 0; } }

/* ================================== tabs ================================== */
.tabs { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 26px; }
.tab {
  padding: 9px 18px; border-radius: var(--r-pill); border: 1px solid var(--c-line);
  background: var(--c-surface); font-size: var(--fs-sm); font-weight: 600; color: var(--c-ink-2);
  transition: all .22s var(--ease);
}
.tab:hover { border-color: var(--c-primary); color: var(--c-primary); }
.tab.is-active { background: var(--grad-primary); color: #fff; border-color: transparent; box-shadow: 0 6px 16px color-mix(in srgb, var(--c-primary) 28%, transparent); }
.tab__count { opacity: .65; font-size: .85em; margin-inline-start: 5px; }
/* On phones 11 city tabs wrapped into 4 rows (211px tall). Swipe instead. */
@media (max-width: 760px) {
  .tabs {
    flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
    scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1);
    padding: 2px var(--gutter) 8px;
    gap: 8px;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; scroll-snap-align: start; }
}

/* ================================ accordion ================================ */
.acc { border: 1px solid var(--c-line); border-radius: var(--r-lg); overflow: hidden; background: var(--c-surface); }
.acc__item + .acc__item { border-top: 1px solid var(--c-line); }
.acc__btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 19px 22px; text-align: start; font-weight: 600; font-size: var(--fs-md); color: var(--c-ink);
  transition: background .2s var(--ease);
}
.acc__btn:hover { background: var(--c-surface-2); }
.acc__btn[aria-expanded="true"] { color: var(--c-primary); }
.acc__q { display: flex; align-items: flex-start; gap: 12px; }
.acc__idx {
  width: 24px; height: 24px; border-radius: 7px; flex: none; display: grid; place-items: center;
  background: var(--c-primary-soft); color: var(--c-primary); font-size: var(--fs-xs); font-weight: 800;
}
.acc__chev { width: 18px; height: 18px; flex: none; color: var(--c-muted); transition: transform .3s var(--ease); }
.acc__btn[aria-expanded="true"] .acc__chev { transform: rotate(180deg); color: var(--c-primary); }
.acc__panel { overflow: hidden; height: 0; transition: height .34s var(--ease); }
.acc__inner { padding: 0 22px 22px 58px; font-size: var(--fs-sm); color: var(--c-ink-2); line-height: 1.85; }
html[dir="rtl"] .acc__inner { padding: 0 58px 22px 22px; }
@media (max-width: 640px) { .acc__inner { padding-inline: 22px; } html[dir="rtl"] .acc__inner { padding-inline: 22px; } }

/* ================================ timeline ================================ */
.tl { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); counter-reset: step; }
.tl--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tl__item {
  position: relative; background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--r-lg); padding: 24px 22px;
}
.tl__item::before {
  content: ''; position: absolute; top: 34px; inset-inline-end: -18px; width: 18px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--c-line) 0 4px, transparent 4px 8px);
}
.tl__item:nth-child(3n)::before { display: none; }
.tl__num {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: var(--grad-primary); color: #fff; font-weight: 800; font-size: var(--fs-md);
  box-shadow: 0 6px 14px color-mix(in srgb, var(--c-primary) 30%, transparent);
}
.tl__dur {
  display: inline-block; margin-top: 12px; font-size: var(--fs-xs); font-weight: 700;
  color: var(--c-accent); background: var(--c-accent-soft); padding: 3px 10px; border-radius: var(--r-pill);
}
.tl__title { margin-top: 12px; font-weight: 700; font-size: var(--fs-md); line-height: 1.45; }
.tl__text { margin-top: 7px; font-size: var(--fs-sm); color: var(--c-ink-2); line-height: 1.7; }
.tl__who { margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--c-line); font-size: var(--fs-xs); color: var(--c-muted); }
@media (max-width: 980px) { .tl, .tl--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tl__item::before { display: none; } }
@media (max-width: 640px) { .tl, .tl--6 { grid-template-columns: 1fr; } }

/* ============================ two-column compare ============================ */
.vs { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vs__col { border-radius: var(--r-lg); padding: 24px; border: 1px solid var(--c-line); background: var(--c-surface); }
.vs__col--us { border-color: color-mix(in srgb, var(--c-primary) 40%, var(--c-line)); background: var(--c-primary-soft); }
.vs__head { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; font-weight: 700; font-size: var(--fs-md); }
.vs__head svg { width: 22px; height: 22px; flex: none; }
.vs__col--us .vs__head { color: var(--c-primary); }
.vs__list li { display: flex; gap: 9px; padding: 7px 0; font-size: var(--fs-sm); color: var(--c-ink-2); line-height: 1.6; }
.vs__list svg { width: 17px; height: 17px; flex: none; margin-top: 3px; }
.vs__list .y { color: var(--c-primary); }
.vs__list .n { color: var(--c-muted); }
@media (max-width: 760px) { .vs { grid-template-columns: 1fr; } }

/* ================================== forms ================================== */
.form { display: grid; gap: 15px; }
.form__row { display: grid; gap: 15px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 620px) { .form__row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 7px; }
.field__label { font-size: var(--fs-xs); font-weight: 700; color: var(--c-ink-2); letter-spacing: .02em; }
.field__label span { color: var(--c-accent); }
.field__ctrl {
  width: 100%; padding: 12px 14px; border-radius: var(--r-md);
  border: 1.5px solid var(--c-line); background: var(--c-surface);
  font-size: var(--fs-sm); color: var(--c-ink);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field__ctrl::placeholder { color: color-mix(in srgb, var(--c-muted) 70%, transparent); }
.field__ctrl:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 4px var(--c-primary-soft); }
textarea.field__ctrl { min-height: 118px; resize: vertical; }
select.field__ctrl { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B817C' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-inline-end: 38px; }
html[dir="rtl"] select.field__ctrl { background-position: left 14px center; }
.form__note { font-size: var(--fs-xs); color: var(--c-muted); line-height: 1.7; }
.form__ok {
  display: none; align-items: flex-start; gap: 11px; padding: 14px 16px; border-radius: var(--r-md);
  background: var(--c-primary-soft); border: 1px solid color-mix(in srgb, var(--c-primary) 30%, transparent);
  font-size: var(--fs-sm); color: var(--c-primary-dark); line-height: 1.7;
}
.form__ok.is-on { display: flex; animation: jy-in .35s var(--ease); }
.form__ok svg { width: 19px; height: 19px; flex: none; margin-top: 2px; }

/* ============================== contact block ============================== */
.contact-grid { display: grid; gap: clamp(26px, 4vw, 48px); grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); align-items: start; }
@media (max-width: 940px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-xl);
  padding: clamp(24px, 3vw, 36px); box-shadow: var(--shadow-sm);
}
.contact-way { display: flex; gap: 14px; align-items: flex-start; padding: 15px 0; border-bottom: 1px dashed var(--c-line); }
.contact-way:last-of-type { border-bottom: 0; }
.contact-way__icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--c-primary-soft); color: var(--c-primary); flex: none; }
.contact-way__icon svg { width: 20px; height: 20px; }
.contact-way__t { font-size: var(--fs-xs); color: var(--c-muted); font-weight: 600; }
.contact-way__v { font-size: var(--fs-md); font-weight: 700; color: var(--c-ink); word-break: break-all; }
.contact-way__v a { color: var(--c-primary); }
.contact-way__s { font-size: var(--fs-xs); color: var(--c-muted); }

/* ============================== steps list ============================== */
.steps { display: grid; gap: 12px; }
.step { display: flex; gap: 13px; align-items: flex-start; }
.step__n {
  width: 27px; height: 27px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--c-surface); border: 1.5px solid var(--c-primary); color: var(--c-primary);
  font-size: var(--fs-xs); font-weight: 800;
}
.step__b { font-size: var(--fs-sm); color: var(--c-ink-2); line-height: 1.7; }
.step__b b { color: var(--c-ink); }

/* ============================== quote / story ============================== */
.story { position: relative; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: 26px; }
.story__mark { position: absolute; top: 14px; inset-inline-end: 18px; font-size: 3rem; line-height: 1; color: var(--c-primary-soft); font-weight: 800; }
.story__text { font-size: var(--fs-sm); color: var(--c-ink-2); line-height: 1.85; }
.story__foot { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--c-line); display: flex; align-items: center; gap: 11px; }
.story__av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--c-primary-soft); color: var(--c-primary); font-weight: 800; font-size: var(--fs-sm); flex: none; }
.story__n { font-weight: 700; font-size: var(--fs-sm); }
.story__m { font-size: var(--fs-xs); color: var(--c-muted); }

/* ============================== lang switcher ============================== */
.lang { position: relative; }
.lang__btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px;
  border-radius: var(--r-pill); border: 1px solid var(--c-line); background: var(--c-surface);
  font-size: var(--fs-sm); font-weight: 600; color: var(--c-ink-2);
}
.lang__btn:hover { border-color: var(--c-primary); color: var(--c-primary); }
.lang__btn svg { width: 16px; height: 16px; }
.lang__chev { transition: transform .25s var(--ease); }
.lang__btn[aria-expanded="true"] .lang__chev { transform: rotate(180deg); }
.lang__menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 60;
  min-width: 210px; max-width: min(260px, calc(100vw - 32px));
  max-height: min(340px, calc(100dvh - 120px)); overflow-y: auto;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); padding: 6px; display: none;
}
.lang__menu.is-open { display: block; animation: jy-in .2s var(--ease); }
.lang__opt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  padding: 9px 12px; border-radius: var(--r-sm); font-size: var(--fs-sm); color: var(--c-ink-2); text-align: start;
}
.lang__opt:hover { background: var(--c-surface-2); color: var(--c-primary); }
.lang__opt.is-on { background: var(--c-primary-soft); color: var(--c-primary); font-weight: 700; }
.lang__opt small { display: block; font-size: var(--fs-xs); color: var(--c-muted); font-weight: 400; }
.lang__check { width: 15px; height: 15px; flex: none; opacity: 0; }
.lang__opt.is-on .lang__check { opacity: 1; }

/* ============================== misc pieces ============================== */
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  font-size: var(--fs-xs); font-weight: 600; padding: 5px 12px; border-radius: var(--r-pill);
  background: var(--c-surface-2); border: 1px solid var(--c-line); color: var(--c-ink-2);
}
.pill--accent { background: var(--c-accent-soft); border-color: transparent; color: var(--c-accent); }

.note {
  display: flex; gap: 11px; padding: 15px 17px; border-radius: var(--r-md);
  background: var(--c-accent-soft); border: 1px dashed color-mix(in srgb, var(--c-accent) 45%, transparent);
  font-size: var(--fs-sm); color: var(--c-ink-2); line-height: 1.75;
}
.note svg { width: 18px; height: 18px; flex: none; color: var(--c-accent); margin-top: 2px; }
.note--info { background: var(--c-primary-soft); border-color: color-mix(in srgb, var(--c-primary) 38%, transparent); }
.note--info svg { color: var(--c-primary); }

.hosp {
  display: flex; gap: 15px; padding: 18px; border-radius: var(--r-lg);
  background: var(--c-surface); border: 1px solid var(--c-line);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.hosp:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--c-primary) 34%, var(--c-line)); }
.hosp__logo {
  width: 46px; height: 46px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: var(--c-surface-2); border: 1px solid var(--c-line); color: var(--c-primary);
}
.hosp__logo svg { width: 22px; height: 22px; }
.hosp__name { font-weight: 700; font-size: var(--fs-md); line-height: 1.45; margin-bottom: 6px; }
.hosp__meta { font-size: var(--fs-xs); color: var(--c-muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.hosp__city { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--c-primary); }

/* inline icons that no component block sizes explicitly */
.topbar__meta svg, .footer__bottom svg, .footer__mail svg {
  width: 14px; height: 14px; display: inline-block; vertical-align: -2px; flex: none;
}
.hosp__city svg { width: 13px; height: 13px; }
.tl__who { display: flex; align-items: center; gap: 6px; }
.tl__who svg { width: 14px; height: 14px; }
.hosp__flag { font-size: .9em; }
.hosp.is-first { border-color: var(--c-accent); background: linear-gradient(180deg, var(--c-accent-soft), var(--c-surface) 60%); }

/* "show more / show fewer" control under the hospital grid */
.hosp-more { margin-top: 26px; }
.hosp-more__count {
  display: inline-block; margin-inline-start: 8px; padding: 1px 8px; border-radius: 999px;
  background: var(--c-primary-soft); color: var(--c-primary); font-size: var(--fs-xs); font-weight: 700;
}
.hosp-more__count:empty { display: none; }

.cta-band {
  position: relative; overflow: hidden; border-radius: var(--r-xl); padding: clamp(30px, 4vw, 52px);
  background: var(--grad-primary); color: #fff; text-align: center;
}
.cta-band::after {
  content: ''; position: absolute; width: 380px; height: 380px; border-radius: 50%;
  top: -190px; inset-inline-end: -90px; background: rgba(255,255,255,.09);
}
.cta-band__in { position: relative; max-width: 720px; margin-inline: auto; }
.cta-band h3 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.85); margin-top: 12px; font-size: var(--fs-lg); }
.cta-band .btn { margin-top: 26px; }

/* RTL helpers for components that use physical properties */
html[dir="rtl"] .acc__chev { transform: none; }
html[dir="rtl"] .acc__btn[aria-expanded="true"] .acc__chev { transform: rotate(180deg); }
html[dir="rtl"] .stat__num { direction: ltr; }
html[dir="rtl"] .tl__num { direction: ltr; }
html[dir="rtl"] .plancard__num { direction: ltr; }

/* ======================== compact spacing on phones ======================== */
@media (max-width: 640px) {
  .card { padding: 20px; }
  .tl__item { padding: 20px 18px; }
  .vs__col { padding: 20px; }
  .story { padding: 20px; }
  .story__mark { font-size: 2.2rem; inset-inline-end: 14px; }
  .hosp { padding: 16px; gap: 12px; }
  .hosp__logo { width: 42px; height: 42px; }
  .contact-card { padding: 22px 18px; }
  .cta-band { padding: 28px 20px; }
  .cta-band p { font-size: var(--fs-md); }
  .acc__btn { padding-inline: 16px; gap: 12px; }
  .sec-head__sub { font-size: var(--fs-md); }
  .trustbar { padding: 22px 16px; gap: 16px; margin-top: -28px; }
  .plancard { padding: 20px; }
}

/* ===================== touch comfort & iOS input zoom =====================
   These live here (last stylesheet) so they win over layout.css/components
   rules that set conflicting padding and size values.
   ========================================================================= */
@media (max-width: 900px) {
  /* iOS zooms the whole page when a focused control renders below 16px */
  input.field__ctrl, select.field__ctrl, textarea.field__ctrl { font-size: 16px; }

  .btn--sm { padding: 12px 18px; }
  .lang__btn { min-height: 44px; }
  .drawer__close { width: 44px; height: 44px; top: 16px; inset-inline-end: 16px; }
  .acc__btn { padding-block: 17px; }
  .tab { min-height: 44px; display: inline-flex; align-items: center; }
  .footer__list a, .topbar a { display: inline-block; padding-block: 7px; }
  .footer__list li { margin-bottom: 3px; }
  .footer__bottom { gap: 10px; }
}
