/* My Sunrun Experience — Master Stylesheet */
/* Consolidated from all section pages */

/* ============================================
   1. RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
}

p {
    margin-bottom: 1rem;
    color: #555;
    line-height: 1.8;
}

ul {
    margin-left: 1.5rem;
    color: #555;
}

li {
    margin-bottom: 0.5rem;
}

h4 {
    font-size: 1.1rem;
    margin: 1.5rem 0 0.75rem 0;
    color: #1a1a1a;
    font-weight: 600;
}

/* ============================================
   2. LAYOUT
   ============================================ */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 4rem 2rem;
    border-bottom: 1px solid #f0f0f0;
}

section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #1a1a1a;
}

section h3 {
    font-size: 1.3rem;
    margin: 2rem 0 1rem 0;
    color: #1a1a1a;
    font-weight: 600;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* ============================================
   3. NAVIGATION
   ============================================ */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #f0f0f0;
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

nav .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #1a1a1a;
    transition: color 0.3s;
}

nav .logo:hover {
    color: #0066cc;
}

nav .logo .logo-icon {
    display: block;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    gap: 2rem;
}

nav ul li a {
    color: #666;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #1a1a1a;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #1a1a1a;
}

/* ============================================
   4. CALLOUTS & HIGHLIGHTS
   ============================================ */
.callout {
    background: #f0f8ff;
    border-left: 4px solid #0066cc;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 4px;
}

.callout strong {
    color: #0066cc;
}

.danger-callout {
    background: #fff5f5;
    border-left: 4px solid #dc3545;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 4px;
}

.danger-callout strong {
    color: #dc3545;
}

.amber-callout {
    background: #fffbf0;
    border-left: 4px solid #e67e22;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 4px;
}

.amber-callout strong {
    color: #e67e22;
}

.highlight {
    background: #fff8e1;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    border: 1px solid #ffe082;
}

.contract-quote {
    background: #fafafa;
    border-left: 4px solid #999;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 4px;
    font-style: italic;
    color: #666;
    font-size: 0.95rem;
}

.contract-ref {
    display: inline-block;
    background: #e0e0e0;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 0.5rem;
    font-style: normal;
}

/* ============================================
   5. METRIC BOXES & STAT CARDS
   ============================================ */
.metric-box {
    background: white;
    border: 1px solid #f0f0f0;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.metric-box .metric-label {
    color: #999;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.metric-box .metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a1a;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.75rem;
    margin-top: 2rem;
}

.stat-card {
    background: white;
    padding: 1rem 0.5rem;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    text-align: center;
}

.stat-card .label {
    font-size: 0.7rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.35rem;
}

.stat-card .value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a1a1a;
}

/* ============================================
   6. TABLES
   ============================================ */
.table-wrap {
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead {
    background: #f5f5f5;
    font-weight: 600;
    font-size: 0.9rem;
}

th {
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid #eee;
    color: #666;
}

td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
}

tbody tr:hover {
    background: #fafafa;
}

/* Scrollable table */
.scrollable-table-wrap {
    max-height: 500px;
    overflow-y: auto;
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.scrollable-table-wrap table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.88rem;
}

.scrollable-table-wrap thead {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #2c3e50;
}

.scrollable-table-wrap thead th {
    color: #fff;
    padding: 0.75rem 0.6rem;
    font-size: 0.8rem;
    white-space: nowrap;
    border-bottom: none;
}

.scrollable-table-wrap td {
    padding: 0.5rem 0.6rem;
    white-space: nowrap;
    font-size: 0.85rem;
}

.scrollable-table-wrap tfoot {
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: #f8f9fa;
    font-weight: 700;
}

.scrollable-table-wrap tfoot td {
    padding: 0.75rem 0.6rem;
    border-top: 2px solid #333;
    color: #1a1a1a;
}

.scrollable-table-wrap tbody tr:nth-child(even) {
    background: #fafafa;
}

.scrollable-table-wrap tbody tr:hover {
    background: #f0f4ff;
}

/* Spec table */
.spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.spec-table caption {
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    color: #1a1a1a;
    padding-bottom: 0.75rem;
}

.spec-table th {
    text-align: left;
    color: #888;
    font-weight: 500;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 0.75rem;
    border-bottom: 2px solid #eee;
    white-space: nowrap;
}

.spec-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f5f5f5;
    color: #444;
}

