body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: #333;
    /* New subtle pattern background */
    background-color: #fff;
    background-image:
      radial-gradient(#4a90e2 1px, transparent 1px),
      radial-gradient(#4a90e2 1px, transparent 1px);
    background-position: 0 0, 10px 10px;
    background-size:20px 20px;
}

.container {
    flex: 1 0 auto;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Header */
.site-header {
    background: #4a90e2;
    color: #fff;
    padding: 15px 0;
}
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo h1 {
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}
.main-nav li {
    margin-left: 20px;
}
.main-nav a {
    color: #fff;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
    padding: 8px 12px;
    border-radius: 5px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.2), rgba(0,0,0,0.1));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), inset 0 -1px 0 rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
}
.main-nav a:hover {
    transform: translateY(1px);
    box-shadow: inset 0 2px 2px rgba(0,0,0,0.2);
    text-decoration: none;
}
.main-nav a:active {
    transform: translateY(2px);
    box-shadow: inset 0 3px 5px rgba(0,0,0,0.3);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-weight: bold;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
}
.btn-primary {
    background: #4a90e2;
    color: #fff;
}
.btn-primary:hover {
    background: #3a7cc3;
}

/* Search Section */
.search-section {
    flex: 1 0 auto;
    text-align: center;
    padding: 60px 0;
}
.search-section h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #4a90e2;
}
.search-section p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #555;
}
.search-form {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.search-form input[type="text"] {
    padding: 10px;
    font-size: 1rem;
    border-radius: 5px;
    border: 1px solid #ccc;
    width: 300px;
    max-width: 100%;
}
.search-form button {
    border: none;
    cursor: pointer;
}

/* Categories Section */
.categories-section {
    padding: 60px 0;
    text-align: center;
}
.categories-section h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #4a90e2;
}
.categories-section p {
    font-size: 1rem;
    margin-bottom: 40px;
    color: #555;
}
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px,1fr));
    gap: 30px;
}
.category-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 30px 20px;
    text-align: center;
    transition: box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.category-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.category-card i {
    font-size: 2rem;
    color: #4a90e2;
    margin-bottom: 15px;
}
.category-card h4 {
    font-size: 1.3rem;
    color: #4a90e2;
    margin-bottom: 10px;
}
.category-card p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
}

/* Recent Articles */
.recent-articles {
    padding: 60px 0;
}
.recent-articles h3 {
    font-size: 1.8rem;
    margin-bottom: 40px;
    color: #4a90e2;
    text-align: center;
}
.article-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.article-list li {
    background: #fff;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    transition: box-shadow 0.2s ease;
}
.article-list li:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.article-list h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #4a90e2;
}
.article-list p {
    font-size: 0.95rem;
    color: #555;
}

/* Search Results */
.search-results {
    flex: 1 0 auto;
    padding: 60px 0;
}
.search-results h3 {
    font-size: 1.8rem;
    margin-bottom: 40px;
    color: #4a90e2;
    text-align: center;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
}
.page-btn {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 5px;
    background: #fff;
    border: 1px solid #ccc;
    color: #333;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}
.page-btn:hover {
    background: #f0f0f0;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}
.page-btn.active {
    background: #4a90e2;
    color: #fff;
    border-color: #4a90e2;
}

/* Footer */
.site-footer {
    background: #4a90e2;
    color: #fff;
    text-align: center;
    padding: 20px 0;
}
.site-footer p {
    margin: 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .main-nav ul {
        flex-direction: column;
        align-items: center;
    }
    .main-nav li {
        margin: 10px 0;
    }
    .search-form {
        flex-direction: column;
    }
    .recent-articles,
    .search-results,
    .categories-section {
        padding: 40px 0;
        flex: 1 0 auto;
    }
}

@media (max-width: 500px) {
    .search-form input[type="text"] {
        width: 100%;
    }
}
