/*
 * ElectricChoice Standalone Page Styles
 * ======================================
 * Content components only — nav/hero/footer styles live in the
 * PHP includes (header.php / footer.php) as inline <style> blocks,
 * synced from the WP theme.
 *
 * Last synced with WP theme: Feb 2026
 */

/* ============================================
   FONTS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500;1,600;1,700;1,800&display=swap');

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --body-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --heading-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--body-font);
    color: #0A2540;
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: #0E9F6E;
}

img {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    color: #0A2540;
    text-transform: none;
}

h1 { font-size: 40px; font-weight: 700; line-height: 1.3; }
h2 { font-size: 32px; font-weight: 600; padding-bottom: 20px; }
h3 { font-size: 24px; padding-bottom: 20px; }
h4 { font-size: 20px; padding-bottom: 15px; }

p {
    font-family: var(--body-font);
    color: #374151;
    line-height: 1.7;
    font-size: 16px;
}

ul {
    padding: 0 0 0.8em 1.143em;
}

/* ============================================
   PAGE LAYOUT
   ============================================ */
#page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.ec-page-content {
    flex: 1;
    max-width: 1300px;
    margin: 0 auto;
    padding: 60px 32px 80px;
    width: 100%;
}

.ec-page-content--narrow {
    max-width: 900px;
}

.ec-section {
    margin-bottom: 60px;
}

.ec-section:last-child {
    margin-bottom: 0;
}

/* ============================================
   CONTENT COMPONENTS
   ============================================ */

