/* HamPuff - ARRL Style Color Scheme */

/* CSS Variables */
:root {
    /* Primary colors from color palette */
    --primary-bg: #153F71;        /* Dark blue background */
    --header-bg: #153F71;         /* Dark blue header */
    --accent-gold: #FFFB00;       /* Yellow accent */
    --text-dark: #333333;         /* Dark text */
    --text-light: #FFFFFF;        /* White text */
    
    /* Functional colors for data display */
    --color-good: #25934F;        /* Green for good conditions */
    --color-fair: #E68E1E;        /* Orange for fair conditions */
    --color-poor: #C03936;        /* Red for poor conditions */
    --color-unknown: #FFFB00;     /* Yellow for unknown */
    --color-cw: #25934F;          /* Green for CW */
    
    /* Band condition colors */
    --band-phone: #25934F;        /* Green for phone */
    --band-data: #C03936;         /* Red for data */
    --band-cw: #25934F;           /* Green for CW */
    --band-digital: #E68E1E;      /* Orange for digital */
}

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #153F71; /* Dark blue background from color palette */
    color: #ffffff; /* White text */
    font-family: "Arial", "Helvetica", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Header styles */
.header {
    background: #153F71; /* Dark blue from palette */
    color: #ffffff;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-bottom: 3px solid #C03936; /* Red from palette */
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    transition: opacity 0.3s ease;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo img {
    height: 60px;
    width: auto;
}

.logo h1 {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
}

.main-title {
    color: #25934F !important; /* Green from palette */
}

.ham-search {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    border: 2px solid #FFFB00;
}

.ham-search input {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1rem;
    padding: 0.5rem;
    outline: none;
    min-width: 200px;
}

.ham-search input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.ham-search button {
    background-color: #FFFB00;
    color: #333333;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ham-search button:hover {
    background-color: #FFA500;
    transform: translateY(-1px);
}

/* Main content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Conditions row - smaller and centered */
.conditions-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Fixed 4 columns */
    gap: 0.5rem;
    margin: 0 auto 2rem auto; /* Center the row */
    max-width: 600px; /* Smaller overall width */
}

.condition-card {
    background: #5DADE2; /* Lighter blue background for better contrast */
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #FFFB00;
    text-align: center;
}

