/* ============================================================
   TS FAST AUTO LOGISTICS, LLC — GENERIC PAGE CONTENT BLOCKS
   File: assets/css/page-content.css
   Purpose: Reusable content blocks for all sub-pages
   Depends on: style.css
   Load order: After style.css, before responsive.css
   ============================================================ */

/* ------------------------------------------------------------
   1. TWO-COLUMN CONTENT (text + sidebar)
   ------------------------------------------------------------ */
.content-two-col {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-10);
    align-items: start;
}

.content-main h2 {
    font-size: var(--fs-2xl);
    font-weight: var(--fw-bold);
    color: var(--color-heading);
    margin-top: var(--space-8);
    margin-bottom: var(--space-4);
    letter-spacing: var(--ls-tight);
    line-height: var(--lh-snug);
}

.content-main h2:first-child {
    margin-top: 0;
}

.content-main h3 {
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    color: var(--color-heading);
    margin-top: var(--space-6);
    margin-bottom: var(--space-3);
    line-height: var(--lh-snug);
}

.content-main p {
    font-size: var(--fs-base);
    color: var(--color-text-muted);
    line-height: var(--lh-relaxed);
    margin-bottom: var(--space-4);
    max-width: 72ch;
}

.content-main ul,
.content-main ol {
    margin: var(--space-4) 0;
    padding-left: var(--space-6);
}

.content-main ul {
    list-style: disc;
}

.content-main ol {
    list-style: decimal;
}

.content-main li {
    font-size: var(--fs-base);
    color: var(--color-text-muted);
    line-height: var(--lh-relaxed);
    margin-bottom: var(--space-2);
    max-width: 72ch;
}

.content-main li::marker {
    color: var(--color-primary);
    font-weight: var(--fw-bold);
}

.content-main strong {
    color: var(--color-text-main);
    font-weight: var(--fw-bold);
}

.content-main a {
    color: var(--color-primary);
    font-weight: var(--fw-semibold);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.content-main a:hover {
    color: var(--color-primary-hover);
}

/* ------------------------------------------------------------
   2. SIDEBAR (sticky on desktop)
   ------------------------------------------------------------ */
.content-sidebar {
    position: sticky;
    top: calc(var(--header-height) + var(--space-6));
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.sidebar-card {
    background-color: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
}

.sidebar-card h3 {
    font-size: var(--fs-md);
    font-weight: var(--fw-bold);
    color: var(--color-heading);
    margin-bottom: var(--space-4);
    letter-spacing: var(--ls-tight);
}

.sidebar-card p {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    line-height: var(--lh-relaxed);
    margin-bottom: var(--space-4);
}

.sidebar-card .btn {
    width: 100%;
    margin-bottom: var(--space-3);
}

.sidebar-card .cta-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-border);
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    color: var(--color-heading);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.sidebar-card .cta-phone:hover {
    color: var(--color-primary);
}

.sidebar-card .cta-phone svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--color-primary);
}

/* Contact card — "talk to a person" (phone / email rows).
   Deep Navy in both themes so it reads differently from quote CTAs. */
.sidebar-card.contact-card {
    background-color: var(--brand-navy);
    border: 1px solid var(--color-border);
    border-top: 3px solid var(--brand-amber);
    color: #FFFFFF;
}

.contact-card h3 {
    color: #FFFFFF;
}

.contact-card p {
    color: #B6C0CF;
}

.contact-lines {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--space-2);
}

.contact-lines a {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    background-color: rgba(255, 255, 255, 0.04);
    color: #FFFFFF;
    text-decoration: none;
    transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.contact-lines a:hover {
    border-color: var(--brand-amber);
    background-color: rgba(255, 193, 7, 0.08);
    color: #FFFFFF;
}

.contact-lines svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--brand-amber);
}

.contact-lines .line-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.3;
}

.contact-lines .line-label {
    font-size: 0.6875rem;
    font-weight: var(--fw-bold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #B6C0CF;
}

.contact-lines .line-value {
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    overflow-wrap: anywhere;
}

/* Sidebar link list (All Services) */
.sidebar-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.sidebar-links li a {
    display: block;
    padding: var(--space-3) var(--space-4);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--color-text-main);
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.sidebar-links li a:hover,
.sidebar-links li a.active {
    background-color: var(--color-primary);
    color: var(--color-on-primary);
    border-color: var(--color-primary);
    transform: translateX(3px);
}

/* Sidebar facts list (Quick Facts) — icon + bold label + text */
.sidebar-facts {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.sidebar-facts li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    line-height: var(--lh-snug);
}

.sidebar-facts li svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--color-accent);
}

.sidebar-facts li strong {
    color: var(--color-text-main);
    font-weight: var(--fw-bold);
}

/* ------------------------------------------------------------
   3. GENERIC SECTION HEADER
   ------------------------------------------------------------ */
.content-head {
    max-width: 720px;
    margin: 0 auto var(--space-10);
    text-align: center;
}

.content-head .eyebrow {
    display: block;
    font-size: var(--fs-xs);
    font-weight: var(--fw-extrabold);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--color-primary);
    margin-bottom: var(--space-3);
}