/* --- Breadcrumbs --- */
.ec-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.ec-breadcrumbs a {
    color: #0E9F6E;
    text-decoration: none;
    font-weight: 500;
}
.ec-breadcrumbs a:hover { text-decoration: underline; }
.ec-breadcrumbs .separator { color: #d1d5db; }

/* --- Page Hero / Title --- */
.ec-page-hero { margin-bottom: 40px; }

.ec-page-meta {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 14px;
    color: #6b7280;
    margin: 12px 0 20px;
    flex-wrap: wrap;
}
.ec-badge {
    display: inline;
    color: #16a34a;
    font-size: 14px;
    font-weight: 700;
    background: none;
    border: none;
    padding: 0;
    border-radius: 0;
}
.ec-badge i { display: none; }
.ec-page-intro {
    font-size: 18px;
    line-height: 1.75;
    color: #374151;
    max-width: 820px;
}

/* --- Key Takeaways --- */
.ec-takeaways {
    background: #f0fdf4;
    border: none;
    border-left: 4px solid #16a34a;
    border-radius: 0 8px 8px 0;
    padding: 28px 32px;
    margin: 40px 0;
}
.ec-takeaways h3 {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 16px;
    padding: 0;
    color: #16a34a;
}
.ec-takeaways-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 32px;
}
.ec-takeaway-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
}
.ec-takeaway-item::before {
    content: '\2022';
    color: #16a34a;
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}
.ec-takeaway-item strong { color: #1f1f1f; font-weight: 700; }
.ec-takeaway-item i { display: none; }

/* --- Stats Row --- */
.ec-stats {
    display: flex;
    margin: 32px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}
.ec-stat-card {
    flex: 1;
    padding: 24px 24px 24px 0;
    text-align: left;
    border-right: 1px solid #e5e7eb;
    background: none;
    border-radius: 0;
}
.ec-stat-card:last-child { border-right: none; }
.ec-stat-card:not(:first-child) { padding-left: 24px; }
.ec-stat-value {
    font-size: 42px;
    font-weight: 800;
    color: #1f1f1f;
    line-height: 1;
    margin-bottom: 6px;
}
.ec-stat-value--green { color: #16a34a; }
.ec-stat-value--orange { color: #dc2626; }
.ec-stat-label {
    font-size: 12px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* --- Comparison Cards --- */
.ec-comparison {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 32px 0;
}
.ec-comparison-card {
    border-radius: 14px;
    padding: 24px;
    border: 1px solid #e5e7eb;
}
.ec-comparison-card--low  { background: linear-gradient(180deg, #dcfce7 0%, #f0fdf4 100%); border-color: #bbf7d0; }
.ec-comparison-card--high { background: linear-gradient(180deg, #fecdd3 0%, #fff1f2 100%); border-color: #fecaca; }
.ec-comparison-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin-bottom: 8px;
}
.ec-comparison-card--low .ec-comparison-label { color: #047857; }
.ec-comparison-card--high .ec-comparison-label { color: #b91c1c; }
.ec-comparison-state {
    font-size: 22px;
    font-weight: 700;
    color: #1f1f1f;
    margin-bottom: 4px;
}
.ec-comparison-rate { font-size: 18px; font-weight: 700; color: #374151; }
.ec-comparison-card--low .ec-comparison-rate { color: #16a34a; }
.ec-comparison-card--high .ec-comparison-rate { color: #dc2626; }
.ec-comparison-note { font-size: 13px; color: #6b7280; margin-top: 4px; }

/* --- Section Headers (numbered) --- */
.ec-content-section { margin: 64px 0; padding-top: 48px; border-top: 1px solid #e5e7eb; }
.ec-content-section:first-child { margin-top: 0; border-top: none; padding-top: 0; }
.ec-section-label { display: inline; margin: 0; }
.ec-section-num {
    color: #d1d5db;
    font-size: 28px;
    font-weight: 800;
    margin-right: 12px;
}
.ec-content-section h2 {
    display: inline;
    margin: 0;
    vertical-align: baseline;
}
.ec-content-section > p {
    display: block;
    font-size: 16px;
    line-height: 1.7;
    color: #4b5563;
    max-width: 780px;
    margin: 16px 0 24px;
}

/* --- Data Tables --- */
.ec-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.ec-table-info {
    font-size: 14px;
    color: #6b7280;
}
.ec-table-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 14px;
    max-width: 260px;
}
.ec-table-search i { color: #9ca3af; font-size: 16px; flex-shrink: 0; }
.ec-table-search input {
    border: none;
    background: none;
    font-size: 14px;
    color: #1f1f1f;
    outline: none;
    width: 100%;
    font-family: var(--body-font);
}
.ec-table-search input::placeholder { color: #9ca3af; }

.ec-table-wrap {
    overflow-x: auto;
    border-radius: 0;
    border: 1px solid #e5e7eb;
    border-left: none;
    border-right: none;
    margin: 0 0 16px;
}
.ec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    min-width: 500px;
}
.ec-table thead th {
    background: #f9fafb;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    padding: 14px 16px;
    border-bottom: 2px solid #e5e7eb;
    text-align: left;
}
.ec-table thead th.ec-col-right { text-align: right; }
.ec-table tbody td {
    padding: 16px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
}
.ec-table tbody td.ec-col-right { text-align: right; white-space: nowrap; }
.ec-table tbody tr:nth-child(even) { background: #f9fafb; }
.ec-table tbody tr:hover { background: #f3f4f6; }
.ec-table tbody tr:last-child td { border-bottom: none; }
.ec-table tbody tr.ec-table-highlight {
    background: #f9fafb !important;
    font-weight: 700;
}
.ec-table tbody tr.ec-table-highlight td {
    border-top: 2px solid #e5e7eb;
    border-bottom: 2px solid #e5e7eb !important;
    color: #1f1f1f;
}
.ec-table .ec-state-link {
    color: #374151;
    font-weight: 600;
    text-decoration: none;
}
.ec-table .ec-state-link:hover { color: #16a34a; text-decoration: underline; }
.ec-rate-change { font-size: 13px; font-weight: 600; }
.ec-rate-change--up { color: #dc2626; }
.ec-rate-change--down { color: #16a34a; }
.ec-table caption {
    caption-side: bottom;
    font-size: 12px;
    color: #9ca3af;
    padding: 12px 16px;
    text-align: left;
    line-height: 1.5;
}

/* --- FAQ Accordion --- */
.ec-faq { margin: 32px 0; }
.ec-faq details { border-bottom: 1px solid #e5e7eb; }
.ec-faq details:first-child { border-top: 1px solid #e5e7eb; }
.ec-faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 4px;
    font-size: 17px;
    font-weight: 600;
    color: #1f1f1f;
    cursor: pointer;
    list-style: none;
    transition: color 0.2s ease;
}
.ec-faq summary::-webkit-details-marker { display: none; }
.ec-faq summary::marker { display: none; content: ''; }
.ec-faq summary::after {
    content: '+';
    font-size: 24px;
    font-weight: 400;
    color: #9ca3af;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
    transition: color 0.2s ease;
}
.ec-faq summary:hover { color: #047857; }
.ec-faq details[open] summary { color: #047857; }
.ec-faq details[open] summary::after { content: '\2212'; color: #047857; }
.ec-faq .ec-faq-answer {
    padding: 0 4px 24px;
    font-size: 15px;
    line-height: 1.8;
    color: #4b5563;
}
.ec-faq .ec-faq-answer p { margin: 0 0 12px; }
.ec-faq .ec-faq-answer p:last-child { margin-bottom: 0; }

/* --- Info Box --- */
.ec-info-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 28px 32px;
    margin: 32px 0;
}
.ec-info-box h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px;
    padding: 0;
    color: #1f1f1f;
}
.ec-info-box p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.8;
}

/* --- Card component --- */
.ec-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: 24px;
}
.ec-card-body {
    padding: 32px;
}

/* --- CTA Button --- */
.ec-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: var(--body-font);
}
.ec-btn--primary {
    background: #0C8C60;
    color: #fff;
}
.ec-btn--primary:hover {
    background: #0a7550;
    color: #fff;
}
.ec-btn--secondary {
    background: #ECFDF5;
    color: #0E9F6E;
    border: 1px solid #D1FAE5;
}
.ec-btn--secondary:hover {
    background: #D1FAE5;
}
.ec-btn--green {
    background: #0E9F6E;
    color: #fff;
}
.ec-btn--green:hover {
    background: #0C8C60;
    color: #fff;
}

/* --- Grid helpers --- */
.ec-grid {
    display: grid;
    gap: 32px;
}
.ec-grid--2 { grid-template-columns: 1fr; }
.ec-grid--3 { grid-template-columns: 1fr; }
@media (min-width: 768px) {
    .ec-grid--2 { grid-template-columns: repeat(2, 1fr); }
    .ec-grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .ec-grid--3 { grid-template-columns: repeat(3, 1fr); }
}

/* --- Bottom CTA Banner --- */
.ec-bottom-cta {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    padding: 56px 32px;
    text-align: center;
    margin: 64px 0 0;
}
.ec-bottom-cta h3 {
    font-size: 28px;
    font-weight: 800;
    color: #1f1f1f;
    margin: 0 0 8px;
    padding: 0;
    line-height: 1.35;
}
.ec-bottom-cta p {
    font-size: 16px;
    color: #6b7280;
    margin: 0 0 28px;
}

/* ============================================
   D3 Interactive US Map
   ============================================ */
.ecus-map-container { position: relative; }
.ecus-map-header { text-align: center; margin-bottom: 24px; }
.ecus-map-title { font-size: 1.5rem; font-weight: 800; color: #0d0d0d; margin-bottom: 8px; display: block !important; }
.ecus-map-subtitle { font-size: 1rem; color: #6b7280; font-weight: 400; }
.ecus-map-wrapper { display: flex; gap: 40px; align-items: flex-start; flex-wrap: wrap; justify-content: center; max-width: 1100px; margin: 0 auto; }
.ecus-map-svg { flex: 1 1 65%; min-width: 400px; max-width: 900px; }
.ecus-map-svg svg { width: 100%; height: auto; display: block; min-height: 450px; }
.ecus-map-svg svg path.ecus-state { stroke: #fff; stroke-width: 1px; cursor: pointer; transition: opacity .15s ease, stroke-width .15s ease; }
.ecus-map-svg svg path.ecus-state:hover { opacity: .85; stroke-width: 2px; stroke: #1f2937; }
.ecus-map-legend { flex: 0 0 240px; background: #fff; border-radius: 16px; padding: 20px; border: 1px solid #e5e7eb; }
.ecus-legend-title { font-size: 1rem; font-weight: 700; color: #1f2937; margin-bottom: 16px; }
.ecus-legend-items { display: flex; flex-direction: column; gap: 10px; }
.ecus-legend-item { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 8px 12px; border-radius: 8px; transition: background-color .15s ease; white-space: nowrap; }
.ecus-legend-item:hover { background: #f3f4f6; }
.ecus-legend-color { width: 20px; height: 20px; border-radius: 4px; flex-shrink: 0; border: 1px solid rgba(0,0,0,.1); }
.ecus-legend-color.cat-verylow { background: #10b981; }
.ecus-legend-color.cat-low { background: #34d399; }
.ecus-legend-color.cat-average { background: #fbbf24; }
.ecus-legend-color.cat-moderate { background: #f97316; }
.ecus-legend-color.cat-high { background: #ef4444; }
.ecus-legend-color.cat-veryhigh { background: #991b1b; }
.ecus-legend-label { font-size: .85rem; font-weight: 500; color: #374151; flex-shrink: 0; }
.ecus-legend-range { font-size: .8rem; color: #6b7280; margin-left: auto; flex-shrink: 0; }
.ecus-stats-box { margin-top: 20px; padding-top: 20px; border-top: 1px solid #e5e7eb; }
.ecus-stats-title { font-size: .875rem; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 12px; }
.ecus-stat-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; }
.ecus-stat-label { font-size: .875rem; color: #374151; }
.ecus-stat-value { font-size: .875rem; font-weight: 700; color: #0d0d0d; }
.ecus-stat-value.low { color: #059669; }
.ecus-stat-value.high { color: #dc2626; }
.ecus-map-tooltip { position: absolute; background: #111827; color: #fff; padding: 16px 20px; border-radius: 12px; font-size: .9375rem; pointer-events: none; z-index: 1000; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: 280px; opacity: 0; transition: opacity .15s ease; }
.ecus-map-tooltip.ecus-visible { opacity: 1; }
.ecus-tooltip-state { font-weight: 700; font-size: 1.125rem; margin-bottom: 8px; display: block; color: #fff; }
.ecus-tooltip-rate-label { font-size: .8rem; color: #9ca3af; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.ecus-tooltip-rate-value { font-size: 1.5rem; font-weight: 800; color: #34d399; line-height: 1; }
.ecus-tooltip-comparison { margin-top: 10px; padding-top: 10px; border-top: 1px solid #374151; font-size: .8rem; color: #9ca3af; }
.ecus-tooltip-comparison .higher { color: #f87171; }
.ecus-tooltip-comparison .lower { color: #34d399; }
@media (max-width: 900px) {
    .ecus-map-wrapper { flex-direction: column; }
    .ecus-map-svg { min-width: 100%; max-width: 100%; }
    .ecus-map-legend { flex: 1 1 100%; width: 100%; }
}
@media (max-width: 600px) {
    .ecus-map-svg svg { min-height: 300px; }
    .ecus-map-title { font-size: 1.25rem; }
}

/* ============================================
   RESPONSIVE — Content
   ============================================ */
@media (max-width: 768px) {
    .ec-page-content {
        padding: 32px 20px 60px;
    }
    h1 { font-size: 28px; }
    h2 { font-size: 24px; }
    h3 { font-size: 20px; }
    .ec-takeaways-grid { grid-template-columns: 1fr; }
    .ec-takeaways { padding: 20px 24px; }
    .ec-page-intro { font-size: 16px; }
    .ec-content-section { margin: 48px 0; padding-top: 32px; }
}
@media (max-width: 640px) {
    .ec-stats { flex-wrap: wrap; }
    .ec-stat-card { flex: 0 0 50%; box-sizing: border-box; border-bottom: 1px solid #e5e7eb; }
    .ec-stat-card:nth-child(2) { border-right: none; }
    .ec-stat-card:nth-child(3) { padding-left: 0; }
    .ec-stat-card:nth-child(4) { border-right: none; border-bottom: none; }
    .ec-stat-value { font-size: 32px; }
    .ec-bottom-cta { padding: 36px 20px; }
    .ec-bottom-cta h3 { font-size: 22px; }
}
@media (max-width: 480px) {
    .ec-comparison { grid-template-columns: 1fr; }
    .ec-faq summary { font-size: 15px; padding: 16px 4px; }
    .ec-info-box { padding: 20px; }
    .ec-stat-value { font-size: 28px; }
    .ec-stat-card { padding: 16px 16px 16px 0; }
    .ec-stat-card:not(:first-child) { padding-left: 16px; }
}
@media (max-width: 400px) {
    .ec-page-content {
        padding: 24px 16px 48px;
    }
}
