/* ============================================================
   Trube Technologies LLC – Brand-Aligned CSS
   Black / Red / Neutral Modern System
   ============================================================ */

:root {
    /* Core palette */
    --bg: #0a0a0a;
    --bg-soft: #111111;
    --panel: #333333;
    --panel-soft: #1b1b1b;
    --line: rgba(255,255,255,0.12);

    /* Text */
    --text: #f5f5f5;
    --muted: #b3b3b3;

    /* Brand */
    --red: #e6392f;
    --red-soft: rgba(230,57,47,0.15);

    /* Forms */
    --input-bg: #1e1e1e;
    --input-bg-focus: #222222;
    --input-border: #cccccc;
    --input-border-focus: var(--red);

    /* Utility */
    --ok: #4ade80;
    --danger: #f87171;
}

* {
    box-sizing: border-box;
}

html, body {
	height: 100%;
}

body {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
                 "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================================
   Layout
   ============================================================ */

.wrap {
    width: 100%;
	max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ============================================================
   Header
   ============================================================ */

.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.55rem;
    letter-spacing: 0.5px;
    text-decoration: none;
    color: var(--text);
}

@media (max-width: 600px) {
    .brand {
        font-size: 1.2rem;
    }
}

.tagline {
    color: var(--muted);
    font-size: 0.9rem;
}

/* ============================================================
   Navigation
   ============================================================ */

.site-nav {
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}

.nav-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    flex-wrap: wrap;
}

.nav-row a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.45rem 0.75rem;
    border-radius: 4px;
    letter-spacing: 0.4px;
}

.nav-row a:hover,
.nav-row a:focus {
    background: var(--red-soft);
    color: #ffffff;
}

.spacer {
    flex: 1;
}

/* ============================================================
   Main Content
   ============================================================ */

.site-main {
    padding: 2.5rem 0 3.5rem;
    flex: 1 0 auto;
}

h1, h2, h3 {
    margin: 0 0 0.75rem;
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 2.1rem;
}

h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    padding-left: 0.75rem;
    border-left: 4px solid var(--red);
}

p {
    color: var(--muted);
    max-width: 100%;
}

/* ============================================================
   Cards / Sections
   ============================================================ */

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}

/* ============================================================
   Grid
   ============================================================ */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}


/* ============================================================
   Chart Grid Layout
   2-up on desktop, 1-up on mobile
   ============================================================ */

.chart-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.chart-card {
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 1rem 1.25rem 1.25rem;
}

.chart-card h2 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.chart-card canvas {
    width: 100% !important;
    height: 220px !important;
}

/* Mobile */
@media (max-width: 760px) {
    .chart-grid {
        grid-template-columns: 1fr;
    }

    .chart-card canvas {
        height: 200px !important;
    }
}


/* ============================================================
   Radar Grid Layout
   2-up on desktop, 1-up on mobile
   ============================================================ */

.radar-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.radar-card {
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 1rem 1.25rem 1.25rem;
}

.radar-card h2 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.radar-media {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 4px;
}

.radar-media img,
.radar-media iframe {
    width: 100%;
    height: 320px;
    border: 0;
    display: block;
}
.radar-media-wide img,
.radar-media-wide iframe {
    width: 100%;
    height: 640px;
    border: 0;
    display: block;
}
/* Wide cards span both columns on desktop */
.radar-card.wide {
    grid-column: span 2;
}

/* Mobile: stack everything */
@media (max-width: 760px) {
    .radar-grid {
        grid-template-columns: 1fr;
    }

    .radar-card.wide {
        grid-column: span 1;
    }

    .radar-media img,
    .radar-media iframe {
        height: 260px;
    }
}


/* ============================================================
   Wind Direction Indicator
   ============================================================ */

.wind-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    margin-right: 0.4rem;
    vertical-align: middle;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 12px solid var(--red);
    transform: rotate(var(--deg));
}



/* ============================================================
   Lists
   ============================================================ */

ul {
    padding-left: 1.2rem;
}

li {
    margin: 0.35rem 0;
}

/* ============================================================
   Links
   ============================================================ */

a {
    color: #ffffff;
    text-decoration: underline;
    text-decoration-color: var(--red);
    text-underline-offset: 3px;
}

a:hover,
a:focus {
    color: var(--red);
}

/* ============================================================
   Tables
   ============================================================ */

table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--line);
    background: var(--panel);
}

th, td {
    padding: 0.6rem 0.7rem;
    border-bottom: 1px solid var(--line);
}

