/* index.css - Styles specific to the homepage/announcements page */

/* Top Menu and Category Navigation */
.top-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
}

.category-link {
    display: inline-block;
    padding: 6px 12px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.category-link:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.category-link.active {
    background-color: #333;
    color: white;
    border-color: #333;
}

/* Search Form */
.search-form {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.search-input {
    width: 200px;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9em;
}

.search-input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

.search-button {
    padding: 6px 12px;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.search-button:hover {
    background-color: #357abd;
}

/* Region Filter Info */
.region-filter-info {
    margin: 15px 0;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clear-region-filter {
    color: #4a90e2;
    text-decoration: none;
    font-size: 0.9em;
}

.clear-region-filter:hover {
    text-decoration: underline;
}

/* Paging Management */
.paging-management {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.page-info {
    color: #666;
    font-size: 0.9em;
}

.items-per-page-form {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
    font-size: 0.9em;
}

.items-per-page-form select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

/* Announcements */
.announcements {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.announcement-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.2s ease;
}

.announcement-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.announcement-layout {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 20px;
}

.announcement-image {
    width: 100px;
}

.announcement-image img {
    border-radius: 4px;
    object-fit: cover;
}

.announcement-content-wrapper {
    flex: 1;
}

.announcement-title {
    color: #333;
    font-size: 1.4em;
    margin-bottom: 10px;
}

.announcement-meta {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
}

.announcement-content {
    color: #444;
    line-height: 1.6;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 30px;
    margin-bottom: 20px;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 35px;
    padding: 0 10px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination-link:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.pagination-link.active {
    background-color: #333;
    border-color: #333;
    color: white;
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 30px;
    background-color: #f8f9fa;
    border-radius: 8px;
    color: #666;
}

/* Sidebar Widgets for Index Page */
.category-list,
.recent-list {
    list-style: none;
    padding: 0;
}

.category-list li,
.recent-list li {
    margin-bottom: 10px;
}

.category-list a {
    color: #333;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.category-list a:hover {
    color: #666;
}

.category-list .count {
    color: #666;
    font-size: 0.9em;
}

.recent-list a {
    color: #333;
    text-decoration: none;
    display: block;
    transition: color 0.3s ease;
}

.recent-list a:hover {
    color: #666;
}

.recent-list .date {
    display: block;
    color: #666;
    font-size: 0.85em;
    margin-top: 3px;
}

/* Responsive Styles for Index Page */
@media (max-width: 768px) {
    .top-menu {
        flex-wrap: wrap;
        gap: 6px;
    }

    .search-form {
        flex: 1;
        min-width: 200px;
        margin-left: 0;
    }

    .search-input {
        width: 100%;
    }

    .announcement-layout {
        grid-template-columns: 1fr;
    }

    .announcement-image {
        width: auto;
        text-align: center;
    }

    .paging-management {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .items-per-page-form {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .announcement-meta {
        flex-direction: column;
        gap: 5px;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

.announcement-image img {
    max-width: 100px;
    height: 75px;
    object-fit: cover;
    border: 1px solid #ddd;
}

.announcement-image a {
    display: inline-block;
    text-decoration: none;
}