/*
===========================================================================
CHANGE LOG
File: /var/www/html/eaglesflock.nsgia.com/static/css/switchboard.css
Type: CSS Stylesheet
Purpose: Central shared design switchboard — reusable component classes
Main App: eaglesflock_app.py
Context: Source of truth for all EF page components. Uses existing
         --color-* tokens from nsg_variables.css + leafriver_variables.css.
         All pages should use ef- prefixed classes from this file.
Dependencies: nsg_variables.css, leafriver_variables.css (loaded first)
Version History:
2026-04-03 v1.0 - Initial creation. Extracted from investor.html inline styles.
                   Components: sidebar-investor, content shell, section cards,
                   image grids, financial tabs, metrics bar, highlight boxes,
                   phase cards, link cards, footer, print, mobile.
===========================================================================
*/

/* ── SIDEBAR INVESTOR OVERRIDE ─────────────────────── */
/* Deep slate — distinct from buyer teal sidebar        */
.ef-sidebar-investor {
    background: #1e2a3a;
    border-right: 2px solid #34495e;
}

.ef-sidebar-investor .afh-sidebar-header {
    background: rgba(0,0,0,0.2);
}

.ef-sidebar-investor .afh-sidebar-header p {
    color: #8fbccc;
}

.ef-sidebar-investor .nav-link.active {
    background: rgba(255,255,255,0.12);
    border-left-color: #8fbccc;
}

.ef-sidebar-investor .nav-link:hover {
    background: rgba(255,255,255,0.08);
    border-left-color: rgba(255,255,255,0.4);
}

.ef-sidebar-investor .sidebar-property-info {
    border-top-color: rgba(255,255,255,0.1);
}

.ef-sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 0.5rem 1rem;
}

.ef-sidebar-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 0.75rem 1rem 0.25rem;
    color: rgba(255,255,255,0.4);
    font-weight: 600;
}


/* ── CONTENT SHELL ─────────────────────────────────── */
.ef-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}


/* ── SECTION CARD ──────────────────────────────────── */
.ef-section {
    background: var(--color-white);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid var(--color-border);
    scroll-margin-top: 80px;
}

.ef-section h2 {
    color: var(--color-primary);
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.ef-section h3 {
    color: var(--color-primary-dark);
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.ef-section p {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.ef-lead {
    color: var(--color-secondary-dark);
    font-size: 1.05rem;
    margin-bottom: 1rem;
}


/* ── IMAGE GRID ────────────────────────────────────── */
.ef-img-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.ef-img-grid.three {
    grid-template-columns: repeat(3, 1fr);
}

.ef-img-grid figure { margin: 0; }

.ef-img-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--color-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.ef-img-grid img:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.ef-img-grid figcaption {
    text-align: center;
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-top: 0.4rem;
}

/* Wide single image */
.ef-img-wide {
    margin: 1.5rem 0;
}

.ef-img-wide img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid var(--color-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Click-to-expand overlay */
.ef-img-grid img.expanded,
.ef-img-wide img.expanded {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%);
    width: 90vw;
    max-width: 1200px;
    max-height: 90vh;
    height: auto !important;
    object-fit: contain !important;
    z-index: 9999;
    border: none !important;
    border-radius: 0;
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.8);
    cursor: zoom-out;
}


/* ── HIGHLIGHT BOX ─────────────────────────────────── */
.ef-highlight {
    background: linear-gradient(135deg, var(--color-secondary-light), var(--color-secondary));
    border-left: 4px solid var(--color-primary);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 6px 6px 0;
    font-size: 1rem;
    line-height: 1.7;
}


/* ── FINANCIAL TABS ────────────────────────────────── */
.ef-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--color-primary);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.ef-tab {
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-light);
    cursor: pointer;
    border: 1px solid transparent;
    border-bottom: none;
    background: var(--color-secondary-light);
    margin-bottom: -2px;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.ef-tab:hover {
    background: var(--color-secondary);
    color: var(--color-primary);
}

.ef-tab.active {
    background: var(--color-white);
    color: var(--color-primary);
    border-color: var(--color-primary);
    border-bottom-color: var(--color-white);
}

.ef-tab-panel { display: none; }
.ef-tab-panel.active { display: block; }


/* ── METRICS BAR ───────────────────────────────────── */
.ef-metrics {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--color-white);
    border-bottom: 3px solid var(--color-primary);
    flex-wrap: wrap;
}

.ef-metric {
    text-align: center;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    min-width: 120px;
}

.ef-metric-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--color-primary);
}