th {
    color: var(--muted);
    font-weight: 600;
    text-align: left;
}

/* ============================================================
   Forms (FIXED CONTRAST)
   ============================================================ */

label {
    display: block;
    margin: 0.75rem 0 0.3rem;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
}

input,
textarea,
select {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text);
    padding: 0.65rem 0.75rem;
    font-size: 0.95rem;
    border-radius: 4px;
}

input::placeholder,
textarea::placeholder {
    color: rgba(255,255,255,0.4);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    background: var(--input-bg-focus);
    border-color: var(--input-border-focus);
}

/* Buttons */
button {
    background: transparent;
    border: 1px solid var(--red);
    color: var(--text);
    padding: 0.6rem 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
}

button:hover {
    background: var(--red);
    color: #ffffff;
}

/* Admin form blocks */
.form-block {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

/* ============================================================
   Portfolio Grid & Cards
   ============================================================ */

.portfolio-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--panel);
    border: 1px solid var(--line);
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.portfolio-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 0;
    background: var(--red);
    transition: height 0.25s ease;
}

.portfolio-image {
    display: block;
    height: 220px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.portfolio-card h2 {
    margin: 1rem 1.25rem 0.5rem;
    font-size: 1.25rem;
}

.portfolio-description {
    margin: 0 1.25rem 1rem;
    font-size: 0.95rem;
    color: var(--muted);
}

.portfolio-card p {
    margin: auto 1.25rem 1.25rem;
}

.portfolio-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.65);
}

.portfolio-card:hover::before {
    height: 100%;
}

.portfolio-card:hover .portfolio-image img {
    transform: scale(1.05);
}

/* ============================================================
   Notices
   ============================================================ */

.notice {
    border-left: 4px solid var(--line);
    padding: 0.75rem 1rem;
    background: var(--panel);
    margin: 1rem 0;
}

.notice.ok {
    border-color: var(--ok);
}

.notice.error {
    border-color: var(--danger);
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
    width: 100%;
    background: var(--panel);
    border-top: 1px solid var(--line);
    padding: 1.25rem 0;
}

.site-footer .footer-row {
    display: flex;
    justify-content: center;
    width: 100%;
}

.site-footer .footer-text {
    max-width: 100%;
    text-align: center;
    line-height: 1.6;
}

.site-footer .footer-text a {
    display: inline-block;
    margin: 0 0.25rem;
}

.site-footer img {
    width: 80px;
    height: auto;
    display: inline-block;
    vertical-align: middle;
}


@media (max-width: 760px) {
    .site-footer .footer-row {
        padding: 0 1rem;
    }

    .site-footer .footer-text {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        font-size: 0.9rem;
    }

    .site-footer img {
        margin: 0 auto;
    }
}


/* ============================================================
   Responsive
   ============================================================ */


@media (max-width: 760px) {
    .header-row,
    .footer-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .portfolio-image {
        height: 180px;
    }
}







.muted {
    color: var(--muted);
}


/* ============================================================
   Weather Station Dashboard
   ============================================================ */

.station-dashboard {
    background: linear-gradient(180deg, #111, #0a0a0a);
    border: 2px solid var(--line);
    padding: 2rem;
    margin-bottom: 3rem;
    transition: border-color 0.4s ease;
}

@media (max-width: 760px) {
    .station-primary {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .station-primary .temp {
        font-size: 4rem;
    }

    .station-primary .summary {
        text-align: center;
    }

    .station-primary img {
        max-width: 160px;
        height: auto;
    }
}

.station-primary {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}


.station-primary .temp {
    font-size: 5rem;
    font-weight: 800;
    color: #ffffff;
}

.station-primary .summary {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.6;
}

.station-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}
.station-primary .metric {
    max-width: 320px;
    width: 100%;
}

.metric {
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 1rem;
}

.metric .label {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
}

.metric .value {
    font-size: 1.4rem;
    font-weight: 700;
}

.station-updated {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--muted);
}
/* ============================================================
   KD0HTI Weather Dashboard (2026-09-16 rebuild)
   ============================================================ */

.wx-hero {
    background: linear-gradient(160deg, #171717 0%, #0a0a0a 65%);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 2rem clamp(1.25rem, 4vw, 2.5rem);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.wx-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 85% -10%, rgba(230,57,47,0.22), transparent 55%);
    pointer-events: none;
}

.wx-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    position: relative;
}