.condition-card.good { border-left-color: #25934F; }
.condition-card.fair { border-left-color: #E68E1E; }
.condition-card.poor { border-left-color: #C03936; }

.condition-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #333333;
}

.condition-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.condition-status {
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: bold;
}

/* Section titles */
.section-title {
    color: #25934F !important; /* Green from palette */
    font-size: 2em;
    font-weight: bold;
    margin: 15px 0 10px 0;
}

/* Category titles */
.category-title {
    color: #C03936 !important; /* Red from palette */
    font-size: 1.2em;
    font-weight: bold;
    margin: 0 0 8px 0;
}

/* Data box styles */
.data-title {
    color: #C03936 !important; /* Red from palette */
    font-weight: bold;
    font-size: 0.7em; /* Ultra small font */
    margin: 0; /* No margin */
    line-height: 1.0; /* Tight line height */
}

.data-value {
    color: #25934F !important; /* Green from palette */
    font-size: 1.0em; /* Ultra small font */
    font-weight: bold;
    margin: 1px 0; /* Minimal margin */
    line-height: 1.0; /* Tight line height */
}

.data-status {
    color: #3498db !important; /* Blue from palette */
    font-size: 0.6em; /* Ultra small font */
    margin: 0; /* No margin */
    line-height: 1.0; /* Tight line height */
}

/* Tables */
.table_main {
    width: 100%;
    border-collapse: collapse;
    margin: 5px 0; /* Much smaller margin */
    background: #153F71; /* Dark blue from palette */
    border: 2px solid #C03936; /* Red from palette */
}

.table_main th {
    background: #C03936; /* Red from palette */
    color: #ffffff;
    padding: 6px 8px; /* Much smaller padding */
    text-align: left;
    font-weight: bold;
    font-size: 12px; /* Smaller font */
}

.table_main td {
    padding: 4px 8px; /* Much smaller padding */
    border-bottom: 1px solid #34495e;
    color: #ffffff;
    font-size: 12px; /* Smaller font */
}

.table_main tr:nth-child(even) {
    background: #34495e; /* Alternating row color */
}

.table_main tr:hover {
    background: #3498db; /* Light blue on hover */
}

/* Band condition colors - matching color palette */
.band_cond_good_std {
    color: #25934F; /* Green from palette */
    font-weight: bold;
}

.band_cond_fair_std {
    color: #E68E1E; /* Orange from palette */
    font-weight: bold;
}

.band_cond_poor_std {
    color: #C03936; /* Red from palette */
    font-weight: bold;
}

.band_cond_unkn_std {
    color: #FFFB00; /* Yellow from palette for unknown conditions */
    font-weight: bold;
}

/* K-index and solar flux colors */
.k_index_excellent {
    color: #25934F; /* Green from palette */
    font-weight: bold;
}

.k_index_good {
    color: #25934F; /* Green from palette */
    font-weight: bold;
}

.k_index_fair {
    color: #E68E1E; /* Orange from palette */
    font-weight: bold;
}

.k_index_poor {
    color: #C03936; /* Red from palette */
    font-weight: bold;
}

.solar_flux_excellent {
    color: #25934F; /* Green from palette */
    font-weight: bold;
}

.solar_flux_good {
    color: #25934F; /* Green from palette */
    font-weight: bold;
}

.solar_flux_fair {
    color: #E68E1E; /* Orange from palette */
    font-weight: bold;
}

.solar_flux_poor {
    color: #C03936; /* Red from palette */
    font-weight: bold;
}

/* Links */
a:link {
    color: #FFFB00; /* Yellow from palette */
    text-decoration: none;
}

a:visited {
    color: #E68E1E; /* Orange from palette */
    text-decoration: none;
}

a:hover {
    color: #C03936; /* Red from palette on hover */
    text-decoration: underline;
}

a:active {
    color: #25934F; /* Green from palette when active */
    text-decoration: underline;
}

/* Footer */
.footer {
    background: #153F71; /* Dark blue from palette */
    color: #ffffff; /* White text */
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
    border-top: 3px solid #C03936; /* Red from palette */
}

.footer p {
    margin: 5px 0;
    font-size: 14px;
}

/* Footer info - orange text as requested */
.footer-info {
    background: #153F71;
    border: 1px solid #C03936;
    border-radius: 8px;
    padding: 8px;
    margin: 5px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.footer-info p {
    color: #E68E1E !important; /* Orange text as requested */
    margin: 5px 0;
    font-size: 14px;
}

/* Form elements */
input[type="text"], input[type="email"], textarea, select {
    background: #34495e;
    color: #ffffff;
    border: 2px solid #3498db;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
}

input[type="text"]:focus, input[type="email"]:focus, textarea:focus, select:focus {
    border-color: #e74c3c;
    outline: none;
    box-shadow: 0 0 5px #e74c3c;
}

/* Buttons */
button, .btn {
    background: #C03936; /* Red from palette */
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.3s;
}

button:hover, .btn:hover {
    background: #25934F; /* Green from palette on hover */
}

/* Cards/panels */
.card {
    background: #153F71; /* Dark blue from palette */
    border: 1px solid #C03936; /* Red from palette */
    border-radius: 8px;
    padding: 8px; /* Much smaller padding */
    margin: 5px 0; /* Much smaller margin */
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Data condition cards - ultra compact */
.condition-card {
    background: #153F71; /* Dark blue from palette */
    border: 1px solid #C03936; /* Red from palette */
    border-radius: 3px;
    padding: 2px; /* Ultra small padding */
    margin: 0; /* No margin */
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
    text-align: center;
}

/* Band conditions section - match Ham Radio Resources styling */
.band-conditions {
    background: #153F71; /* Dark blue from palette */
    border: 1px solid #C03936; /* Red from palette */
    border-radius: 8px;
    padding: 8px; /* Match other sections */
    margin: 5px 0; /* Match other sections */
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.band-conditions h2 {
    color: #25934F !important; /* Green from palette */
    font-size: 1.2em;
    font-weight: bold;
    margin: 0 0 5px 0; /* Reduced margin */
}

.band-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Fixed 4 columns to fit all on one line */
    gap: 0.5rem;
    max-width: 600px; /* Smaller width */
    margin: 0 auto; /* Center the grid */
}

.band-item {
    background: #34495e; /* Light gray background from palette */
    border-radius: 6px;
    padding: 0.5rem;
    text-align: center;
}

.band-name {
    color: #3498db !important; /* Blue text */
    font-weight: bold;
    font-size: 0.9em;
    margin-bottom: 0.3rem;
}

.band-conditions-row {
    display: flex;
    justify-content: space-between;
    gap: 0.3rem;
    font-size: 0.8em;
}

.band-day, .band-night {
    flex: 1;
    padding: 0.3rem;
    border-radius: 4px;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.band-label {
    font-size: 0.7em;
    font-weight: normal;
    color: #FFFB00; /* Yellow text for Day/Night labels */
    margin-bottom: 1px;
}

.band-condition-text {
    font-weight: bold;
}

.band-day.good .band-condition-text, .band-night.good .band-condition-text {
    color: #25934F; /* Green for good */
}

.band-day.fair .band-condition-text, .band-night.fair .band-condition-text {
    color: #E68E1E; /* Orange for fair */
}

.band-day.poor .band-condition-text, .band-night.poor .band-condition-text {
    color: #C03936; /* Red for poor */
}

.band-day.unknown .band-condition-text, .band-night.unknown .band-condition-text {
    color: #FFFB00; /* Yellow for unknown */
}

/* SMS Registration Section */
.sms-registration-section {
    background: #153F71; /* Dark blue from palette */
    border: 1px solid #C03936; /* Red from palette */
    border-radius: 8px;
    padding: 8px; /* Match other sections */
    margin: 5px 0; /* Match other sections */
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.sms-info-box {
    background: white;
    border-radius: 6px;
    padding: 1.5rem;
    text-align: center;
}

.sms-info-box p {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.sms-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.sms-commands {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 1rem;
    border-left: 4px solid #FFFB00;
}

.sms-commands p {
    margin: 0;
    color: #333;
    font-size: 0.9rem;
}

.sms-commands code {
    background: #e9ecef;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: monospace;
    color: #C03936;
    font-weight: bold;
}

/* Links grid - 2-column layout as requested */
.links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Fixed 2-column layout */
    gap: 1rem;
    justify-items: start; /* Force left alignment of grid items */
}

.links-section {
    background: #153F71; /* Dark blue from palette */
    border: 1px solid #C03936; /* Red from palette */
    border-radius: 8px;
    padding: 8px; /* Match other sections */
    margin: 5px 0; /* Match other sections */
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.card h3 {
    color: #C03936; /* Red from palette */
    margin-top: 0;
    border-bottom: 2px solid #C03936; /* Red from palette */
    padding-bottom: 10px;
}

/* Link categories - left justify content */
.link-category {
    text-align: left !important;
    background: white;
    border-radius: 6px;
    padding: 0.3rem;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.link-category h3 {
    color: #153F71;
    margin-bottom: 0.2rem;
    font-size: 1.0rem;
}

.link-category .link-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.1rem 0;
    border-bottom: 1px solid rgba(44, 123, 142, 0.1);
    text-align: left !important;
    margin-bottom: 0;
    width: 100%;
}

.link-category .link-item:last-child {
    border-bottom: none;
}

.link-category .link-description {
    font-size: 0.8rem;
    color: #333333;
    font-weight: normal;
    margin-bottom: 0;
}

.link-category .link-url {
    color: #153F71;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.8rem;
    text-align: right;
}

.link-category .link-url:hover {
    color: #FFFB00;
    text-decoration: underline;
}

/* Status indicators */
.status-healthy {
    color: #25934F; /* Green from palette */
    font-weight: bold;
}

.status-warning {
    color: #E68E1E; /* Orange from palette */
    font-weight: bold;
}

.status-error {
    color: #C03936; /* Red from palette */
    font-weight: bold;
}

/* Responsive design */
@media (max-width: 768px) {
    .main-content {
        padding: 10px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .ham-search {
        width: 100%;
        justify-content: center;
    }
    
    .ham-search input {
        min-width: 150px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .conditions-row {
        grid-template-columns: 1fr;
    }
    
    .band-grid {
        grid-template-columns: 1fr;
    }
    
    .table_main {
        font-size: 14px;
    }
    
    .table_main th,
    .table_main td {
        padding: 8px;
    }
    
    /* Single column on mobile for links grid */
    .links-grid {
        grid-template-columns: 1fr;
    }
}
