/* ═══════════════════════════════════════════════════════════════════
   INDHEAL — wwwroot/css/hospital-list.css
   Hospitals list (/hospitals). Moved from the inline <style> in
   Views/Hospital/Index.cshtml (the card fade-in that depended on the old
   inline script is dropped), plus destination toggle, country label,
   partner-stays badge and the compare button.
   ═══════════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════════
   HOSPITAL LIST PAGE — SCOPED STYLES
   ═══════════════════════════════════════════════════════════════ */

/* ── HERO ────────────────────────────────────────────────────── */
.tl-hero {
    position: relative;
    padding: 4.5rem 0 3.5rem;
    background: linear-gradient(160deg, #f0fdf7 0%, #ffffff 65%);
    overflow: hidden;
}
.tl-hero__bg {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 90% 20%, rgba(29,158,117,0.08) 0%, transparent 50%),
        radial-gradient(circle at 10% 80%, rgba(29,158,117,0.05) 0%, transparent 40%);
    pointer-events: none;
}
.tl-hero__inner { position: relative; z-index: 1; }
.tl-hero__eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--color-primary);
    background: rgba(29,158,117,0.08);
    padding: 0.28rem 0.75rem;
    border-radius: 100px;
    margin-bottom: 1rem;
}
.tl-hero__heading {
    font-size: clamp(1.9rem, 4vw, 2.9rem);
    font-weight: 600;
    color: var(--color-text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.15;
}
.tl-hero__sub {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    max-width: 58ch;
    line-height: 1.65;
    margin-bottom: 2rem;
}
.tl-hero__stat-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.tl-hero__stat strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}
.tl-hero__stat span {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}
.tl-hero__stat-divider {
    width: 1px;
    height: 2.5rem;
    background: var(--color-border, #e0ebe6);
}

/* ── FILTER BAR ──────────────────────────────────────────────── */
.tl-filters {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid var(--color-border, #e0ebe6);
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.tl-filters__inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding-top: 0.875rem;
    padding-bottom: 0.75rem;
    flex-wrap: wrap;
}

/* Search */
.tl-filters__search {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 340px;
}
.tl-filters__search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px; height: 16px;
    color: var(--color-text-muted);
    pointer-events: none;
}
.tl-filters__search-input {
    width: 100%;
    padding: 0.5rem 2.25rem 0.5rem 2.2rem;
    border: 1.5px solid var(--color-border, #dde8e3);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--color-text-dark);
    background: var(--color-bg-light, #f8fdfb);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
/* 16px on phones, so iOS does not zoom in when the search is tapped */
@media (max-width: 767px) {
    .tl-filters .tl-filters__search-input { font-size: 16px; }
}
.tl-filters__search-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(29,158,117,0.12);
}
.tl-filters__search-clear {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1;
    padding: 0.2rem;
}

/* Ayurveda toggle */
.tl-filters__toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
}
.tl-filters__toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.tl-filters__toggle-track {
    display: inline-block;
    width: 38px; height: 22px;
    border-radius: 100px;
    background: var(--color-border, #ccddd6);
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}
.tl-filters__toggle-track::after {
    content: '';
    position: absolute;
    left: 3px; top: 3px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.tl-filters__toggle input:checked ~ .tl-filters__toggle-track {
    background: var(--color-primary);
}
.tl-filters__toggle input:checked ~ .tl-filters__toggle-track::after {
    transform: translateX(16px);
}
.tl-filters__toggle-label {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--color-text-dark);
    white-space: nowrap;
}

/* Group tabs */
.tl-filters__tabs-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-top: 1px solid var(--color-border, #e8eeec);
}
.tl-filters__tabs-wrap::-webkit-scrollbar { display: none; }
.tl-filters__tabs {
    display: flex;
    gap: 0;
    padding: 0 var(--container-padding, 1.5rem);
    min-width: max-content;
}
.tl-filters__tab {
    background: none;
    border: none;
    border-bottom: 2.5px solid transparent;
    padding: 0.65rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--color-text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
    margin-bottom: -1px;
}
.tl-filters__tab:hover { color: var(--color-primary); }
.tl-filters__tab--active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    font-weight: 600;
}

/* ── RESULTS BAR ─────────────────────────────────────────────── */
.tl-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--color-border, #e8eeec);
}
.tl-results-bar__count {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin: 0;
}
.tl-results-bar__count strong { color: var(--color-text-dark); }
.tl-results-bar__reset {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-primary);
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── GRID ────────────────────────────────────────────────────── */
.tl-grid-section { padding: 2rem 0 4rem; }
.tl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

/* ── CARD ────────────────────────────────────────────────────── */
.tl-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1.5px solid var(--color-border, #e0ebe6);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
    cursor: pointer;
}
.tl-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.10);
    transform: translateY(-3px);
    border-color: var(--color-primary);
}
.tl-card:focus-visible {
    outline: 2.5px solid var(--color-primary);
    outline-offset: 3px;
}
.tl-card[hidden] { display: none; }

