/* =====================================================
   TayyariPoint Courses — Card Styles  v1.1
   ALL selectors scoped under .tpc-wrap to prevent
   bleeding into Elementor / theme headings.
   ===================================================== */

/* ── Variables (scoped to wrapper, NOT :root) ───────── */
.tpc-wrap {
    --tpc-blue: #1D4ED8;
    --tpc-blue-dark: #173fae;
    --tpc-blue-tint: #EFF4FF;
    --tpc-amber: #F59E0B;
    --tpc-amber-dark: #b8730a;
    --tpc-amber-tint: #FEF6E7;
    --tpc-green: #16A34A;
    --tpc-green-tint: #EAF7EF;
    --tpc-ink: #0F172A;
    --tpc-slate: #64748B;
    --tpc-slate-light: #94A3B8;
    --tpc-line: #E2E8F0;
    --tpc-grey-tint: #F1F5F9;
    --tpc-card-bg: #FFFFFF;
}

/* ── Hard reset: kill any inherited theme bleed ─────── */
.tpc-wrap,
.tpc-wrap *,
.tpc-wrap *::before,
.tpc-wrap *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    text-decoration: none;
    list-style: none;
}

/* ── Wrapper ────────────────────────────────────────── */
.tpc-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 16px 40px;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--tpc-ink);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    font-size: 14px;
    font-weight: 400;
    background: transparent;
}
@media (min-width: 640px) { .tpc-wrap { padding: 36px 24px 48px; } }

/* ── Search + Tags Toolbar ──────────────────────────── */
.tpc-wrap .tpc-toolbar { margin-bottom: 22px; }
.tpc-wrap .tpc-search {
    position: relative;
    margin-bottom: 14px;
}
.tpc-wrap .tpc-search > svg {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    width: 19px; height: 19px; fill: none; stroke: var(--tpc-slate-light); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
    pointer-events: none;
    transition: stroke .15s ease;
}
.tpc-wrap .tpc-search input {
    width: 100%;
    padding: 14px 44px 14px 46px;
    border-radius: 14px;
    border: 1.5px solid var(--tpc-line);
    background: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 14.5px;
    color: var(--tpc-ink);
    outline: none;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
    transition: border-color .18s ease, box-shadow .18s ease;
    line-height: 1.5;
    margin: 0;
}
.tpc-wrap .tpc-search input::placeholder { color: var(--tpc-slate-light); }
.tpc-wrap .tpc-search input:hover { border-color: var(--tpc-slate-light); }
.tpc-wrap .tpc-search input:focus { border-color: var(--tpc-blue); box-shadow: 0 0 0 4px rgba(29,78,216,.13), 0 2px 8px rgba(29,78,216,.08); }
.tpc-wrap .tpc-search:focus-within > svg { stroke: var(--tpc-blue); }

