/*
 * creditcardcomp_new.css — Credit Card Comparison Page
 * Shares design tokens with creditcard_new.css. Mobile-first. Fintra teal accent.
 */

/* ── Tokens ─────────────────────────────────────────────────────── */
.cc-page {
    --accent:    #00c6ca;
    --accent-dk: #009fa3;
    --text:      #222222;
    --muted:     #717171;
    --subtle:    #b0b0b0;
    --border:    #ebebeb;
    --surface:   #ffffff;
    --bg:        #ffffff;

    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;

    --shadow-card: 0 2px 4px rgba(0,0,0,.06),
                   0 8px 24px rgba(0,0,0,.08);

    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

.cc-page *, .cc-page *::before, .cc-page *::after { box-sizing: border-box; }
.cc-page a { text-decoration: none; color: inherit; }
.cc-page button { font-family: var(--font); }

/* ══════════════════════════════════════════════
   STICKY MINI TAB NAV
══════════════════════════════════════════════ */
.cc-mini-nav {
    position: sticky;
    top: 56px;
    z-index: 150;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.cc-mini-nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1rem;
    height: 48px;
    display: flex;
    align-items: center;
    gap: .25rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.cc-mini-nav-inner::-webkit-scrollbar { display: none; }

.cc-mini-tab {
    padding: 0 12px;
    height: 48px;
    display: flex;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color .15s, border-color .15s;
    text-decoration: none;
}

.cc-mini-tab:hover { color: var(--text); }
.cc-mini-tab.active { color: var(--accent-dk); font-weight: 700; border-bottom-color: var(--accent); }

/* ══════════════════════════════════════════════
   BREADCRUMB
══════════════════════════════════════════════ */
.cc-breadcrumb {
    max-width: 1120px;
    margin: 0 auto;
    padding: .75rem 1rem .5rem;
    font-size: 12px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.cc-breadcrumb a {
    color: var(--muted);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: transparent;
    transition: text-decoration-color .15s;
}

.cc-breadcrumb a:hover { text-decoration-color: var(--muted); }
.cc-breadcrumb-sep     { color: var(--subtle); }
.cc-breadcrumb-current { color: var(--text); font-weight: 600; }

/* ══════════════════════════════════════════════
   APPLY BUTTON
══════════════════════════════════════════════ */
.cc-apply-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 18px;
    border-radius: var(--r-sm);
    background: var(--accent);
    color: #fff;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background .15s;
    letter-spacing: .01em;
    line-height: 1.3;
}

.cc-apply-btn:hover { background: var(--accent-dk); color: #fff; }

/* ══════════════════════════════════════════════
   STAR
══════════════════════════════════════════════ */
.cc-star-icon { color: var(--accent); }

/* ══════════════════════════════════════════════
   PAGE TITLE
══════════════════════════════════════════════ */
.cc-comp-page-title {
    max-width: 1120px;
    margin: 0 auto;
    padding: 1rem 1rem .25rem;
}

.cc-comp-page-title h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.3px;
    line-height: 1.3;
}

.cc-comp-page-title h1 .vs-badge { color: var(--accent-dk); }

/* ══════════════════════════════════════════════
   COMPARISON HERO — two cards + VS
══════════════════════════════════════════════ */
.cc-comp-hero {
    max-width: 1120px;
    margin: 0 auto;
    padding: 1rem 1rem 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    gap: .75rem;
}

.cc-comp-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    padding: 1.25rem .75rem;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    background: #fff;
    box-shadow: var(--shadow-card);
    text-align: center;
    transition: box-shadow .2s;
}

.cc-comp-card:hover { box-shadow: 0 4px 8px rgba(0,0,0,.08), 0 16px 40px rgba(0,0,0,.12); }

.cc-comp-card-img {
    width: 200px;
    max-width: 100%;
}

.cc-comp-card-img img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 6px 16px rgba(0,0,0,.18));
    padding: .5rem 1rem;
}