.content-head h2 {
    font-size: var(--fs-3xl);
    font-weight: var(--fw-extrabold);
    color: var(--color-heading);
    line-height: var(--lh-tight);
    letter-spacing: var(--ls-tight);
    margin-bottom: var(--space-4);
}

.content-head p {
    font-size: var(--fs-md);
    color: var(--color-text-muted);
    line-height: var(--lh-relaxed);
    margin: 0;
}

/* ------------------------------------------------------------
   4. CARD GRID
   ------------------------------------------------------------ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}

.card-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.card-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ------------------------------------------------------------
   5. CONTENT CARD (generic)
   ------------------------------------------------------------ */
.content-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding: var(--space-6);
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition-base),
        box-shadow var(--transition-base),
        border-color var(--transition-base);
}

.content-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

/* Card icon container */
.content-card .card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    flex-shrink: 0;
    flex-grow: 0;
    overflow: hidden;
    transition: background-color var(--transition-base),
        color var(--transition-base);
}

.content-card:hover .card-icon {
    background-color: var(--color-primary);
    color: var(--color-on-primary);
}

/* Force SVG inside icons to a fixed 24px — prevents oversizing */
.content-card .card-icon svg {
    width: 24px;
    height: 24px;
    max-width: 24px;
    max-height: 24px;
    flex-shrink: 0;
    display: block;
}

/* Card title */
.content-card .card-title {
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    color: var(--color-heading);
    margin: 0;
    letter-spacing: var(--ls-tight);
    line-height: var(--lh-snug);
}

/* Card description */
.content-card .card-desc {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    line-height: var(--lh-relaxed);
    margin: 0;
    flex: 1;
    max-width: 42ch;
}

/* Card link (optional) */
.content-card .card-link {
    margin-top: var(--space-2);
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    transition: gap var(--transition-fast);
}

.content-card:hover .card-link {
    gap: var(--space-2);
}

/* ------------------------------------------------------------
   6. GLOBAL SVG SAFETY
   Prevents icons from ever rendering oversized inside content
   ------------------------------------------------------------ */
.content-card svg,
.content-head svg,
.content-main svg,
.content-sidebar svg {
    flex-shrink: 0;
    max-width: 100%;
}

.content-card .card-icon svg,
.content-main .card-icon svg {
    width: 24px;
    height: 24px;
    max-width: 24px;
    max-height: 24px;
}

/* ------------------------------------------------------------
   7. RESPONSIVE
   ------------------------------------------------------------ */

/* Tablet */
@media (max-width: 1024px) {
    .content-two-col {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .content-sidebar {
        position: static;
    }

    /* 3-up card grids stay 3 columns on tablets (9 services = 3x3,
       3 contact cards = one row) — 2 columns left an orphaned card */
    .card-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .content-head h2 {
        font-size: var(--fs-2xl);
    }
}

/* Small tablets: 3 columns get too narrow below 768px */
@media (max-width: 767px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Odd card count: last card spans the row instead of sitting alone */
    .card-grid> :last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .content-main h2 {
        font-size: var(--fs-xl);
    }

    .content-main h3 {
        font-size: var(--fs-md);
    }

    .card-grid,
    .card-grid-2,
    .card-grid-4 {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .content-card {
        padding: var(--space-5);
    }

    .content-card .card-icon {
        width: 44px;
        height: 44px;
    }

    .content-card .card-icon svg {
        width: 22px;
        height: 22px;
    }

    .sidebar-card {
        padding: var(--space-5);
    }
}
/* ============================================================
   12. EDITORIAL UPGRADE (all inner pages)
   Brand rhythm shared with the emails/PDFs: amber accent bars,
   navy/amber number chips, key-value fact rows.
   ============================================================ */

/* ---- Article typography ---- */
.content-main h2 {
    font-size: 1.625rem;
    font-weight: var(--fw-extrabold);
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-top: var(--space-12);
    margin-bottom: var(--space-4);
}

.content-main h2::before {
    content: '';
    display: block;
    width: 32px;
    height: 3px;
    margin-bottom: var(--space-4);
    border-radius: 2px;
    background: var(--color-highlight);
}

.content-main h3 {
    font-size: 1.1875rem;
    font-weight: var(--fw-extrabold);
    letter-spacing: -0.01em;
    margin-top: var(--space-8);
}

.content-main p,
.content-main li {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--color-text-main);
    max-width: 68ch;
}

/* Intro paragraph right after the first heading */
.content-main h2:first-child + p {
    font-size: 1.1875rem;
    line-height: 1.7;
    color: var(--color-heading);
}

.content-main strong {
    color: var(--color-heading);
}

/* ---- Bullet lists: amber check marks ---- */
.content-main ul {
    list-style: none;
    padding-left: 0;
    margin: var(--space-5) 0 var(--space-6);
}

.content-main ul > li {
    position: relative;
    padding-left: 34px;
    margin-bottom: var(--space-3);
}

.content-main ul > li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.3em;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--brand-amber) url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230A1930' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='20 6 9 17 4 12'/%3e%3c/svg%3e") center / 11px no-repeat;
}

