/* 🔵 Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    padding-top: 0px;
    margin-top: 35px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(to bottom right, #f5f7fa, #c3cfe2);
    padding: 20px;
}

/* 🔵 Category Selector */
.category-container {
    text-align: center;
    padding: 15px;
    background: linear-gradient(to right, #4568dc, #b06ab3);
    border-radius: 10px;
    margin-bottom: 15px;
}

.category-container label {
    font-size: 16px;
    font-weight: bold;
    color: white;
    margin-right: 10px;
}

#categorySelector {
    width: 220px;
    padding: 10px;
    font-size: 16px;
    font-weight: bold;
    border: 2px solid white;
    border-radius: 5px;
    background: white;
    color: #4568dc;
    cursor: pointer;
    transition: all 0.3s ease;
}

#categorySelector:hover {
    background: #3498db;
    color: white;
    border-color: #1d6fa5;
}

#categorySelector:focus {
    outline: none;
    border-color: #1d6fa5;
}

/* 🔵 Main Container - Responsive & Centered */
.container {
    max-width: 1200px;
    margin: auto;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 🔵 Header */
.header {
    background: linear-gradient(to right, #4568dc, #b06ab3);
    padding: 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header nav a {
    color: white;
    margin-left: 20px;
    text-decoration: none;
    transition: opacity 0.3s;
}

.header nav a:hover {
    opacity: 0.7;
}

/* 🔵 News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    padding: 20px;
}

/* 🔵 News Card */
.news-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.news-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.news-content {
    padding: 15px;
    flex-grow: 1;
}

.news-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.news-content p {
    font-size: 0.9rem;
    color: #555;
}

.news-content a {
    text-decoration: none;
    color: #3498db;
}

/* 🔵 Footer */
footer {
    background: #222;
    color: #aaa;
    text-align: center;
    padding: 15px;
}

/* 🔵 Loading Animation - Wave Effect */
.loading-animation {
    text-align: center;
    padding: 20px;
    display: none; /* Hidden by default */
}

.loading-animation .dot {
    width: 12px;
    height: 12px;
    margin: 5px;
    display: inline-block;
    border-radius: 50%;
    background-color: #3498db;
    animation: wave 1.4s infinite ease-in-out;
}

.loading-animation .dot:nth-child(2) { animation-delay: 0.2s; }
.loading-animation .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes wave {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(-10px); opacity: 1; }
}

/* 🔵 Load More Button */
.load-more-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

#loadMoreBtn {
    padding: 14px 24px;
    font-size: 18px;
    font-weight: bold;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s ease;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.15);
}

#loadMoreBtn:hover {
    background: #1d6fa5;
}

#loadMoreBtn:active {
    transform: scale(0.98);
}

/* 🔵 Search Bar */
.search-container {
    text-align: center;
    margin-bottom: 20px;
}

#searchBox {
    margin-top: 25px;
    margin-bottom: 10px;
    width: 97%;
    padding: 12px;
    font-size: 18px;
    border: 2px solid #007bff;
    border-radius: 25px;
    outline: none;
    transition: all 0.3s ease-in-out;
    box-shadow: 0px 0px 5px rgba(0, 123, 255, 0.2);
}

#searchBox:focus {
    border-color: #ff9800;
    box-shadow: 0px 0px 10px rgba(255, 152, 0, 0.7);
    background-color: #f8f9fa;
}

/* 🔥 Mobile & Tablet Responsiveness */
@media screen and (max-width: 1024px) {
    .container {
        padding: 10px;
    }

    .news-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .news-card img {
        height: 160px;
    }

    .news-content h3 {
        font-size: 1rem;
    }

    .news-content p {
        font-size: 0.85rem;
    }
}

@media screen and (max-width: 768px) {
    .container {
        max-width: 95%;
        padding: 8px;
    }

    .news-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .news-card img {
        height: 140px;
    }

    .news-content h3 {
        font-size: 0.95rem;
    }

    .news-content p {
        font-size: 0.8rem;
    }

    #searchBox {
        width: 80%;
        padding: 10px;
        font-size: 16px;
    }

    #loadMoreBtn {
        font-size: 16px;
        padding: 12px 20px;
    }
}