.wx-eyebrow {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.wx-hero h1 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.wx-status-badge {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: rgba(74,222,128,0.15);
    color: var(--ok);
    border: 1px solid rgba(74,222,128,0.35);
    white-space: nowrap;
}

.wx-hero.status-stale .wx-status-badge {
    background: rgba(250,204,21,0.15);
    color: #facc15;
    border-color: rgba(250,204,21,0.35);
}

.wx-hero.status-offline .wx-status-badge,
.wx-hero.status-error .wx-status-badge,
.wx-hero.status-unconfigured .wx-status-badge {
    background: var(--red-soft);
    color: var(--danger);
    border-color: rgba(248,113,113,0.35);
}

.wx-primary {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    flex-wrap: wrap;
    margin: 1.75rem 0;
    position: relative;
}

.wx-temp-block {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.wx-icon {
    font-size: 4rem;
    line-height: 1;
}

.wx-temp {
    font-size: clamp(4rem, 9vw, 6rem);
    font-weight: 800;
    line-height: 1;
    color: #fff;
}

.wx-summary p {
    margin: 0.15rem 0;
    color: var(--muted);
}

.wx-condition {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff !important;
}

.wx-feels {
    font-size: 1.05rem;
}

.wx-asof {
    font-size: 0.85rem;
}

.wx-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.85rem;
    position: relative;
}

.wx-metrics .metric {
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(2px);
}

.wx-sun {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    position: relative;
}

.wx-sun strong {
    color: var(--text);
}

.wx-station-link {
    margin-top: 1rem;
    margin-bottom: 0;
    position: relative;
}

.wx-section {
    margin: 2.5rem 0;
}

.wx-section h2 {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.wx-source {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-left: none !important;
}

/* Forecast strip */

.forecast-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(130px, 1fr);
    gap: 0.85rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-top: 1.25rem;
}

.forecast-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1rem 0.75rem;
    text-align: center;
}

.fc-name {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--muted) !important;
    margin: 0 0 0.4rem;
}

.fc-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.4rem;
    display: block;
}

.fc-temp {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff !important;
    margin: 0 0 0.3rem;
}

.fc-short {
    font-size: 0.8rem;
    margin: 0 0 0.3rem;
    min-height: 2.2em;
}

.fc-wind {
    font-size: 0.75rem;
    margin: 0;
}

/* Resource cards */

.resources-grid {
    margin-top: 1.25rem;
}

.resource-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1.25rem 1.4rem;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.resource-card:hover,
.resource-card:focus {
    transform: translateY(-3px);
    border-color: var(--red);
}

.resource-icon {
    font-size: 1.6rem;
}

.resource-title {
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

.resource-sub {
    font-size: 0.85rem;
    color: var(--muted);
}

@media (max-width: 600px) {
    .wx-primary {
        gap: 1rem;
    }

    .wx-hero-top {
        flex-direction: column;
    }
}

/* Radar loop keeps its own aspect ratio -- the shared .radar-media-wide rule
   forces height:640px, which stretches the NWS GIF. */
#radarLoop {
    height: auto !important;
    max-height: 680px;
    width: auto !important;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 10px;
    background: #fff;
}

.wx-section .radar-media {
    display: flex;
    justify-content: center;
    background: transparent;
    margin-top: 1.25rem;
}

/* ============================================================
   Header sponsor logo + hero last-updated stamp (2026-09-16, Brandon feedback)
   ============================================================ */

/* .site-nav's shared background/border (var(--panel)) was built for a
   full-width secondary nav bar; here it just wraps the inline sponsor link,
   producing a tight gray box around it (Brandon feedback, 2026-09-16).
   Scoped override rather than editing .site-nav itself, in case it's ever
   used elsewhere as an actual full-width bar. */
.header-row .site-nav {
    background: transparent;
    border-bottom: none;
}

.sponsor-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none !important;
}

.sponsor-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--muted);
}

.sponsor-logo {
    height: 28px;
    width: auto;
    display: block;
}

.wx-hero {
    position: relative;
}

.wx-last-checked {
    position: absolute;
    bottom: 0.85rem;
    right: 1.25rem;
    margin: 0;
    font-size: 0.7rem;
    color: var(--muted);
    opacity: 0.65;
}

@media (max-width: 600px) {
    .wx-last-checked {
        position: static;
        margin-top: 0.75rem;
        text-align: right;
    }

    .sponsor-label {
        display: none;
    }
}