.spec-table td:first-child {
    color: #666;
    font-weight: 500;
    white-space: nowrap;
    width: 44%;
}

.spec-table td:last-child {
    font-weight: 600;
    color: #1a1a1a;
}

.spec-table tr:hover {
    background: #fafafa;
}

.spec-table .section-break td {
    padding-top: 1rem;
    border-bottom: 2px solid #eee;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    font-weight: 600;
}

.spec-table .highlight-row td {
    background: #fffbf0;
}

.spec-table .danger-row td {
    background: #fff5f5;
}

.spec-tables-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

/* Violation table */
.violation-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.violation-table thead {
    background: #2c3e50;
}

.violation-table th {
    color: white;
    padding: 0.9rem 1rem;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 600;
    border-bottom: none;
}

.violation-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
    vertical-align: top;
}

.violation-table tbody tr:hover {
    background: #fff5f5;
}

/* ============================================
   7. CHARTS
   ============================================ */
.chart-container {
    position: relative;
    height: 400px;
    margin: 2rem 0;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

.chart-container.tall {
    height: 500px;
}

/* ============================================
   8. PHOTO GALLERIES
   ============================================ */

/* Roof gallery */
.roof-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.roof-gallery figure {
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    background: #fafafa;
    transition: box-shadow 0.3s;
}

.roof-gallery figure:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.roof-gallery figure.full-width {
    grid-column: 1 / -1;
}

.roof-gallery .img-wrap {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.roof-gallery .img-wrap img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

.roof-gallery .img-wrap:hover img {
    transform: scale(1.02);
}

.roof-gallery .img-wrap::after {
    content: '\1F50D  Click to enlarge';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 2rem 1rem 0.75rem;
    font-size: 0.8rem;
    text-align: right;
    opacity: 0;
    transition: opacity 0.3s;
}

.roof-gallery .img-wrap:hover::after {
    opacity: 1;
}

.roof-gallery figcaption {
    padding: 1rem 1.25rem 1.25rem;
    font-size: 0.92rem;
    color: #555;
    line-height: 1.6;
}

.roof-gallery figcaption .photo-label {
    display: inline-block;
    background: #2c3e50;
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.roof-gallery figcaption .photo-label.critical {
    background: #dc3545;
}

.roof-gallery figcaption .photo-label.warning {
    background: #e67e22;
}

.roof-gallery figcaption h4 {
    font-size: 1.05rem;
    color: #1a1a1a;
    margin: 0.4rem 0;
}

/* LCD gallery */
.lcd-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.lcd-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fafafa;
    cursor: pointer;
    transition: box-shadow 0.3s, transform 0.2s;
}

.lcd-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.lcd-card img {
    width: 100%;
    height: auto;
    display: block;
}

.lcd-card .lcd-label {
    padding: 0.6rem 0.75rem;
    font-size: 0.78rem;
    color: #555;
    border-top: 1px solid #eee;
    line-height: 1.4;
}

.lcd-card .lcd-label strong {
    display: block;
    color: #1a1a1a;
    font-size: 0.85rem;
}

.lcd-card .lcd-label .lcd-reading {
    font-family: 'Courier New', monospace;
    color: #2c3e50;
    font-weight: 600;
}

/* System hero */
.system-hero {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 2.5rem;
    margin: 2rem 0;
    align-items: start;
}

.system-hero-photo {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    background: #fafafa;
    cursor: pointer;
    position: relative;
    transition: box-shadow 0.3s;
}

.system-hero-photo:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.system-hero-photo img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

.system-hero-photo:hover img {
    transform: scale(1.02);
}

.system-hero-photo::after {
    content: '\1F50D  Click to enlarge';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 2rem 1rem 0.75rem;
    font-size: 0.8rem;
    text-align: right;
    opacity: 0;
    transition: opacity 0.3s;
}

.system-hero-photo:hover::after {
    opacity: 1;
}

.system-hero-photo .photo-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ============================================
   9. STATE COMPARISONS
   ============================================ */
.state-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.state-card {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    background: #fafafa;
}

.state-card .state-header {
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.state-card.normal .state-header {
    background: #d4edda;
    color: #155724;
}

.state-card.fault .state-header {
    background: #f8d7da;
    color: #721c24;
}

.state-card .img-wrap {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.state-card .img-wrap img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

.state-card .img-wrap:hover img {
    transform: scale(1.02);
}

.state-card .img-wrap::after {
    content: '\1F50D  Click to enlarge';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 2rem 1rem 0.75rem;
    font-size: 0.8rem;
    text-align: right;
    opacity: 0;
    transition: opacity 0.3s;
}

.state-card .img-wrap:hover::after {
    opacity: 1;
}

.state-card .state-desc {
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
}

/* Discrepancy visual */
.discrepancy-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    align-items: center;
    margin: 2rem 0;
}

.discrepancy-card {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 8px;
}

.discrepancy-card.planned {
    background: #f0f8ff;
    border: 2px solid #0066cc;
}

.discrepancy-card.actual {
    background: #f0fff0;
    border: 2px solid #28a745;
}

.discrepancy-card .disc-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 0.5rem;
}

.discrepancy-card .disc-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
}

.discrepancy-card .disc-detail {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.5rem;
}

.discrepancy-arrow {
    font-size: 2rem;
    color: #999;
}

/* ============================================
   10. MONITORING SECTION
   ============================================ */

/* Side-by-side comparison */
.evidence-comparison {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2.5rem;
    margin: 2.5rem 0;
    align-items: start;
}

.app-screenshot-wrap {
    position: relative;
    max-width: 280px;
}

.app-screenshot-wrap img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
    border: 3px solid #1a1a2e;
}

