/*
 * MBRE NABOR Market Report — Front-end Styles
 * /assets/css/mbre-nabor-front.css
 *
 * Token-driven (all colours from :root)
 * No border-radius (per brand reference v2.1)
 * Avada-safe (no overrides on h1-h6, p, a)
 */

/* ─── Design Tokens ─────────────────────────────────────── */
:root {
    --blue:           #00A3E0;
    --blue-dk:        #007fb0;
    --blue-lt:        #E8F6FC;
    --black:          #000000;
    --ink:            #1C1C1C;
    --muted:          #5A5A5A;
    --faint:          #8A8A8A;
    --white:          #FFFFFF;
    --off:            #F7F7F7;
    --rule:           #E2E2E2;
    --rule-md:        #C8C8C8;
    --pos:            #1A6B3C;
    --pos-bg:         #EAF4EE;
    --neg:            #8B1A1A;
    --neg-bg:         #FDEAEA;
    --deep-blue:      #000000;
    --deep-blue-code: #003A52;
}

/* ─── Section Frame ─────────────────────────────────────── */
.mbre-content-area{ padding-top: 30px; padding-bottom:90px; width:100%; }
.mbre-content-area .mbre-section { margin-bottom: 24px; }
.mbre-section p a { color: #3fa5dc; font-weight: 400; }
.mbre-section-label {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--blue);
    font-weight: 700;
    padding: 24px 0 4px;
    border-bottom: 3px solid var(--blue);
    margin: 48px 0 16px;
}
.mbre-section-label--noline { border-bottom: 0; }
.mbre-section-label .label-meta {
    font-weight: 400;
    color: var(--muted);
    letter-spacing: .5px;
}

/* ─── Summary Card + Attribution (S2) ───────────────────── */
.mbre-summary-card {
    background: var(--off);
    padding: 28px;
    margin-bottom: 32px;
    border-left: 4px solid var(--blue);
}
.mbre-summary-card > p { font-size: 20px; line-height: 1.75; margin-bottom: 16px; }
.mbre-attribution {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--rule);
}
.mbre-attribution-badge img {
    width: 36px; height: 36px;
    border-radius: 50%;   /* exception — circular photo mask */
}
.mbre-attribution-name { font-size: 14px; font-weight: 500; }
.mbre-attribution-firm,
.mbre-attribution-meta { font-size: 13px; color: var(--muted); }

/* ─── Stat Pills (S3) — Feb's blue background ───────────── */
.mbre-stat-row {
    display: grid;
    gap: 12px;
    margin-bottom: 36px;
}
.mbre-stat-row[data-cols="2"] { grid-template-columns: repeat(2, 1fr); }
.mbre-stat-row[data-cols="3"] { grid-template-columns: repeat(3, 1fr); }
.mbre-stat-row[data-cols="4"] { grid-template-columns: repeat(4, 1fr); }
.mbre-stat-row[data-cols="5"] { grid-template-columns: repeat(5, 1fr); }