/* ---- Numbered lists: step timeline ---- */
.content-main ol {
    list-style: none;
    counter-reset: step;
    padding-left: 0;
    margin: var(--space-6) 0 var(--space-6);
}

.content-main ol > li {
    counter-increment: step;
    position: relative;
    min-height: 34px;
    padding-left: 52px;
    padding-top: 3px;
    padding-bottom: var(--space-5);
    margin-bottom: 0;
}

.content-main ol > li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-sm);
    font-weight: var(--fw-extrabold);
    background: var(--brand-navy);
    color: var(--brand-amber);
    box-shadow: 0 0 0 4px var(--color-bg);
    z-index: 1;
}

[data-theme="dark"] .content-main ol > li::before {
    background: #2563EB;
    color: #FFFFFF;
}

/* connector line between steps */
.content-main ol > li:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 16px;
    top: 34px;
    bottom: 0;
    width: 2px;
    background: var(--color-border);
}


/* ---- Small headings: one consistent style ---- */
.sidebar-card h3,
.fx-plain-card h3,
.fx-panel h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: var(--fw-extrabold);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.sidebar-card h3::before,
.fx-plain-card h3::before,
.fx-panel h3::before {
    content: '';
    flex-shrink: 0;
    width: 14px;
    height: 3px;
    border-radius: 2px;
    background: var(--brand-amber);
}

.content-card .card-title {
    font-size: 1.125rem;
    font-weight: var(--fw-extrabold);
    letter-spacing: -0.01em;
}

/* ---- Content cards ---- */
.content-card {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    padding: var(--space-6) var(--space-6) var(--space-6);
}

.content-card::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    background: var(--brand-amber);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.content-card:hover {
    transform: translateY(-3px);
    border-color: var(--color-border-strong);
    box-shadow: var(--shadow-md);
}

.content-card:hover::before {
    transform: scaleX(1);
}

.content-card .card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: var(--brand-navy);
    color: var(--brand-amber);
}

.content-card:hover .card-icon {
    background-color: var(--brand-amber);
    color: var(--brand-navy);
}

[data-theme="dark"] .content-card .card-icon {
    background-color: rgba(59, 130, 246, 0.16);
    color: #93C5FD;
}

.content-card .card-desc {
    max-width: none;
    font-size: 0.9375rem;
    line-height: 1.65;
}

.content-card .card-link::after {
    content: '\2192';
    transition: transform var(--transition-fast);
}

.content-card:hover .card-link::after {
    transform: translateX(3px);
}

/* ---- Sidebar fact lists: label / value rows ---- */
.sidebar-card ul:not(.sidebar-links):not(.contact-lines):not(.sidebar-facts) {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-card ul:not(.sidebar-links):not(.contact-lines):not(.sidebar-facts) > li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-4);
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    line-height: 1.45;
    color: var(--color-heading);
    text-align: right;
}

.sidebar-card ul:not(.sidebar-links):not(.contact-lines):not(.sidebar-facts) > li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.sidebar-card ul:not(.sidebar-links):not(.contact-lines):not(.sidebar-facts) > li strong {
    flex-shrink: 0;
    font-weight: var(--fw-medium);
    color: var(--color-text-muted);
    text-align: left;
}

/* Plain tip lists (no label) read left-aligned with an amber dot */
.sidebar-card ul:not(.sidebar-links):not(.contact-lines):not(.sidebar-facts) > li:not(:has(strong)) {
    display: block;
    position: relative;
    padding-left: 18px;
    text-align: left;
    font-weight: var(--fw-medium);
}

.sidebar-card ul:not(.sidebar-links):not(.contact-lines):not(.sidebar-facts) > li:not(:has(strong))::before {
    content: '';
    position: absolute;
    left: 0;
    top: 17px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand-amber);
}

/* ---- Legal pages (privacy / terms): readable single column ---- */
.content-main[style*="820px"] h2 {
    font-size: 1.375rem;
}

@media (max-width: 640px) {
    .content-main h2 {
        font-size: 1.375rem;
        margin-top: var(--space-10);
    }

    .content-main p,
    .content-main li {
        font-size: 1rem;
    }

    .content-main h2:first-child + p {
        font-size: 1.0625rem;
    }

    .content-main ol > li {
        padding-left: 46px;
    }
}

/* Illustrations inside articles: never upscaled (inline max-width = native width), rounded, with a caption */
.content-figure {
    margin: var(--space-6) 0 var(--space-8);
}

.content-figure picture {
    display: block;
}

.content-figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    background-color: var(--color-surface-alt);
}

.content-figure figcaption {
    margin-top: var(--space-2);
    font-size: var(--fs-sm);
    line-height: 1.5;
    color: var(--color-text-muted);
}

/* Price figure pinned to the bottom of rate cards (pricing page) */
.content-card .card-price {
    margin: 0;
    padding-top: var(--space-4);
    border-top: 1px dashed var(--color-border-strong);
    font-size: 1.5rem;
    font-weight: var(--fw-extrabold);
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--color-heading);
}

.content-card .card-desc strong {
    color: var(--color-heading);
}