/* Full-width image banner */
.tl-card__img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--color-bg-subtle, #f0f4f8);
    overflow: hidden;
    flex-shrink: 0;
}
.tl-card__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.75rem;
    display: block;
}
.tl-card__img-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-hint, #aab8c2);
}
.tl-card__img-fallback svg {
    width: 40px;
    height: 40px;
}

/* Badges overlaid on image — top-right corner */
.tl-card__badges {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-end;
}
.tl-card__badge {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.18rem 0.5rem;
    border-radius: 100px;
    line-height: 1.4;
}
.tl-card__badge--jci {
    background: #e8f4fd;
    color: #0369a1;
    border: 1px solid #bae0fb;
}
.tl-card__badge--nabh {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.tl-card__badge--ayurveda {
    background: #fff8e6;
    color: #b45309;
    border: 1px solid #f5d27a;
}

/* Card body */
.tl-card__body {
    padding: 0.875rem 1rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.tl-card__name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--color-text-dark);
    line-height: 1.3;
    margin: 0;
}
.tl-card__group {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ── EMPTY STATE ─────────────────────────────────────────────── */
.tl-empty {
    text-align: center;
    padding: 4rem 1rem;
}
.tl-empty__icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.tl-empty__msg {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: 1.25rem;
}

/* ── CTA STRIP ───────────────────────────────────────────────── */
.tl-cta-strip {
    background: var(--color-bg-light, #f0fdf7);
    border-top: 1px solid var(--color-border, #d6ede4);
    padding: 1.5rem 0;
}
.tl-cta-strip__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.tl-cta-strip__text strong {
    display: block;
    font-size: 1rem;
    color: var(--color-text-dark);
}
.tl-cta-strip__text span {
    font-size: 0.88rem;
    color: var(--color-text-muted);
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .tl-hero { padding: 3rem 0 2.5rem; }
    .tl-hero__stat-divider { display: none; }
    .tl-filters__inner { gap: 0.75rem; }
    .tl-filters__search { max-width: 100%; }
    .tl-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }
    .tl-cta-strip__inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
    .tl-grid { grid-template-columns: 1fr 1fr; }
    .tl-card__img-wrap { aspect-ratio: 4 / 3; }
}


/* ── Destination toggle ──────────────────────────────────────── */
.tl-filters__dest {
    display: inline-flex;
    border: 1.5px solid var(--color-border, #dde8e3);
    border-radius: 100px;
    padding: 2px;
    background: var(--color-bg-light, #f8fdfb);
    flex-shrink: 0;
}
.tl-dest {
    background: none;
    border: none;
    border-radius: 100px;
    padding: 0.32rem 0.9rem;
    font-size: 0.84rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.tl-dest:hover { color: var(--color-primary); }
.tl-dest--active { background: var(--color-primary); color: #fff; }
.tl-dest--active:hover { color: #fff; }
.tl-filters__tab[hidden] { display: none; }

/* ── Card with compare button ────────────────────────────────── */
.hl-card { display: flex; flex-direction: column; min-width: 0; }
.hl-card[hidden] { display: none; }
.hl-card .tl-card { flex: 1; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.hl-card .tl-card:hover { transform: none; }
.hl-card__country {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
}
.hl-card__stays {
    align-self: flex-start;
    margin-top: 0.35rem;
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    font-size: 0.76rem;
    padding: 0.3rem 0.55rem;
    border-radius: 6px;
    background: #D1FAE5;
    color: #065F46;
}
.hl-compare {
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 500;
    padding: 0.7rem;
    border: 1.5px solid var(--color-border, #e0ebe6);
    border-top: 1px solid var(--color-border, #e0ebe6);
    border-radius: 0 0 14px 14px;
    background: #fff;
    color: #006FA8;
    cursor: pointer;
    transition: background 0.15s;
}
.hl-compare:hover { background: #f5fafd; }
.hl-compare.is-on { background: #E0F1F9; color: #0A354B; }

@media (max-width: 768px) {
    .tl-filters__dest { order: -1; }
}
