/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header */
header {
    background-color: #333;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%;
    width: 100%;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
    text-align: center;
}

.auth-links a {
    color: white;
    text-decoration: none;
    margin-left: 10px;
    font-size: 0.9rem;
}

.home-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.home-btn:hover {
    background-color: #0056b3;
}

/* Weather Updates */
#weather-updates {
    background-color: #f0f0f0;
    padding: 20px;
    border-radius: 8px;
    margin: 20px auto;
    max-width: 90%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.input-section {
    display: flex;
    flex: 1 1 auto;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.input-section input {
    width: 100%;
    max-width: 300px;
    padding: 8px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
}

#weather-updates button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
    width: 120px;
}

#weather-updates button:hover {
    background-color: #0056b3;
}

#weather-output {
    text-align: center;
    font-size: 0.95rem;
    color: #333;
    flex: 1 1 100%;
    margin-top: 15px;
}

/* Main Buttons */
#main-buttons {
    display: flex;
    justify-content: space-between; /* Aligns with sections */
    gap: 10px;
    margin: 20px auto;
    flex-wrap: wrap;
    max-width: 90%; /* Align with main sections */
}

#main-buttons button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 0; /* Increased padding for size */
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    flex: 1 1 calc(16.5% - 10px); /* Ensures 6 buttons align evenly */
    text-align: center;
}

#main-buttons button:hover {
    background-color: #0056b3;
}

/* Content Layout */
#main-content {
    display: flex;
    gap: 20px;
    padding: 20px 5%;
    flex-wrap: wrap;
}

#featured-resources,
#current-happenings {
    flex: 1 1 48%;
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 300px;
}

#featured-resources h3,
#current-happenings h4 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: #007bff;
}

#current-happenings ul {
    list-style: none;
    padding-left: 0;
}

#current-happenings li {
    margin-bottom: 8px;
}

#current-happenings a {
    text-decoration: none;
    color: #007bff;
}

#current-happenings a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center;
    }

    #weather-updates {
        text-align: center;
    }

    .input-section {
        flex-direction: column;
    }

    #weather-updates button {
        width: 100%;
        max-width: 150px;
    }

    #main-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    #main-buttons button {
        width: 90%;
        max-width: 300px;
    }

    #featured-resources,
    #current-happenings {
        flex: 1 1 100%;
        min-width: unset;
    }
}
