/* ════════════════════════════════════════════════════════════════
   MAC Solar — City Content Styles
   Target: .city-content  (the rich HTML block stored in `content`)
   Add this inside <style> in city-page.php or in your main CSS file.
════════════════════════════════════════════════════════════════ */

/* ── Outer section ─────────────────────────────────────────── */

/* ── Prose wrapper ─────────────────────────────────────────── */
.city-content {
    margin: 0 auto;
    font-family: var(--ff, 'Poppins', sans-serif);
    font-size: 1rem;
    line-height: 1.85;
    color: #374151;
    /* slate-700 */
}

/* ── H1 (page-level, only one) ─────────────────────────────── */
.city-content h1 {
    font-size: clamp(1.65rem, 3vw, 2.35rem);
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
    /* slate-900 */
    margin: 0 0 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--clr-accent, #6ecf38);
}

/* ── H2 (major section breaks) ─────────────────────────────── */
.city-content h2 {
    font-size: clamp(1.3rem, 2.5vw, 1.75rem);
    font-weight: 700;
    color: #0f172a;
    margin: 3rem 0 1rem;
    padding-left: 1rem;
    border-left: 4px solid var(--clr-green, #22c55e);
    line-height: 1.3;
}

/* ── H3 (sub-sections) ──────────────────────────────────────── */
.city-content h3 {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 700;
    color: var(--clr-navy, #1e3a5f);
    margin: 2.25rem 0 .75rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.city-content h3::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--clr-accent, #6ecf38);
    flex-shrink: 0;
}

/* ── Paragraphs ─────────────────────────────────────────────── */
.city-content p {
    margin: 0 0 1.25rem;
    color: #4b5563;
    /* slate-600 */
}

/* ── Links ──────────────────────────────────────────────────── */
.city-content a {
    color: var(--clr-navy, #1e3a5f);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--clr-green, #22c55e);
    transition: color .2s;
}

.city-content a:hover {
    color: var(--clr-green2, #16a34a);
}

/* ── Unordered lists ────────────────────────────────────────── */
.city-content ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

.city-content ul li {
    padding-left: 1.6rem;
    position: relative;
    color: #4b5563;
}

.city-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .55em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--clr-accent, #6ecf38);
}

.city-content ul li strong {
    color: #0f172a;
}

/* Nested lists (off-grid table cell lists) */
.city-content ul ul {
    margin-top: .5rem;
    margin-bottom: 0;
    padding-left: .75rem;
}

.city-content ul ul li::before {
    background: var(--clr-green, #22c55e);
    width: 6px;
    height: 6px;
    top: .6em;
}

/* ── Ordered lists ──────────────────────────────────────────── */
.city-content ol {
    padding-left: 1.5rem;
    margin: 0 0 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

.city-content ol li {
    color: #4b5563;
    padding-left: .35rem;
}

.city-content ol li::marker {
    color: var(--clr-navy, #1e3a5f);
    font-weight: 700;
}

/* ── Strong / em ────────────────────────────────────────────── */


.city-content em {
    font-style: italic;
    color: #6b7280;
}

.city-content strong em,
.city-content em strong {
    color: #374151;
}

/* ── Block-level disclaimer / note paragraphs
      (the italicised *Please note* paragraphs) ──────────────── */
.city-content p:has(em):has(strong) {
    background: #f0fdf4;
    border-left: 3px solid var(--clr-green, #22c55e);
    border-radius: 0 .5rem .5rem 0;
    padding: .75rem 1rem;
    font-size: .88rem;
    line-height: 1.65;
    color: #374151;
    margin-top: -.25rem;
    /* tuck under the preceding table */
}

/* ── Tables  (.custom-styled-table) ─────────────────────────── */
.city-content table,
.city-content .custom-styled-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0 .5rem;
    font-size: .9rem;
    border-radius: .75rem;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .07);
}

/* Header row */
.city-content table thead tr th,
.city-content .custom-styled-table th {
    background: var(--clr-navy, #1e3a5f);
    color: #fff;
    font-weight: 700;
    text-align: left;
    padding: .9rem 1.1rem;
    font-size: .82rem;
    letter-spacing: .02em;
    text-transform: uppercase;
    border: none;
}

/* Data cells */
.city-content table td,
.city-content .custom-styled-table td {
    padding: .8rem 1.1rem;
    color: #374151;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
    line-height: 1.6;
}

/* Zebra stripes */
.city-content table tbody tr:nth-child(even) td,
.city-content .custom-styled-table tbody tr:nth-child(even) td {
    background: #f8fafc;
}

.city-content table tbody tr:nth-child(odd) td,
.city-content .custom-styled-table tbody tr:nth-child(odd) td {
    background: #fff;
}

/* Hover row highlight */
.city-content table tbody tr:hover td,
.city-content .custom-styled-table tbody tr:hover td {
    background: #f0fdf4;
}

/* Bold values in cells (savings, totals) */
.city-content table td strong,
.city-content .custom-styled-table td strong {
    color: var(--clr-navy, #1e3a5f);
}

/* First column (system sizes) — slightly muted label style */
.city-content table td:first-child,
.city-content .custom-styled-table td:first-child {
    font-weight: 600;
    color: #111827;
}

/* Responsive table scroll */
.city-content table,
.city-content .custom-styled-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.city-content table thead,
.city-content table tbody,
.city-content table tr,
.city-content .custom-styled-table thead,
.city-content .custom-styled-table tbody,
.city-content .custom-styled-table tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

/* ── Numbered feature blocks  (#1. #2. …) ───────────────────── */
/* Paragraphs that start with bold text like "#1. Storm Safety" */
.city-content p strong:first-child:not(:only-child) {
    display: block;
    font-size: 1.05rem;
    color: var(--clr-navy, #1e3a5f);
    margin-bottom: .25rem;
}

/* ── Horizontal rule ────────────────────────────────────────── */
.city-content hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 2.5rem 0;
}

/* ── Responsive tweaks ──────────────────────────────────────── */
@media (max-width: 768px) {
    .city-content {
        padding: 3rem 0 2.5rem;
    }

    .city-content {
        font-size: .93rem;
    }

    .city-content h1 {
        font-size: 1.45rem;
    }

    .city-content h2 {
        font-size: 1.2rem;
        margin-top: 2.25rem;
    }

    .city-content h3 {
        font-size: 1.05rem;
    }

    /* Full-width scrollable tables on mobile */
    .city-content table thead,
    .city-content table tbody,
    .city-content table tr,
    .city-content .custom-styled-table thead,
    .city-content .custom-styled-table tbody,
    .city-content .custom-styled-table tr {
        display: revert;
        width: revert;
        table-layout: revert;
    }

    .city-content table,
    .city-content .custom-styled-table {
        display: block;
    }

    .city-content table th,
    .city-content .custom-styled-table th,
    .city-content table td,
    .city-content .custom-styled-table td {
        padding: .65rem .8rem;
        font-size: .8rem;
    }
}