.cc-comp-card-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.cc-comp-card-bank {
    font-size: 12px;
    color: var(--muted);
    margin-top: -4px;
}

.cc-comp-card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--muted);
}

.cc-comp-card-rating strong {
    color: var(--text);
    font-weight: 700;
}

.cc-comp-card-fee {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
}

.cc-comp-card-fee span {
    font-size: 12px;
    font-weight: 400;
    color: var(--muted);
}

/* Bank logo */
.cc-comp-bank-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f7f7;
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
    flex-shrink: 0;
}

.cc-comp-bank-logo img { width: 100%; height: 100%; object-fit: contain; }

/* VS badge */
.cc-comp-vs {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f7f7f7;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: var(--muted);
    flex-shrink: 0;
    align-self: center;
    margin-top: 6rem;
}

/* ══════════════════════════════════════════════
   COMPARISON SECTIONS WRAPPER
══════════════════════════════════════════════ */
.cc-comp-wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
}

.cc-comp-section {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    margin-top: 1.5rem;
}

.cc-comp-section-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.2px;
    margin-bottom: .85rem;
}

/* ── 3-column comparison table ── */
.cc-comp-thead {
    display: grid;
    grid-template-columns: 32% 1fr 1fr;
    padding: .4rem 0;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    border-bottom: 2px solid var(--border);
}

.cc-comp-thead div:nth-child(2),
.cc-comp-thead div:nth-child(3) { text-align: center; }

.cc-comp-row {
    display: grid;
    grid-template-columns: 32% 1fr 1fr;
    border-bottom: 1px solid var(--border);
    align-items: center;
}

.cc-comp-row:last-child { border-bottom: none; }

.cc-comp-row-label {
    padding: .8rem .75rem .8rem 0;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.4;
}

.cc-comp-row-val {
    padding: .7rem .5rem;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    border-radius: var(--r-sm);
    margin: .2rem;
    line-height: 1.4;
}

.cc-comp-row-val.winner {
    color: var(--accent-dk);
    background: rgba(0, 198, 202, .08);
    font-weight: 700;
}

/* ── Side-by-side content (features, review) ── */
.cc-comp-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.cc-comp-content-col-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--accent);
    margin-bottom: .75rem;
}

.cc-comp-content-col-body {
    font-size: 13px;
    line-height: 1.75;
    color: var(--text);
}

/* Style raw CMS HTML inside comparison columns */
.cc-comp-content-col-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.cc-comp-content-col-body li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    line-height: 1.5;
}

.cc-comp-content-col-body li::before {
    content: '✓';
    color: var(--accent);
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 2px;
}

.cc-comp-content-col-body p { margin: 0 0 .65rem; }
.cc-comp-content-col-body p:last-child { margin: 0; }

/* ══════════════════════════════════════════════
   SIMILAR CARDS
══════════════════════════════════════════════ */
.cc-similar {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1rem 4rem;
    border-top: 1px solid var(--border);
}

.cc-similar + .cc-similar { border-top: none; padding-top: 0; }

.cc-similar-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    padding: 1.25rem 0 .85rem;
}

.cc-sim-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

.cc-sim-card { display: flex; flex-direction: column; gap: 7px; }
.cc-sim-card:hover .cc-sim-img-wrap { opacity: .85; }

.cc-sim-img-wrap {
    border-radius: var(--r-md);
    overflow: hidden;
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    transition: opacity .15s;
}

.cc-sim-img { width: 100%; height: 100%; object-fit: contain; padding: 8px 12px; }
.cc-sim-name { font-size: 12px; font-weight: 600; color: var(--text); line-height: 1.3; }
.cc-sim-bank { font-size: 11px; color: var(--muted); }
.cc-sim-rating { display: flex; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); }
.cc-sim-rating .cc-star-icon { font-size: 10px; }