.tpc-wrap .tpc-clear {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--tpc-slate-light);
    display: flex; align-items: center; justify-content: center;
    border: 0; padding: 0; cursor: pointer;
    opacity: 0; pointer-events: none;
    transition: opacity .15s ease, background .15s ease;
}
.tpc-wrap .tpc-clear svg { width: 10px; height: 10px; stroke: #fff; stroke-width: 2.3; stroke-linecap: round; fill: none; }
.tpc-wrap .tpc-clear:hover { background: var(--tpc-slate); }
.tpc-wrap .tpc-search-input:not(:placeholder-shown) ~ .tpc-clear { opacity: 1; pointer-events: auto; }

.tpc-wrap .tpc-tags {
    display: flex; gap: 8px; overflow-x: auto;
    padding-bottom: 2px; margin: 0 -16px; padding-left: 16px; padding-right: 16px;
    scrollbar-width: none;
}
.tpc-wrap .tpc-tags::-webkit-scrollbar { display: none; }
@media (min-width: 640px) { .tpc-wrap .tpc-tags { margin: 0; padding-left: 0; padding-right: 0; } }

.tpc-wrap .tpc-chip {
    flex: 0 0 auto;
    padding: 7px 15px;
    border-radius: 20px;
    background: #fff;
    border: 1.5px solid var(--tpc-line);
    font-family: 'Inter', sans-serif;
    font-size: 13px; font-weight: 600; color: var(--tpc-slate);
    cursor: pointer; white-space: nowrap;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
    line-height: 1.4;
}
.tpc-wrap .tpc-chip:hover:not(.active) { border-color: var(--tpc-blue); color: var(--tpc-blue); }
.tpc-wrap .tpc-chip.active { background: var(--tpc-blue); border-color: var(--tpc-blue); color: #fff; }

/* ── Price / Rating Filters (Courses page only) ─────── */
.tpc-wrap .tpc-filters {
    display: flex; flex-wrap: wrap; gap: 12px;
    margin: 14px 0 4px;
}
.tpc-wrap .tpc-filter {
    display: flex; flex-direction: column; gap: 5px;
    flex: 1 1 160px; min-width: 150px;
}
.tpc-wrap .tpc-filter label {
    font-size: 12px; font-weight: 600; color: var(--tpc-slate);
    letter-spacing: .2px;
}
.tpc-wrap .tpc-filter-select {
    padding: 10px 36px 10px 14px;
    border-radius: 10px;
    border: 1.5px solid var(--tpc-line);
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 13px;
    font-family: 'Inter', sans-serif;
    font-size: 13.5px; font-weight: 500; color: var(--tpc-ink);
    cursor: pointer; outline: none;
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    transition: border-color .15s ease, box-shadow .15s ease;
    line-height: 1.4;
}
.tpc-wrap .tpc-filter-select:hover { border-color: var(--tpc-slate-light); }
.tpc-wrap .tpc-filter-select:focus { border-color: var(--tpc-blue); box-shadow: 0 0 0 4px rgba(29,78,216,.13); }

/* ── Grid ───────────────────────────────────────────── */
.tpc-wrap .tpc-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}
/* Home mode: collapse extra cards — 4 on mobile, 6 from tablet/desktop up */
.tpc-wrap .tpc-cards.is-default .tpc-card:nth-child(n+5) { display: none; }
@media (min-width: 640px) {
    .tpc-wrap .tpc-cards { grid-template-columns: 1fr 1fr; gap: 22px; }
    .tpc-wrap .tpc-cards.is-default .tpc-card:nth-child(n+5) { display: flex; }
    .tpc-wrap .tpc-cards.is-default .tpc-card:nth-child(n+7) { display: none; }
}
@media (min-width: 1000px) {
    .tpc-wrap .tpc-cards { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

.tpc-wrap .tpc-hidden { display: none !important; }
.tpc-wrap .tpc-empty { display: none; text-align: center; padding: 44px 16px; color: var(--tpc-slate); font-size: 14px; font-weight: 400; }
.tpc-wrap .tpc-empty.show { display: block; }

/* ── "View All Courses" — outline pill, deliberately different from the
   solid blue .tpc-btn card CTAs so it doesn't look like the same button ── */
.tpc-wrap .tpc-viewall {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: auto;
    margin: 28px auto 0;
    padding: 12px 30px;
    border-radius: 999px;
    border: 1.5px solid var(--tpc-blue);
    background: transparent;
    color: var(--tpc-blue) !important;
    font-family: 'Inter', sans-serif;
    font-weight: 700; font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: background .16s ease, color .16s ease, transform .16s ease;
    line-height: 1.4;
}
.tpc-wrap .tpc-viewall:hover { background: var(--tpc-blue); color: #fff !important; transform: translateY(-1px); }
.tpc-wrap .tpc-viewall .arw { transition: transform .18s ease; font-size: 15px; }
.tpc-wrap .tpc-viewall:hover .arw { transform: translateX(3px); }

/* ── Card ───────────────────────────────────────────── */
.tpc-wrap .tpc-card {
    background: var(--tpc-card-bg);
    border: 1px solid var(--tpc-line);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .18s ease, box-shadow .18s ease;
}
@media (min-width: 640px) {
    .tpc-wrap .tpc-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(15,23,42,.09); }
}

/* ── Media Area ─────────────────────────────────────── */
.tpc-wrap .tpc-media {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tpc-wrap a.tpc-media-link { display: block; text-decoration: none; }
.tpc-wrap .tpc-media.photo { background: linear-gradient(135deg, #EEF1F7, #DEE3EC); }
.tpc-wrap .tpc-photo {
    width: 100%; height: 100%;
    object-fit: cover;          /* ← COVER not contain */
    object-position: center;
    display: block;
}
.tpc-wrap .tpc-photo-ph { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #9AA6B8; }
.tpc-wrap .tpc-photo-ph svg { width: 38px; height: 38px; fill: currentColor; opacity: .7; }
.tpc-wrap .tpc-photo-ph span { font-size: 12px; font-weight: 600; letter-spacing: .3px; color: #9AA6B8; }
.tpc-wrap .tpc-media.brand { background: linear-gradient(155deg, var(--tpc-blue), var(--tpc-blue-dark)); }
.tpc-wrap .tpc-brand-inner { text-align: center; position: relative; z-index: 2; }
.tpc-wrap .tpc-brand-name { font-family: 'Poppins', sans-serif; font-size: 24px; font-weight: 800; color: #fff !important; letter-spacing: .2px; line-height: 1.2; }
.tpc-wrap .tpc-brand-sub { margin-top: 5px; font-size: 11.5px; font-weight: 600; letter-spacing: .6px; color: rgba(255,255,255,.85) !important; text-transform: uppercase; }
@media (min-width: 640px) { .tpc-wrap .tpc-brand-name { font-size: 28px; } }

/* ── Ribbon ─────────────────────────────────────────── */
.tpc-wrap .tpc-ribbon {
    position: absolute; top: 0; left: 0; z-index: 3;
    background: var(--tpc-ink); color: #fff !important;
    font-size: 10.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
    padding: 7px 12px 7px 10px;
    border-radius: 0 0 9px 0;
    display: inline-flex; align-items: center; gap: 5px;
    line-height: 1.3;
}
.tpc-wrap .tpc-ribbon svg { width: 10px; height: 10px; fill: var(--tpc-amber); }

/* ── Status Badge ───────────────────────────────────── */
.tpc-wrap .tpc-status {
    position: absolute; top: 12px; right: 12px; z-index: 3;
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,.95);
    padding: 5px 11px; border-radius: 20px;
    font-size: 11px; font-weight: 600; color: var(--tpc-ink);
    line-height: 1.3;
}
.tpc-wrap .tpc-status .dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; background: var(--tpc-green); }

/* ── Status-driven states ───────────────────────────── */
.tpc-wrap .tpc-card[data-status="coming-soon"] .tpc-status .dot { background: var(--tpc-amber); }
.tpc-wrap .tpc-card[data-status="coming-soon"] .tpc-status { color: var(--tpc-amber-dark); }
.tpc-wrap .tpc-card[data-status="passed"] .tpc-status .dot { background: var(--tpc-slate-light); }
.tpc-wrap .tpc-card[data-status="passed"] .tpc-status { color: var(--tpc-slate); }
.tpc-wrap .tpc-card[data-status="passed"] .tpc-media { filter: grayscale(1); opacity: .85; }

/* ── Button States ──────────────────────────────────── */
.tpc-wrap .tpc-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    width: 100%;
    font-weight: 700; font-size: 14px;
    padding: 12px 18px; border-radius: 10px;
    text-decoration: none !important; white-space: nowrap; border: 0; cursor: pointer;
    transition: background .16s ease, transform .16s ease;
    font-family: 'Inter', sans-serif;
    line-height: 1.4;
}
.tpc-wrap .tpc-btn .arw { font-size: 15px; line-height: 1; }

.tpc-wrap .tpc-btn.is-available { background: var(--tpc-blue); color: #fff !important; }
.tpc-wrap .tpc-btn.is-available:hover { background: var(--tpc-blue-dark); }

.tpc-wrap .tpc-btn.is-remind { background: var(--tpc-amber-tint); color: var(--tpc-amber-dark) !important; border: 1.5px solid var(--tpc-amber); }
.tpc-wrap .tpc-btn.is-remind:hover { background: var(--tpc-amber); color: #fff !important; }

.tpc-wrap .tpc-btn.is-passed { background: var(--tpc-grey-tint); color: var(--tpc-slate) !important; cursor: default; pointer-events: none; }

/* ── Card Body ──────────────────────────────────────── */
.tpc-wrap .tpc-body { padding: 16px 16px 18px; display: flex; flex-direction: column; flex: 1; }
@media (min-width: 640px) { .tpc-wrap .tpc-body { padding: 20px 20px 22px; } }

.tpc-wrap .tpc-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.tpc-wrap .tpc-tag {
    background: var(--tpc-blue-tint); color: var(--tpc-blue) !important;
    font-weight: 600; font-size: 12px; padding: 4px 10px; border-radius: 7px;
    letter-spacing: .2px; line-height: 1.4;
}
.tpc-wrap .tpc-rating { display: flex; align-items: center; gap: 5px; }
.tpc-wrap .tpc-stars { display: inline-flex; align-items: center; }
.tpc-wrap .tpc-stars svg { width: 14px; height: 14px; }
.tpc-wrap .tpc-rate { font-weight: 700; color: var(--tpc-ink) !important; font-size: 13px; }

.tpc-wrap .tpc-title {
    font-family: 'Poppins', sans-serif;
    font-size: 17px; font-weight: 700; color: var(--tpc-ink) !important;
    line-height: 1.32; margin: 0 0 8px;
    padding: 0; border: 0; background: transparent;
    text-transform: none; letter-spacing: 0;
}
.tpc-wrap .tpc-title a { color: var(--tpc-ink) !important; text-decoration: none !important; }
.tpc-wrap .tpc-title a:hover { color: var(--tpc-blue) !important; }
@media (min-width: 640px) { .tpc-wrap .tpc-title { font-size: 18.5px; } }

.tpc-wrap .tpc-desc { font-size: 13.5px; color: var(--tpc-slate) !important; line-height: 1.55; margin: 0 0 14px; font-weight: 400; }

.tpc-wrap .tpc-dur {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--tpc-blue-tint); color: var(--tpc-ink) !important;
    font-weight: 700; font-size: 13.5px;
    padding: 6px 12px 6px 8px; border-radius: 20px;
    line-height: 1.4;
}
.tpc-wrap .tpc-dur .icn {
    flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%;
    background: var(--tpc-blue); display: flex; align-items: center; justify-content: center;
}
.tpc-wrap .tpc-dur .icn svg { width: 11px; height: 11px; fill: #fff; }

.tpc-wrap .tpc-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
    margin: 16px 0 2px;
}
.tpc-wrap .tpc-feature {
    display: flex; align-items: center; gap: 6px;
    font-size: 12.5px; font-weight: 500; color: var(--tpc-slate) !important;
}
.tpc-wrap .tpc-feature .tick {
    flex: 0 0 auto; width: 15px; height: 15px; border-radius: 50%;
    background: var(--tpc-blue-tint); display: flex; align-items: center; justify-content: center;
}
.tpc-wrap .tpc-feature .tick svg {
    width: 8px; height: 8px; fill: none; stroke: var(--tpc-blue);
    stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
}

.tpc-wrap .tpc-divider { height: 1px; background: var(--tpc-line); border: 0; margin: 16px 0; }

.tpc-wrap .tpc-foot { display: flex; flex-direction: column; gap: 12px; margin-top: auto; }

.tpc-wrap .tpc-price { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; row-gap: 6px; }
.tpc-wrap .tpc-price-now { display: flex; align-items: baseline; gap: 4px; }
.tpc-wrap .tpc-price-now .cur { font-size: 14px; font-weight: 700; color: var(--tpc-blue) !important; }
.tpc-wrap .tpc-price-now .amt { font-size: 28px; font-weight: 800; color: var(--tpc-ink) !important; letter-spacing: -.3px; line-height: 1; }
.tpc-wrap .tpc-price-old { font-size: 14px; font-weight: 600; color: var(--tpc-slate-light) !important; text-decoration: line-through; }
.tpc-wrap .tpc-save {
    font-size: 11px; font-weight: 700; color: var(--tpc-green) !important;
    background: var(--tpc-green-tint); padding: 3px 8px; border-radius: 6px;
}

/* ── Reduced motion ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .tpc-wrap .tpc-card, .tpc-wrap .tpc-btn, .tpc-wrap .tpc-chip { transition: none; }
}