.ef-metric-label {
    font-size: 0.8rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* ── PHASE CARDS ───────────────────────────────────── */
.ef-phases {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.ef-phase {
    padding: 1rem;
    border: 2px solid var(--color-border);
    border-radius: 6px;
    text-align: center;
}

.ef-phase.active {
    border-color: var(--color-primary);
    background: var(--color-secondary-light);
}

.ef-phase h4 {
    color: var(--color-primary);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.ef-phase-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
}

.ef-phase-desc {
    font-size: 0.8rem;
    color: var(--color-text-light);
}


/* ── LINK CARDS (Explore More) ─────────────────────── */
.ef-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.ef-link-card {
    display: block;
    padding: 1rem 1.25rem;
    background: var(--color-secondary-light);
    border: 1px solid var(--color-secondary);
    border-radius: 6px;
    text-decoration: none;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s, border-color 0.2s;
}

.ef-link-card:hover {
    background: var(--color-secondary);
    border-color: var(--color-primary);
}

.ef-link-card span {
    display: block;
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-top: 0.25rem;
}


/* ── EXIT PATHS ────────────────────────────────────── */
.ef-exits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.ef-exit {
    padding: 1rem;
    background: var(--color-secondary-light);
    border: 1px solid var(--color-secondary);
    border-radius: 6px;
    text-align: center;
}

.ef-exit h4 {
    color: var(--color-primary);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.ef-exit p {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin: 0;
}


/* ── PRINT BUTTON ──────────────────────────────────── */
.ef-print-btn {
    align-self: center;
    padding: 0.5rem 1.25rem;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}

.ef-print-btn:hover {
    background: var(--color-primary-dark);
}


/* ── FOOTER ────────────────────────────────────────── */
.ef-footer {
    text-align: center;
    padding: 2rem;
    color: var(--color-text-light);
    font-size: 0.85rem;
}

.ef-footer strong { color: var(--color-text); }


/* ── PRINT ─────────────────────────────────────────── */
@media print {
    .afh-navbar, .afh-sidebar, .ef-print-btn { display: none !important; }
    .afh-main-container { margin-left: 0 !important; }

    .ef-content { padding: 0 0.5rem; }
    .ef-section {
        box-shadow: none;
        border: 1px solid #ccc;
        padding: 1rem 1.25rem;
        margin-bottom: 1rem;
        break-inside: auto !important;
        page-break-inside: auto !important;
        background: white;
    }

    body { font-size: 10pt; }
    p { margin-bottom: 0.4rem; line-height: 1.5; }
    h2 { font-size: 1.3rem; margin-bottom: 0.3rem; }
    h3 { font-size: 1.05rem; margin-top: 0.8rem; margin-bottom: 0.3rem; break-after: avoid; }

    .afh-hero {
        min-height: 200px !important;
        height: 200px !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .ef-metrics { padding: 0.5rem; gap: 0.75rem; }
    .ef-metric { padding: 0.4rem 0.8rem; min-width: 80px; }
    .ef-metric-number { font-size: 1.4rem; }
    .ef-metric-label { font-size: 0.65rem; }

    .ef-img-grid img {
        height: auto !important;
        max-height: 280px;
        object-fit: contain;
    }
    .ef-img-wide img { max-height: 400px; }
    .ef-img-grid.three img {
        height: auto !important;
        max-height: 200px;
        object-fit: contain;
    }
    .ef-img-grid img.expanded,
    .ef-img-wide img.expanded {
        position: static !important;
        transform: none !important;
        width: 100% !important;
        box-shadow: none !important;
    }

    .data-table { font-size: 9pt; }
    .data-table th, .data-table td { padding: 0.3rem 0.5rem; }
    .data-table tr { break-inside: avoid; }

    .ef-highlight { padding: 0.75rem 1rem; margin: 0.75rem 0; break-inside: avoid; }
    .ef-phases { break-inside: avoid; gap: 0.5rem; }
    .ef-phase { padding: 0.5rem; }
    .ef-phase-number { font-size: 1.3rem; }
    .ef-exits { break-inside: avoid; }
    .ef-links { gap: 0.5rem; }
    .ef-link-card { padding: 0.5rem 0.75rem; border: 1px solid #999; }
    .ef-footer { padding: 1rem; font-size: 0.75rem; }
}


/* ── MOBILE ────────────────────────────────────────── */
@media (max-width: 768px) {
    .ef-img-grid { grid-template-columns: 1fr; }
    .ef-img-grid.three { grid-template-columns: 1fr; }
    .ef-exits { grid-template-columns: 1fr; }
    .ef-phases { grid-template-columns: 1fr; }
    .ef-links { grid-template-columns: 1fr; }
    .ef-metrics { gap: 0.75rem; }
    .ef-metric { min-width: 80px; padding: 0.5rem 1rem; }
    .ef-metric-number { font-size: 1.8rem; }
}
