/* ============================================================
   Thyrocare Channel Partner
   Homepage Cards — Frontend Styles  v0.2.5
   Layout: matches / exceeds diagnosticcentres.in
   ============================================================ */

/* Google Font (loaded by enqueue hook if not already) */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

/* ── CSS variables ────────────────────────────────────────── */
.tcp-home-cards {
    --hc-accent:      #003f6d;
    --hc-accent-h:    #002d50;
    --hc-green:       #059669;
    --hc-red:         #dc2626;
    --hc-gray:        #6b7280;
    --hc-border:      #e5e7eb;
    --hc-bg:          #ffffff;
    --hc-radius:      10px;
    --hc-img-h:       200px;
    --hc-shadow:      0 1px 6px rgba(0,0,0,.07);
    --hc-shadow-h:    0 10px 30px rgba(0,63,109,.14);
    --hc-gap:         20px;
    --hc-transition:  280ms ease;
    font-family: 'Manrope', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
}

/* ── Grid ─────────────────────────────────────────────────── */
.tcp-hc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--hc-gap);
    padding: 4px 2px 8px;
    list-style: none;
    margin: 0;
}

@media (max-width: 1024px) {
    .tcp-hc-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 640px) {
    .tcp-home-cards { --hc-img-h: 180px; }
    .tcp-hc-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

/* ── Card ─────────────────────────────────────────────────── */
.tcp-hc-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--hc-bg);
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius);
    overflow: hidden;
    box-shadow: var(--hc-shadow);
    transition: transform var(--hc-transition), box-shadow var(--hc-transition);
}

.tcp-hc-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hc-shadow-h);
}

/* ── Image wrap ───────────────────────────────────────────── */
.tcp-hc-img-wrap {
    position: relative;
    height: var(--hc-img-h);
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    flex-shrink: 0;
}

.tcp-hc-img-wrap.tcp-hc-no-img {
    background: linear-gradient(145deg, #003f6d 0%, #005a9e 60%, #0077cc 100%);
}

.tcp-hc-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--hc-transition);
}

.tcp-hc-card:hover .tcp-hc-img {
    transform: scale(1.05);
}

/* ── Badge ── top-right corner, compact ───────────────────── */
.tcp-hc-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    background: #c53030;
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,.22);
}

/* ── Package type label ── bottom-right of image ─────────── */
.tcp-hc-type-tag {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,.48);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 6px 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Card body ────────────────────────────────────────────── */
.tcp-hc-card-body {
    display: flex;
    flex-direction: column;
    padding: 14px 16px 12px;
    gap: 9px;
    flex: 1;
}

/* ── Title ────────────────────────────────────────────────── */
.tcp-hc-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    line-height: 1.35;
    letter-spacing: -0.1px;
}

/* ── Description (excerpt below title) ───────────────────── */
.tcp-hc-desc {
    margin: 0;
    font-size: 12.5px;
    color: #6b7280;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Tests pill ───────────────────────────────────────────── */
.tcp-hc-tests-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 12.5px;
    font-weight: 600;
    color: #374151;
    background: #f9fafb;
    align-self: flex-start;
}

.tcp-hc-tests-pill svg {
    width: 13px !important;
    height: 13px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    color: var(--hc-accent) !important;
    flex-shrink: 0 !important;
}

/* ── Pricing section ──────────────────────────────────────── */
.tcp-hc-pricing-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: auto;
}

/* Row 1: MRP ~~strikethrough~~ · Final · XX% off */
.tcp-hc-price-row {
    display: flex;
    align-items: baseline;
    gap: 7px;
    flex-wrap: wrap;
    line-height: 1;
}

.tcp-hc-mrp {
    color: #9ca3af;
    text-decoration: line-through;
    font-size: 13.5px;
    font-weight: 400;
}

.tcp-hc-price {
    color: var(--hc-accent);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.tcp-hc-off {
    color: var(--hc-red);
    font-size: 12.5px;
    font-weight: 700;
}

/* Row 2: Rs. XXXX per person for 2 or more  [Book Now →] */
.tcp-hc-group-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: nowrap;
}

.tcp-hc-group-price {
    color: var(--hc-green);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

/* ── Book Now button (compact, inline) ────────────────────── */
.tcp-hc-book-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    background: var(--hc-accent);
    color: #fff !important;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.2px;
    transition: background var(--hc-transition);
}

.tcp-hc-book-btn:hover,
.tcp-hc-book-btn:focus {
    background: var(--hc-accent-h);
    color: #fff !important;
    text-decoration: none !important;
}

/* Fallback when no URL / no price */
.tcp-hc-book-btn-full {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: var(--hc-accent);
    color: #fff !important;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background var(--hc-transition);
}

.tcp-hc-book-btn-full:hover {
    background: var(--hc-accent-h);
    color: #fff !important;
}

.tcp-hc-price-na {
    color: #9ca3af;
    font-size: 12.5px;
    font-style: italic;
    margin: 0;
}

/* ── Trust strip — vertical checkmarks ────────────────────── */
.tcp-hc-trust {
    display: flex;
    flex-direction: column;
    gap: 3px;
    border-top: 1px solid var(--hc-border);
    padding-top: 9px;
}

.tcp-hc-trust-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
    line-height: 1.3;
}

.tcp-hc-trust-item svg {
    width: 12px !important;
    height: 12px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    color: var(--hc-green) !important;
    flex-shrink: 0 !important;
}

/* ── Responsive fine-tuning ───────────────────────────────── */
@media (max-width: 768px) {
    .tcp-hc-card-body { padding: 12px 14px 10px; gap: 8px; }
    .tcp-hc-title { font-size: 13.5px; }
    .tcp-hc-price { font-size: 20px; }
}

@media (max-width: 480px) {
    .tcp-hc-group-row { flex-wrap: wrap; }
    .tcp-hc-book-btn  { width: 100%; justify-content: center; padding: 9px 12px; }
    .tcp-hc-group-price { width: 100%; }
}

/* ── Accessibility: reduce motion ─────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .tcp-hc-card,
    .tcp-hc-img,
    .tcp-hc-book-btn,
    .tcp-hc-book-btn-full { transition: none; }
    .tcp-hc-card:hover     { transform: none; }
    .tcp-hc-card:hover .tcp-hc-img { transform: none; }
}
