/* ============================================================
   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;
    letter-spacing: 0.5px;
    text-decoration: none;
    color: var(--text);
}

.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);
}