/* PPPL Weather Station - Brand-Aligned Design */
/* Based on PPPL Brand Guide (July 2025) */

/* Import PPPL Brand Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;500;700&family=Roboto+Condensed:wght@300;400;700&display=swap');

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base */
body {
    font-family: 'Roboto Condensed', Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

a {
    color: #405965;
    text-decoration: none;
}

a:hover {
    color: #f58025;
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 30px 0;
}

/* Layout */
.page-container {
    max-width: 1000px;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Header */
.header {
    background: #fff;
    padding: 20px 30px;
    border-bottom: 3px solid #f58025;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.header-logo-link {
    display: block;
    transition: opacity 0.2s;
}

.header-logo-link:hover {
    opacity: 0.8;
}

.header-logo {
    height: auto;
}

.pppl-logo {
    max-height: 80px;
    width: 100%;
    vertical-align: middle;
}

.doe-logo {
    max-height: 60px;
    width: 100%;
    vertical-align: middle;
}

/* Title Section */
.title-section {
    background: linear-gradient(90deg, #405965 0%, #6b8e9f 60%, #008c9d 100%);
    color: #fff;
    text-align: center;
    padding: 30px 20px;
}

.title-section h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.weather-widget-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.2);
    padding: 12px 24px;
    border-radius: 8px;
    transition: all 0.3s;
    border: 2px solid rgba(255, 255, 255, 0.3);
    text-decoration: none;
}

.weather-widget-link:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    text-decoration: none;
}

.weather-icon-large {
    font-size: 32px;
}

.weather-widget-text {
    color: white;
    font-size: 16px;
    font-weight: 500;
}

/* Main Content */
.main-content {
    padding: 20px;
}

/* Dashboard Layout */
.dashboard-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Sidebar */
.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.camera-card {
    background: white;
    border: 2px solid #405965;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.camera-image-container {
    display: block;
    position: relative;
    background-color: #e9ecef;
    min-height: 200px;
}

.camera-img {
    width: 100%;
    display: block;
    min-height: 200px;
    object-fit: cover;
    background-color: #e9ecef;
}

.camera-label {
    padding: 10px;
    text-align: center;
    background: #f5f5f5;
    margin: 0;
    font-size: 13px;
}

.camera-label a {
    color: #405965;
    font-weight: 600;
}

.external-links-card {
    background: white;
    border: 2px solid #405965;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.external-links-card h3 {
    color: #405965;
    font-size: 14px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.external-links-card a {
    display: inline-block;
    color: #405965;
    font-size: 13px;
    line-height: 1.8;
}

/* Main Dashboard Area */
.dashboard-main {
    min-height: 500px;
}

.sep {
    margin: 0 5px;
    color: #666;
}

/* Weather Tabs */
.weather-tabs {
    display: flex;
    gap: 0;
    margin: 0 0 0 0;
    border-bottom: 2px solid #405965;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.tab-btn {
    flex: 1;
    background: transparent;
    color: #6c757d;
    border: none;
    padding: 12px 15px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    position: relative;
    top: 2px;
}

.tab-btn:hover {
    background: rgba(245, 128, 37, 0.05);
    color: #405965;
}

.tab-btn.active {
    background: #fff;
    color: #405965;
    border-bottom: 3px solid #f58025;
}

/* Tab Content */
.tab-content-container {
    background: #fff;
    border: 2px solid #405965;
    border-top: none;
    border-radius: 0 0 8px 8px;
    min-height: 350px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-content {
    display: none;
    padding: 20px;
    animation: fadeIn 0.25s ease-in;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Weather Sections */
.forecast-section,
.national-sources,
.weather-section,
.other-links {
    margin-bottom: 30px;
}

.national-sources h2,
.weather-section h3,
.other-links h3 {
    color: #405965;
    font-size: 18px;
    margin-bottom: 15px;
}

.source-links {
    line-height: 2;
    text-align: center;
}

.forecast-img,
.jetstream-img {
    display: block;
    margin: 20px auto;
    max-width: 100%;
}

/* Weather Frames */
.weather-frame {
    width: 100%;
    max-width: 620px;
    height: 620px;
    border: 2px solid #405965;
    border-radius: 5px;
    display: block;
    margin: 20px auto;
    pointer-events: auto;
}

.weather-frame:focus {
    outline: none;
}

.weather-frame.medium {
    max-width: 770px;
    height: 610px;
}

.weather-frame.large {
    max-width: 900px;
    height: 830px;
}

.satellite-frame {
    width: 625px;
    height: 375px;
    max-width: 100%;
    border: 2px solid #405965;
    border-radius: 5px;
    display: block;
    margin: 20px auto;
}

/* Bottom Logos */
.bottom-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 20px;
    flex-wrap: wrap;
}

.bottom-logos img {
    max-height: 60px;
}

/* Footer Info */
.footer-info {
    text-align: center;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 5px;
    font-size: 13px;
}

/* Bottom Nav */
.bottom-nav {
    background: #A0BEE4;
    padding: 15px;
    text-align: center;
    font-size: 13px;
}

.bottom-nav a {
    color: #405965;
    padding: 0 5px;
}

/* Footer */
.footer {
    background: #405965;
    color: #fff;
    padding: 30px 20px;
    text-align: center;
}

.footer a {
    color: #fff;
}

.footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 20px;
}

.footer-logos img {
    max-height: 60px;
}

.footer-text p {
    margin: 10px 0;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .pppl-logo {
        max-width: 220px;
    }

    .doe-logo {
        max-width: 100px;
    }

    .content-section {
        flex-direction: column;
    }

    .title-section h1 {
        font-size: 22px;
    }

    .main-content {
        padding: 15px;
    }

    .weather-frame,
    .weather-frame.medium,
    .weather-frame.large {
        height: 400px;
    }

    .data-frame {
        height: 350px;
    }

    .data-frame.tall {
        height: 500px;
    }

    .bottom-nav {
        font-size: 12px;
    }

    .sep {
        display: none;
    }

    .bottom-nav a {
        display: block;
        margin: 5px 0;
    }
}

@media (max-width: 480px) {
    .title-section h1 {
        font-size: 18px;
    }

    .weather-frame,
    .weather-frame.medium,
    .weather-frame.large {
        height: 300px;
    }
}

/* Print */
@media print {
    .bottom-nav,
    .footer {
        display: none;
    }

    .weather-frame {
        border: 1px solid #ccc;
    }
}

/* Modern Weather Display Styles */

/* Weather Grid - Current Conditions */
.weather-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 0;
}