.app-screenshot-wrap .screenshot-label {
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #999;
}

.reality-panel {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 2rem;
    color: #e0e0e0;
}

.reality-panel h4 {
    color: #ff6b6b;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reality-panel .fault-row {
    display: grid;
    grid-template-columns: 110px 80px 1fr;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.88rem;
    align-items: center;
}

.reality-panel .fault-row:last-child {
    border-bottom: none;
}

.reality-panel .fault-date {
    color: #aaa;
    font-family: 'Courier New', monospace;
}

.reality-panel .fault-time {
    color: #ff9800;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.reality-panel .fault-bar-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reality-panel .fault-bar {
    height: 14px;
    background: linear-gradient(90deg, #ff6b6b, #ff3333);
    border-radius: 2px;
    min-width: 4px;
}

.reality-panel .fault-kwh {
    color: #ff6b6b;
    font-size: 0.8rem;
    white-space: nowrap;
}

.reality-panel .panel-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.reality-panel .panel-footer strong {
    color: #ff6b6b;
}

.vs-badge {
    position: absolute;
    right: -1.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: #dc3545;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
    z-index: 2;
}

/* Customer service timeline */
.cs-timeline {
    position: relative;
    margin: 2rem 0;
    padding-left: 3rem;
}

.cs-timeline::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #dc3545, #ff9800, #dc3545);
    border-radius: 2px;
}

.cs-event {
    position: relative;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    transition: box-shadow 0.3s;
}

.cs-event:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.cs-event::before {
    content: '';
    position: absolute;
    left: -2.4rem;
    top: 1.5rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #dc3545;
}

.cs-event.me::before {
    background: #0066cc;
    box-shadow: 0 0 0 2px #0066cc;
}

.cs-event.sunrun::before {
    background: #dc3545;
    box-shadow: 0 0 0 2px #dc3545;
}

.cs-event.silence::before {
    background: #999;
    box-shadow: 0 0 0 2px #999;
}

.cs-event.data::before {
    background: #ff9800;
    box-shadow: 0 0 0 2px #ff9800;
}

.cs-event .event-date {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.35rem;
}

.cs-event.me .event-date {
    color: #0066cc;
}

.cs-event.sunrun .event-date {
    color: #dc3545;
}

.cs-event.silence .event-date {
    color: #999;
}

.cs-event.data .event-date {
    color: #ff9800;
}

.cs-event .event-body {
    color: #555;
    font-size: 0.92rem;
    line-height: 1.6;
}

.cs-event .event-body strong {
    color: #1a1a1a;
}

.cs-event .fault-badge {
    display: inline-block;
    background: #fff5f5;
    border: 1px solid #ffcdd2;
    color: #dc3545;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Data contrast */
.data-contrast {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.data-contrast-col {
    padding: 2rem;
}

.data-contrast-col.sunrun-view {
    background: #f8fff8;
    border-right: 1px solid #e0e0e0;
}

.data-contrast-col.actual-data {
    background: #fff8f8;
}

.data-contrast-col h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.data-contrast-col.sunrun-view h4 {
    color: #2e7d32;
}

.data-contrast-col.actual-data h4 {
    color: #dc3545;
}

.data-contrast-col .data-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    font-size: 0.88rem;
    color: #555;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.data-contrast-col .data-row:last-child {
    border-bottom: none;
}

/* ============================================
   11. LIGHTBOX
   ============================================ */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 92vw;
    max-height: 90vh;
}

