* {
    box-sizing: border-box;
}

html,
body {
    padding: 0;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #f0f0f0;
}

/* Header */
header {
    background-image: url('./assets/bg_weather.png');
    color: white;
    background-size: cover;
    background-position: center;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

/* Search Box in Header */
.search-box {
    display: flex;
    gap: 8px;
}

.search-box input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-transform: capitalize;
    width: 200px;
}

.search-box button {
    padding: 8px 12px;
    background-color: #4c6faf;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}

.search-box button:hover {
    background-color: #025381;
    color: white;
}

header h1 {
    margin: 0px;
    padding: 20px 0px 20px 20px;
    font-weight: lighter;
}

nav {
    width: 10%;
    height: auto;
    background-color: #004883;
}

nav ul {
    list-style-type: none;
    margin: 0px;
    padding: 0px;
}

nav ul li {
    padding: 10px;
    text-transform: capitalize;
    border-bottom: 1px solid white;
}

nav ul li a {
    text-decoration: none;
    color: white;
    font-size: 1.0rem;
    display: block;
    padding: 10px;
}

.main-content {
    display: flex;
    flex-direction: row;
}

.bx-cloud {
    font-size: 2rem;
    color: #2d65ff;
}

.home-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.w-content {
    padding-left: 10px;
    height: 100%;
}

#w-loading {
    position: fixed;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.w-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #4CAF50;
    border-top: 5px solid transparent;
    border-radius: 50%;
    animation: w-spin 1s linear infinite;
}

@keyframes w-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

footer {
    background-color: #2d65ff;
    color: white;
    padding: 10px 0px;
    position: relative;
    bottom: 0px;
    width: 100%;
}

.w-row {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    /* Allows cards to wrap on smaller screens */
    gap: 16px;
    /* Adds spacing between cards */
}

.w-card {
    flex: 1 1 300px;
    /* Allows flexibility while maintaining a minimum width */
    max-width: 200px;
    /* Prevents cards from stretching too wide */
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 16px;
    background-color: #f9f9f9;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#digital-clock {
    font-size: 2.5rem;
    color: #fff;
}

/* Weather Grid */
.w-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* w-grid 1/2 */
    gap: 20px;
}

.hourly-forecast,
.daily-forecast {
    padding: 15px;
}

.w-accordion {
    width: 90%;
    max-width: 600px;
    margin: 20px auto;
}

.w-accordion-item {
    background-color: #f1f1f1;
    margin: 8px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    overflow: hidden;
}

.w-accordion-button {
    padding: 12px;
    width: 100%;
    text-align: left;
    border: none;
    outline: none;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.w-accordion-button:hover {
    background-color: #0056b3;
    color: white;
}

.w-accordion-content {
    padding: 12px;
    display: none;
    background-color: #eaeaea;
    border-top: 1px solid #ccc;
}



/* Responsive blog */
.w-blog-post {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 16px;
    width: 300px;
    text-align: center;
    transition: transform 0.3s ease-in-out;
}

.w-blog-post:hover {
    transform: scale(1.05);
}

.w-blog-post img {
    width: 100%;
    border-radius: 8px;
}

/* Photos page Style */
.w-photo-gallery {
    height: 100%;
}

.w-grid-gallery {
    text-align: center;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.w-grid-gallery img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.w-grid-gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Weather page Style */

#weatherMap {
    height: 70vh;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}


/* Responsive Design */
@media (max-width: 768px) {
    #digital-clock {
        font-size: 2rem;
        padding: 10px 20px;
    }

    .w-accordion-button {
        font-size: 14px;
        padding: 10px;
    }

    .w-accordion-content {
        font-size: 14px;
        padding: 10px;
    }

    .w-row {
        justify-content: flex-start;
        /* Aligns cards to the left on smaller screens */
    }

    .w-grid {
        grid-template-columns: 1fr;
        /* Stack vertically on mobile */
    }

    .w-card {
        flex: 1 1 100%;
        /* Makes cards full-width on small screens */
    }

    header h1 {
        font-size: 1rem;
    }

    nav {
        width: 100%;
        height: auto;
    }

    nav ul {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
    }

    nav ul li {
        width: 50%;
        padding: 0;
    }

    .main-content {
        flex-direction: column;
    }

    footer {
        position: relative;
        bottom: 0px;
        width: 100%;
    }

    footer p {
        margin: 0px;
    }
}