.weather-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.weather-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(64, 89, 101, 0.15);
    border-color: #405965;
}

.weather-card.primary {
    background: linear-gradient(135deg, #405965 0%, #6b8e9f 100%);
    color: white;
    border: none;
}

.weather-icon {
    font-size: 28px;
    margin-bottom: 8px;
    opacity: 0.9;
}

.weather-value {
    font-size: 24px;
    font-weight: 700;
    margin: 8px 0 4px 0;
    line-height: 1.2;
    color: #405965;
}

.weather-value.small {
    font-size: 20px;
}

.weather-card.primary .weather-value {
    color: white;
}

.weather-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
    font-weight: 600;
    color: #6c757d;
}

.weather-card.primary .weather-label {
    color: rgba(255, 255, 255, 0.9);
}

/* Highs and Lows Section */
.highs-lows-section {
    margin: 0;
}

.highs-lows-section h3 {
    color: #405965;
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 600;
}

.highs-lows-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.high-low-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.high-low-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(64, 89, 101, 0.15);
    border-color: #405965;
}

.high-low-label {
    font-weight: 600;
    color: #405965;
    margin-bottom: 10px;
    font-size: 13px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.high-value,
.low-value,
.single-value {
    padding: 8px 10px;
    margin: 6px 0;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
}

.high-value {
    background: #fff3cd;
    color: #856404;
    border-left: 3px solid #ffc107;
}

.low-value {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 3px solid #17a2b8;
}

.single-value {
    background: #f5f5f5;
    color: #333;
    text-align: center;
    border-left: 3px solid #6c757d;
}

.high-label,
.low-label {
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.time {
    display: block;
    font-size: 11px;
    opacity: 0.7;
    margin-top: 3px;
    font-style: italic;
}

/* Weather Images/Gauges Grid */
.weather-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.weather-image-item {
    background: white;
    border: 2px solid #405965;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.weather-image-item img {
    max-width: 100%;
    height: auto;
}

/* Historical Data Section */
.historical-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 20px 0;
}

.historical-column h3 {
    color: #405965;
    font-size: 18px;
    margin-bottom: 15px;
    text-align: center;
    padding: 10px;
    background: linear-gradient(135deg, #405965 0%, #6b8e9f 100%);
    color: white;
    border-radius: 8px;
}

.historical-stats {
    background: white;
    border: 2px solid #405965;
    border-radius: 8px;
    padding: 15px;
}

.historical-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #e9ecef;
}

.historical-stat:last-child {
    border-bottom: none;
}

.stat-label {
    font-weight: bold;
    color: #405965;
    font-size: 14px;
}

.stat-values {
    display: flex;
    gap: 15px;
}

.stat-values .high {
    color: #f58025;
    font-weight: bold;
}

.stat-values .low {
    color: #008c9d;
    font-weight: bold;
}

.historical-stat.single .stat-values {
    color: #333;
}

/* Historical Graphs */
.historical-graphs {
    margin: 30px 0;
}

.historical-graphs h3 {
    color: #405965;
    font-size: 20px;
    margin-bottom: 15px;
    text-align: center;
}

.graph-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.graph-item {
    background: white;
    border: 2px solid #405965;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.graph-item img {
    max-width: 100%;
    height: auto;
}

/* Refresh Controls */
.refresh-controls {
    background: white;
    border: 2px solid #405965;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.refresh-controls button {
    width: 100%;
    background: linear-gradient(135deg, #f58025 0%, #ffdd00 100%);
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.refresh-controls button:hover {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.3);
}

.refresh-controls button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.refresh-info {
    font-size: 11px;
    color: #6c757d;
    margin-top: 8px;
    text-align: center;
    line-height: 1.4;
}

/* Responsive adjustments for weather display */
@media (max-width: 900px) {
    /* Stack dashboard layout on tablets and mobile */
    .dashboard-container {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .camera-card {
        flex: 1;
        min-width: 250px;
    }

    .refresh-controls,
    .external-links-card {
        flex: 1;
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 15px;
    }

    .weather-tabs {
        flex-wrap: wrap;
    }

    .tab-btn {
        flex: 1 1 50%;
        font-size: 12px;
        padding: 10px 12px;
    }

    .tab-content {
        padding: 15px;
    }

    .weather-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }

    .weather-card {
        padding: 12px;
    }

    .weather-icon {
        font-size: 24px;
    }

    .weather-value {
        font-size: 20px;
    }

    .weather-value.small {
        font-size: 18px;
    }

    .highs-lows-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .historical-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .graph-grid {
        grid-template-columns: 1fr;
    }

    .weather-images-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
}

@media (max-width: 480px) {
    .dashboard-sidebar {
        flex-direction: column;
    }

    .weather-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .weather-card {
        padding: 10px;
    }

    .weather-label {
        font-size: 10px;
    }

    .tab-btn {
        flex: 1 1 100%;
    }

    .weather-images-grid {
        grid-template-columns: 1fr;
    }
}