.mbre-stat-pill {
    background: var(--blue);
    color: var(--white);
    padding: 18px 14px;
    text-align: center;
}
.mbre-stat-pill__label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 8px;
}
.stat-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}
.stat-delta {
    display: block;
    font-size: 18px;
    font-weight: 500;
    margin-top: 4px;
}
.stat-delta.up   { color: #c8f7dc; }                /* light green on blue */
.stat-delta.down { color: #ffd6d6; }                /* light red on blue */
.stat-delta.flat { color: rgba(255, 255, 255, 0.6); }
.stat-label {
    display: block;
    font-size: 16px;
    margin-top: 6px;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* ─── Table Labels ──────────────────────────────────────── */
.mbre-table-label {
    font-size: 18px;
    font-weight: 500;
    color: #000000;
    margin: 24px 0 10px !important;
}
.mbre-table-label span {
    font-weight: 400;
    color: var(--muted);
}

/* ─── Data + Community Tables (S4, S5, S6, S7) ──────────── */
.mbre-table-wrap { overflow-x: auto; margin-bottom: 8px; }

.mbre-data-table,
.mbre-community-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.mbre-data-table th, .mbre-community-table th {
    background: #161616;
    color: var(--white);
    padding: 10px 12px;
    font-weight: 500;
    text-align: left;
    font-size: 16px;
}
.mbre-data-table th.right,
.mbre-community-table th.right { text-align: right; }
.mbre-data-table td,
.mbre-community-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--rule);
    font-size: 18px;
}
.mbre-data-table td.right,
.mbre-community-table td.right { text-align: right; }
.mbre-data-table td.metric,
.mbre-community-table td.metric { font-weight: 500; }
.mbre-data-table tr:nth-child(even) td { background: #fafafa; }
.mbre-data-table tr.highlight-row td,
.mbre-community-table tr.highlight-row td { background: #F0F7FB !important; }

.community-name { font-weight: 500; }
.zip-meta {
    font-size: 16px;
    color: var(--faint);
    display: block;
    font-weight: 400;
    margin-top: 2px;
}
.mbre-data-table table tr a,
.mbre-community-table table tr a,
.mbre-data-table tr a,
.mbre-community-table tr a { color: var(--blue); }

/* Delta colour classes (inside table cells) */
.td-delta { font-weight: 500; font-size: 18px; }
.td-delta.up   { color: var(--pos); }
.td-delta.down { color: var(--neg); }
.td-delta.flat { color: var(--muted); }

/* Group header rows (S7 grouped ZIP table) */
table.mbre-data-table tbody tr.group-header td {
    background: var(--blue-lt);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #000000;
    padding: 7px 14px;
}

/* Source notes */
.mbre-source-note {
    font-size: 16px;
    color: var(--faint);
    margin: 8px 0 32px;
    line-height: 1.5;
}

/* ─── Commentary (S8) — March style w/ blue-tint pull quote ─── */
.mbre-commentary {
    background: var(--off);
    padding: 28px;
    margin-bottom: 32px;
}
.mbre-commentary-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--rule);
}
.mbre-commentary-monogram img {
    width: 30px; height: 30px;
    border-radius: 50%;   /* exception — circular photo */
}
.mbre-commentary-meta {
    font-size: 16px;
    color: var(--muted);
}
.mbre-commentary-meta strong {
    color: var(--ink);
    margin-right: 4px;
}
.mbre-commentary-body p {
    margin-bottom: 14px;
    font-size: 20px;
    line-height: 1.75;
}
.mbre-commentary-body blockquote {
    border-left: 4px solid var(--blue) !important;
    margin: 20px 0;
    padding: 12px 20px;
    background: var(--blue-lt) !important;
}
.mbre-commentary-body blockquote p::before { content: "\201C";}
.mbre-commentary-body blockquote p {
    font-weight: 500;
    color: #000000;
    margin: 0;
}

/* ─── Download Stack (S9) ───────────────────────────────── */
.mbre-download-stack {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-bottom: 16px;
}
.mbre-download-block-wrap { display: block; }

.mbre-download-block {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    background: var(--off);
    padding: 24px;
    margin-bottom: 8px;
}
.mbre-download-cover img {
    width: 200px;
    height: auto;
    display: block;
}
.mbre-download-info { flex: 1; }
.dl-label {
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--blue);
    font-weight: 600;
}
.dl-title {
    font-weight: 500;
    margin: 4px 0 8px;
    color: var(--ink);
}
.dl-desc {
    font-size: 15px;
    color: var(--muted);
    margin-bottom: 16px;
}
.mbre-download-btns {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.mbre-btn,
.mbre-btn-outline {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}
.mbre-btn {
    background: var(--blue);
    color: var(--white);
}
.mbre-btn:hover {
    background: var(--blue-dk);
    text-decoration: none;
    color: var(--white);
}
.mbre-btn-outline {
    border: 1px solid var(--blue);
    color: var(--blue);
    background: transparent;
}
.mbre-btn-outline:hover {
    background: var(--blue);
    color: var(--white);
    text-decoration: none;
}

/* ─── FAQ (S10) ─────────────────────────────────────────── */
.mbre-faq-section { margin-bottom: 32px; }
.mbre-faq-section details:first-child {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--rule);
}
.mbre-faq-section details {
    border-bottom: 1px solid var(--rule);
    margin-bottom: 15px;
    overflow: hidden;
}
.mbre-faq-section summary {
    padding: 8px 16px 18px 16px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
    color: var(--ink);
}
.mbre-faq-section summary::-webkit-details-marker { display: none; }
.mbre-faq-section summary::after {
    content: "+ ";
    color: var(--blue);
    font-weight: 600;
}
.mbre-faq-section details[open] summary::after {
    content: "− ";
}
.mbre-faq-section .faq-answer {
    font-size: 18px;
    line-height: 1.7;
    color: var(--ink);
}
.mbre-faq-section .faq-answer p {
    padding: 4px 18px 18px;
    margin: 0;
}

/* ─── IDX Wrapper (S11) ─────────────────────────────────── */
.mbre-idx-wrapper {
    background: #dbe9fd;
    padding-bottom: 45px;
    font-size: 14px;
}
.sidx-listings-map,
.sidx-widget.sidx-hotsheet .sidx-search-results { max-width: 100% !important; }

/* ─── Research Library (S12) — Feb's 2-col off-white blocks ─── */
.mbre-section.mbre-section--s12{ padding-bottom: 30px; }
.mbre-section.mbre-section--s12 p {margin-bottom: 20px;}
.mbre-research-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}
.mbre-resource-block {
    background: #ddeafc;
    padding: 20px 24px;
}
.rb-heading {
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--deep-blue);
    font-weight: 500;
}
.mbre-resource-block a {
    display: block;
    font-weight: 400;
    padding: 6px 0;
    color: var(--blue);
}
.mbre-research-closing {
    margin-top: 10px;
    font-size: 16px;
    line-height: 1.6;
}