.lightbox-content img {
    max-width: 92vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    color: #ccc;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.lightbox-close {
    position: fixed;
    top: 1.5rem;
    right: 2rem;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: background 0.3s;
}

.lightbox-close:hover {
    background: rgba(220, 53, 69, 0.8);
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.4);
    width: 50px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: background 0.3s;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 1rem;
    border-radius: 4px;
}

.lightbox-next {
    right: 1rem;
    border-radius: 4px;
}

.lightbox-download {
    position: fixed;
    bottom: 1.5rem;
    right: 2rem;
    color: white;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    z-index: 10000;
    transition: background 0.3s;
}

.lightbox-download:hover {
    background: rgba(0, 102, 204, 0.8);
}

.lightbox-counter {
    position: fixed;
    bottom: 1.5rem;
    left: 2rem;
    color: #aaa;
    font-size: 0.85rem;
    z-index: 10000;
}

/* ============================================
   12. FOOTER
   ============================================ */
footer {
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    padding: 2rem;
    margin-top: 3rem;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

footer .footer-location {
    color: #666;
    font-size: 0.9rem;
}

footer .footer-copyright {
    color: #999;
    font-size: 0.85rem;
}

footer .footer-note {
    color: #999;
    font-size: 0.8rem;
    font-style: italic;
}

/* ============================================
   13. RESPONSIVE / MEDIA QUERIES
   ============================================ */
@media (max-width: 768px) {
    section {
        padding: 2rem 1rem;
    }

    section h2 {
        font-size: 1.5rem;
    }

    section h3 {
        font-size: 1.1rem;
    }

    nav ul {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    nav.open ul {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border-bottom: 1px solid #f0f0f0;
        width: 100%;
        gap: 0;
    }

    nav.open ul li {
        width: 100%;
    }

    nav.open ul li a {
        display: block;
        padding: 1rem 2rem;
        border-bottom: 1px solid #f0f0f0;
    }

    /* Grid layouts */
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .spec-tables-grid {
        grid-template-columns: 1fr;
    }

    .system-hero {
        grid-template-columns: 1fr;
    }

    .state-compare {
        grid-template-columns: 1fr;
    }

    .discrepancy-grid {
        grid-template-columns: 1fr;
    }

    .discrepancy-arrow {
        transform: rotate(90deg);
        text-align: center;
    }

    .roof-gallery {
        grid-template-columns: 1fr;
    }

    .roof-gallery figure.full-width {
        grid-column: auto;
    }

    .lcd-gallery {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    /* Evidence comparison */
    .evidence-comparison {
        grid-template-columns: 1fr;
    }

    .app-screenshot-wrap {
        max-width: 220px;
        margin: 0 auto;
    }

    .vs-badge {
        right: auto;
        left: 50%;
        top: auto;
        bottom: -1.5rem;
        transform: translateX(-50%);
    }

    /* Data contrast */
    .data-contrast {
        grid-template-columns: 1fr;
    }

    .data-contrast-col.sunrun-view {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    /* Lightbox */
    .lightbox-nav {
        display: none;
    }

    /* Chart */
    .chart-container {
        height: 300px;
    }

    /* Tables */
    table {
        font-size: 0.85rem;
    }

    th,
    td {
        padding: 0.6rem 0.5rem;
    }

    /* Footer */
    footer .container {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    section {
        padding: 1.5rem 1rem;
    }

    nav {
        padding: 0.75rem 1rem;
    }

    nav .logo .logo-icon {
        width: 24px;
        height: 24px;
    }

    section h2 {
        font-size: 1.3rem;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 36px;
        height: 36px;
        font-size: 1.5rem;
    }

    .lightbox-download {
        bottom: 1rem;
        right: 1rem;
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }

    .chart-container {
        height: 250px;
        padding: 1rem;
    }
}

/* ============================================
   DEV BANNER (for preview/development)
   ============================================ */
.dev-banner {
    background: #fffde7;
    border-bottom: 2px solid #ffc107;
    padding: 0.75rem 2rem;
    font-size: 0.85rem;
    color: #795548;
    text-align: center;
}
