/**
 * News Styles
 */

/* Page Header */
.page-header {
    padding: 80px 0;
    background-image: url('../images/blogs/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-align: center;
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
}

.breadcrumbs {
    margin-bottom: 20px;
    font-size: 14px;
    color: #fff;
}

.breadcrumbs a {
    color: #fff;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.page-description {
    max-width: 800px;
    margin: 0 auto;
    color: #fff;
}

/* Search Form */
.news-search-section {
    padding: 30px 0;
    margin-bottom: 20px;
}

.news-search-form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 50px;
    border: 1px solid #e0e0e0;
    padding: 5px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-input-wrapper {
    flex: 2;
    min-width: 200px;
    position: relative;
}

.search-input-wrapper input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    outline: none;
}

.search-category-wrapper {
    position: relative;
    flex: 1;
    min-width: 150px;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    padding: 0 10px;
}

.custom-select {
    position: relative;
}

.custom-select select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    padding: 12px 30px 12px 15px;
    border: none;
    background-color: transparent;
    font-size: 16px;
    outline: none;
    cursor: pointer;
    display: none;
}

.select-selected {
    background-color: transparent;
    color: #666;
    padding: 12px 30px 12px 15px;
    border: none;
    cursor: pointer;
    position: relative;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}





.select-items {
    position: absolute;
    background-color: white;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 99;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-height: 250px;
    overflow-y: auto;
    display: none;
    margin-top: 5px;
}

.select-items.select-hide {
    display: none;
}

.select-items:not(.select-hide) {
    display: block;
}

.select-items div {
    color: #666;
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.select-items div:hover,
.select-items div.same-as-selected {
    background-color: #f5f5f5;
    color: var(--primary-color, #2046a1);
    font-weight: 500;
}

.search-button-wrapper {
    flex: 0 0 auto;
}

.news-search-form button {
    background-color: var(--primary-color, #2046a1);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-search-form button svg {
    width: 18px;
    height: 18px;
}

.news-search-form button:hover {
    background-color: var(--secondary-color, #172c5f);
}

/* Mobile Form Styles */
@media (max-width: 768px) {
    .news-search-form {
        transition: all 0.3s ease;
    }
    
    .news-search-form.mobile-collapsed {
        border-color: transparent;
        box-shadow: none;
        background: transparent;
    }
    
    .news-search-form.mobile-collapsed .search-category-wrapper,
    .news-search-form.mobile-collapsed .search-button-wrapper span {
        display: none;
    }
    
    .news-search-form.mobile-collapsed .search-input-wrapper {
        flex: 1;
    }
    
    .news-search-form.mobile-collapsed .search-button-wrapper {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .news-search-form.mobile-collapsed button {
        padding: 8px;
        background-color: transparent;
        color: var(--primary-color, #2046a1);
    }
    
    .news-search-form.mobile-expanded {
        flex-direction: column;
        padding: 15px;
        border-radius: 15px;
    }
    
    .news-search-form.mobile-expanded .search-input-wrapper,
    .news-search-form.mobile-expanded .search-category-wrapper,
    .news-search-form.mobile-expanded .search-button-wrapper {
        width: 100%;
    }
    
    .news-search-form.mobile-expanded .search-category-wrapper {
        border: none;
        border-top: 1px solid #e0e0e0;
        border-bottom: 1px solid #e0e0e0;
        padding: 10px 0;
        margin: 10px 0;
    }
    
    .news-search-form.mobile-expanded button {
        width: 100%;
        justify-content: center;
    }
    
    /* Fix for duplicate dropdown */
    .select-items div:not(:first-child):nth-child(2) {
        display: none;
    }
}

/* News Filter */
.news-filter-section {
    padding: 30px 0;
    border-bottom: 1px solid #eee;
}

.news-filter {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-item {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 30px;
    background-color: #f1f3f5;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
}

.filter-item:hover {
    background-color: #e9ecef;
    color: var(--primary-color, #2046a1);
}

.filter-item.active {
    background-color: var(--primary-color, #2046a1);
    color: white;
}

/* News Grid */
.news-grid-section {
    padding: 60px 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    background-color: #fff;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.news-image {
    height: 220px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.news-item:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    padding: 20px;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 14px;
    color: #6c757d;
}

.news-category a {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
}

.news-category a:hover {
    text-decoration: underline;
}

.news-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    line-height: 1.4;
}

.news-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.news-title a:hover {
    color: var(--primary-color);
}

.news-excerpt {
    color: #6c757d;
    margin-bottom: 15px;
    line-height: 1.6;
}

.read-more {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s;
    position: relative;
    padding-right: 20px;
}

.read-more:after {
    content: '→';
    position: absolute;
    right: 0;
    transition: transform 0.3s;
}

.read-more:hover {
    color: var(--secondary-color);
}

.read-more:hover:after {
    transform: translateX(5px);
}

/* Pagination */
.pagination {
    margin-top: 50px;
    text-align: center;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.pagination .page-numbers.current {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .page-numbers:hover:not(.current) {
    background-color: #f8f9fa;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 40px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.no-results h3 {
    color: #333;
    margin-bottom: 15px;
}

.no-results p {
    color: #6c757d;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .news-image {
        height: 200px;
    }
}

@media (max-width: 767px) {
    .page-header {
        padding: 40px 0;
    }

    .page-title {
        font-size: 28px;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-filter {
        align-items: center;
    }

    .filter-list {
        justify-content: center;
    }

    .news-grid-section {
        padding: 40px 0;
    }
}

/* Fix for duplicate dropdown */
.select-items div[data-value=""]:nth-of-type(2) {
    display: none;
} 