/* ══════════════════════════════════════════════
   MOBILE STICKY BAR — two Apply buttons
══════════════════════════════════════════════ */
.cc-comp-mobile-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 300;
    background: #fff;
    border-top: 1px solid var(--border);
    padding: .65rem .75rem;
    box-shadow: 0 -4px 16px rgba(0,0,0,.08);
    gap: .5rem;
}

.cc-comp-mobile-bar .cc-apply-btn {
    flex: 1;
    padding: 10px 6px;
    font-size: 12px;
    flex-direction: column;
    gap: 1px;
}

.cc-comp-mobile-bar-label {
    font-size: 9px;
    font-weight: 400;
    opacity: .8;
}

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 640px) {
    .cc-comp-page-title { padding: .75rem .75rem .25rem; }
    .cc-comp-page-title h1 { font-size: 14px; }

    .cc-comp-hero {
        grid-template-columns: 1fr 28px 1fr;
        gap: .35rem;
        padding: .75rem .75rem 0;
    }
    .cc-comp-card { padding: .75rem .4rem; gap: .5rem; border-radius: var(--r-md); }
    .cc-comp-card-img { width: 85px; }
    .cc-comp-card-img img { padding: .25rem .5rem; }
    .cc-comp-card-name { font-size: 10px; }
    .cc-comp-card-bank { font-size: 9px; display: none; }
    .cc-comp-card-fee { font-size: 12px; }
    .cc-comp-card-fee span { display: none; }
    .cc-comp-card-rating { font-size: 10px; }
    .cc-comp-vs { width: 26px; height: 26px; font-size: 9px; margin-top: 4rem; }

    .cc-comp-wrap { padding: 0 .75rem 2rem; }
    .cc-comp-section-title { font-size: 14px; }

    .cc-comp-thead { grid-template-columns: 28% 1fr 1fr; font-size: 9px; letter-spacing: .02em; }
    .cc-comp-row   { grid-template-columns: 28% 1fr 1fr; }
    .cc-comp-row-label { font-size: 11px; padding: .6rem .35rem .6rem 0; }
    .cc-comp-row-val   { font-size: 11px; padding: .6rem .15rem; margin: .1rem; }

    .cc-comp-content-grid { grid-template-columns: 1fr; gap: 1rem; }
    .cc-comp-content-col-body { font-size: 12px; }

    .cc-similar { padding: 0 .75rem 5rem; }
    .cc-sim-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

    .cc-comp-mobile-bar { display: flex; }

    .cc-mini-nav-inner { padding: 0 .75rem; }
    .cc-breadcrumb { padding: .5rem .75rem .25rem; }
}

@media (min-width: 900px) {
    .cc-comp-page-title { padding: 1.25rem 1.5rem .25rem; }
    .cc-comp-page-title h1 { font-size: 24px; }

    .cc-comp-hero { padding: 1.25rem 1.5rem 0; gap: 1.5rem; }
    .cc-comp-card { padding: 1.5rem 1rem; }
    .cc-comp-card-img { width: 260px; }
    .cc-comp-card-name { font-size: 16px; }
    .cc-comp-card-fee { font-size: 20px; }
    .cc-comp-vs { width: 56px; height: 56px; font-size: 15px; margin-top: 7rem; }

    .cc-comp-wrap { padding: 0 1.5rem 2rem; }
    .cc-comp-section-title { font-size: 20px; }
    .cc-comp-row-label { font-size: 14px; }
    .cc-comp-row-val   { font-size: 14px; }
    .cc-comp-content-col-body { font-size: 14px; }

    .cc-similar { padding: 0 1.5rem 4rem; }
    .cc-similar-title { font-size: 20px; }

    .cc-mini-nav-inner { padding: 0 1.5rem; gap: 1rem; }
    .cc-breadcrumb { padding: 1rem 1.5rem .5rem; }
    .cc-mini-tab { font-size: 14px; height: 52px; }
}