/* ─── CTA Block (S13) — black + family photo ────────────── */
.mbre-cta-block {
    background: var(--ink);
    overflow: hidden;
    margin-bottom: 0;
}
.mbre-cta-proof {
    display: flex;
    justify-content: flex-start;
    gap: 5px 14px;
    padding: 10px 20px;
    background: var(--blue);
    flex-wrap: wrap;
}
.mbre-cta-proof span {
    font-size: 16px;
    font-weight: 500;
    color: var(--white);
    white-space: nowrap;
}
.proof-sep { color: #444; }

.mbre-cta-inner {
    display: flex;
    gap: 0;
}
.mbre-cta-body {
    flex: 1;
    padding: 32px 40px;
    color: var(--white);
}
.mbre-cta-body h2 {
    color: var(--white);
    margin-bottom: 12px;
}
.mbre-cta-block p {
    color: #BBBBBB;
    font-size: 20px;
    line-height: 1.7;
    margin: 0 0 22px;
}
.mbre-cta-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.mbre-cta-buttons .mbre-btn {
    padding: 14px 26px;
    font-size: 18px;
    font-weight: 700;
}
.mbre-cta-buttons .mbre-btn-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--white);
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    padding: 14px 26px;
    border: 1px solid #444;
}
.mbre-cta-buttons .mbre-btn-phone:hover {
    border-color: var(--blue);
    color: var(--white);
}
.mbre-cta-buttons .mbre-btn-phone svg { opacity: 0.7; }

.mbre-cta-photo {
    width: 520px;
    flex-shrink: 0;
    min-height: 300px;
}
.mbre-cta-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ─── Universal Custom-HTML Appender ────────────────────── */
.mbre-section--s3 p { margin-bottom: 25px; }
.mbre-section-custom { margin-top: 24px; }
.mbre-section-custom table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 8px;
}
.mbre-section-custom table th {
    background: var(--deep-blue);
    color: var(--white);
    padding: 10px 12px;
    font-weight: 500;
    text-align: left;
    font-size: 16px;
}
.mbre-section-custom table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--rule);
    font-size: 18px;
}

/* ─── Hero Block (S1) ───────────────────────────────────── */
.mbre-nabor-hero { margin-bottom: 24px; }
.mbre-nabor-hero__img { margin-top: 16px; }
.mbre-nabor-hero__img img {
    width: 100%;
    height: auto;
    display: block;
}

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 1024px) {
    .mbre-stat-row[data-cols="5"] { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .mbre-cta-proof{ justify-content:center; }
    .mbre-cta-proof .proof-sep{ display:none; }
    .mbre-stat-row[data-cols="4"] { grid-template-columns: repeat(2, 1fr); }
    .mbre-stat-row[data-cols="5"] { grid-template-columns: repeat(2, 1fr); }
    .mbre-stat-row[data-cols="3"] { grid-template-columns: repeat(2, 1fr); }

    .mbre-commentary-monogram img { width: 300px !important; height: 100%; }

    .mbre-download-block { flex-direction: column; align-items: center; }
    .mbre-download-cover img { width: 100%; max-width: 300px; }
    .mbre-btn, .mbre-btn-outline { width: 100%; text-align: center; }

    .mbre-cta-inner { flex-direction: column; }
    .mbre-cta-photo { width: 100%; min-height: 200px;order: -1; }
    .mbre-cta-body { padding: 28px 24px; }
    .mbre-data-table th:not(:first-child), .mbre-community-table th:not(:first-child), .mbre-data-table td:not(:first-child), .mbre-community-table td:not(:first-child){ text-align: center !important; }
    .mbre-section.mbre-section--s7 .mbre-data-table th:nth-child(2), .mbre-section.mbre-section--s7 .mbre-data-table td:nth-child(2) { text-align: left !important; }
    .zip-meta{ font-size:13px; }
    .mbre-data-table th,
    .mbre-community-table th {
        padding: 9px 10px;
        font-size: 13px;
    }
    .mbre-data-table td,
    .mbre-community-table td {
        padding: 9px 10px;
        font-size: 14px;
    }
    .td-delta { font-size: 14px; }
}

/* 660px: smaller component-failure breakpoint
 * Reason: stat row + research grid + CTA need single-column at narrow tablet widths
 */
@media (max-width: 660px) {
    .mbre-stat-row { grid-template-columns: 1fr !important; }
    .mbre-research-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .mbre-section-label {
        font-size: 14px;
        margin: 36px 0 14px;
    }
    .mbre-summary-card { padding: 20px; }
    .mbre-commentary { padding: 22px; }
    .mbre-attribution { flex-wrap: wrap; }
}