/* Basic Reset & Typography */
body {
    color: #000000;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

.container {
    width: 98%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 10px 0;
}

/* Header & Navigation */
.main-header {
    background-color: #fff;
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}

.main-header h2 {
    color: #000088;
    margin-bottom: 15px;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    align-items: center;
}

.nav-links a {
    color: #AA0000;
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: #FF0000;
    background-color: #f0f0f0;
    border-color: #AA0000;
}

/* Weather Grid */
.current-weather {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.weather-item {
    background: #fff;
    padding: 5px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-align: center;
    display: flex;
    flex-direction: column;
}

.weather-item h3 {
    margin: 5px 0;
    font-size: 1em;
    color: #444;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.weather-item img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Iframe Handling */
.last-data {
    grid-column: auto;
}

.iframe-container {
    height: 380px; /* Slightly taller to accommodate content in a single column */
    width: 100%;
    overflow: hidden;
    border: 1px solid #eee;
    border-radius: 4px;
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Historical Table */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

table.minmax {
    min-width: 1200px; /* Ensure table has enough room for all 21 columns */
    border-collapse: collapse;
    font-size: 13px;
    width: 100%;
}

table.minmax th, table.minmax td {
    padding: 6px 4px;
    border: 1px solid #CCCCCC;
    text-align: center; /* Center data for better readability in columns */
}

table.minmax th {
    background-color: #DDDDDD;
    white-space: nowrap;
}

table.minmax tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .nav-links {
        flex-direction: column;
    }
    
    .nav-links strong {
        margin-bottom: 5px;
    }
    
    .current-weather {
        grid-template-columns: 1fr;
    }
    
    .container {
        width: 90%;
    }
}

/* Lightbox Modal Style */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 1200px;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

.modal-content, #caption {
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {transform:scale(0)}
    to {transform:scale(1)}
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

@media only screen and (max-width: 700px){
    .modal-content {
        width: 100%;
    }
}
