/* =============================================================================
   resume-templates.css

   Gallery grid for /resume-templates and /cover-letter-templates.

   Scope note: these pages load marketing.css + resume-score-marketing.css first
   and reuse every shell class from them (.score-hero, .light-section,
   .section-headline, .score-faq, .score-cta, .btn-hero-primary). This file adds
   ONLY the template-card grid, which has no equivalent in the shared sheet.

   The blog gallery at /blog/best-ats-friendly-resume-templates-2026 uses a
   different, Bootstrap-derived set (.template-download-card et al) defined in
   blog-article-marketing.css. Deliberately NOT reused: that grid is sized for a
   narrow article column, this one is full-bleed. Keeping them separate lets the
   two surfaces diverge without one breaking the other.

   Tokens are copied from resume-score-marketing.css rather than imported so the
   file stands alone: ink #112349, brand #1363c6, muted #4c6188, tint #f8fafc.
   ============================================================================= */

.tpl-section {
    padding: 84px 24px;
}

.tpl-inner {
    max-width: 1180px;
    margin: 0 auto;
}

/* ---------- filter bar ---------- */

.tpl-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 0 0 40px;
}

.tpl-filter-btn {
    appearance: none;
    background: #ffffff;
    border: 1px solid #d8e2f0;
    border-radius: 999px;
    color: #4c6188;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    padding: 9px 18px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tpl-filter-btn:hover {
    border-color: #1363c6;
    color: #1363c6;
}

.tpl-filter-btn.is-active {
    background: #1363c6;
    border-color: #1363c6;
    color: #ffffff;
}

/* ---------- group heading ---------- */

.tpl-group {
    margin-bottom: 56px;
}

.tpl-group:last-child {
    margin-bottom: 0;
}

.tpl-group-name {
    color: #112349;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 6px;
}

.tpl-group-sub {
    color: #4c6188;
    font-size: 0.92rem;
    line-height: 1.55;
    margin: 0 0 24px;
    max-width: 760px;
}

/* ---------- card grid ---------- */

.tpl-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
}

.tpl-card {
    background: #ffffff;
    border: 1px solid #e3eaf5;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.tpl-card:hover {
    border-color: #9db8d8;
    box-shadow: 0 12px 28px rgba(17, 35, 73, 0.10);
    transform: translateY(-3px);
}

/* The preview is the whole product on this page, so it gets a real aspect box
   rather than letting each JPG set its own height and stagger the grid rows. */
.tpl-card-preview {
    aspect-ratio: 8.5 / 11;
    background: #f8fafc;
    border-bottom: 1px solid #eef2f8;
    overflow: hidden;
    position: relative;
}

.tpl-card-img {
    display: block;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    width: 100%;
}

.tpl-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px 18px 20px;
}

.tpl-card-name {
    color: #112349;
    font-size: 1.02rem;
    font-weight: 700;
    margin: 0 0 6px;
}

.tpl-card-desc {
    color: #4c6188;
    flex: 1;
    font-size: 0.86rem;
    line-height: 1.55;
    margin: 0 0 14px;
}

.tpl-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 16px;
}

.tpl-tag {
    background: #f0f4ff;
    border-radius: 6px;
    color: #1363c6;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 4px 9px;
    text-transform: uppercase;
}

.tpl-card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Two actions per card on purpose. Download is the promise the SERP made and it
   must stay a real file. Optimize is the funnel step, styled secondary so it
   never reads as a gate on the download. */
.btn-tpl-download {
    background: #1363c6;
    border: 1px solid #1363c6;
    border-radius: 9px;
    color: #ffffff;
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 10px 14px;
    text-align: center;
    text-decoration: none;
    transition: background 0.15s ease;
}

.btn-tpl-download:hover {
    background: #0f52a6;
    color: #ffffff;
}

.btn-tpl-optimize {
    background: #ffffff;
    border: 1px solid #d8e2f0;
    border-radius: 9px;
    color: #4c6188;
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    padding: 9px 14px;
    text-align: center;
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.btn-tpl-optimize:hover {
    border-color: #1363c6;
    color: #1363c6;
}

/* ---------- "how to use" strip ---------- */

.tpl-steps {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.tpl-step {
    background: #f8fafc;
    border: 1px solid #eef2f8;
    border-radius: 14px;
    padding: 22px;
}

.tpl-step-num {
    background: #1363c6;
    border-radius: 50%;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 700;
    height: 28px;
    margin-bottom: 12px;
    width: 28px;
}

.tpl-step h3 {
    color: #112349;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 6px;
}

.tpl-step p {
    color: #4c6188;
    font-size: 0.87rem;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 640px) {
    .tpl-section {
        padding: 56px 18px;
    }

    .tpl-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px;
    }

    .tpl-card-body {
        padding: 14px 14px 16px;
    }
}

/* Hero benefit-card footnote. AtsResumeChecker.cshtml carries the equivalent as
   an inline style attribute; defined as a class here because inline CSS in a
   Razor view is the thing that keeps biting us on @media rules. */
.score-benefit-note {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.82rem;
    line-height: 1.5;
    margin-top: 16px;
    padding-top: 14px;
}

/* =============================================================================
   Copy-paste letter blocks (/cover-letter-templates)

   The resume gallery ships files; the cover letter gallery ships text, because
   that is what the intent wants and what the competitor page that grew 1 to
   2,116 US visits actually serves. A letter is useless as a thumbnail, so these
   render the full text on the page with a copy button rather than a preview
   image behind a download.
   ============================================================================= */

.tpl-letters {
    display: grid;
    gap: 26px;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
}

.tpl-letter {
    background: #ffffff;
    border: 1px solid #e3eaf5;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tpl-letter-head {
    align-items: flex-start;
    background: #f8fafc;
    border-bottom: 1px solid #eef2f8;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 16px 18px;
}

.tpl-letter-name {
    color: #112449;
    font-size: 1.02rem;
    font-weight: 700;
    margin: 0 0 4px;
}

.tpl-letter-for {
    color: #4c6188;
    font-size: 0.8rem;
    line-height: 1.45;
    margin: 0;
}

.btn-tpl-copy {
    background: #1363c6;
    border: 1px solid #1363c6;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    flex-shrink: 0;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 14px;
    transition: background 0.15s ease;
    white-space: nowrap;
}

.btn-tpl-copy:hover {
    background: #0f52a6;
}

.btn-tpl-copy.is-copied {
    background: #15803d;
    border-color: #15803d;
}

/* The letter body is real prose, not code, so it stays in <p> elements rather
   than a <pre>. Bracketed placeholders get their own colour so a reader can see
   at a glance which parts they have to replace. */
.tpl-letter-body {
    color: #33405c;
    flex: 1;
    font-size: 0.87rem;
    line-height: 1.68;
    padding: 20px 18px 22px;
}

.tpl-letter-body p {
    margin: 0 0 12px;
}

.tpl-letter-body p:last-child {
    margin-bottom: 0;
}

.tpl-letter-body .tpl-slot {
    background: #f0f4ff;
    border-radius: 3px;
    color: #1363c6;
    font-weight: 600;
    padding: 1px 3px;
}

.tpl-letter-meta {
    background: #f8fafc;
    border-top: 1px solid #eef2f8;
    color: #4c6188;
    font-size: 0.8rem;
    line-height: 1.55;
    padding: 14px 18px;
}

@media (max-width: 760px) {
    .tpl-letters {
        grid-template-columns: 1fr;
    }

    .tpl-letter-head {
        flex-direction: column;
    }
}
