/* News Page Styles for UNMI Bogor Website */

/* Main Content */
.main-content {
    padding-top: 10px; /* Reduced to bring content closer to navbar */
    min-height: 100vh;
    background: #f8f9fa;
}

/* News Section */
.news-section {
    padding: 0.5rem 0; /* Further reduced to bring content closer to navbar */
}

/* Search and Filter Section */
.search-filter-section {
    background: white;
    border-radius: 25px;
    padding: 1.5rem; /* Further reduced padding */
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    margin-bottom: 1.5rem; /* Further reduced margin */
}

.search-filter-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 25px 25px 0 0;
}

/* Search Box */
.search-box {
    margin-bottom: 0;
}

.search-form .input-group {
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-radius: 15px;
    overflow: hidden;
}

.search-input {
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.search-input:focus {
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-btn {
    border: none;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

/* Category Filter */
.category-filter {
    margin-bottom: 0;
}

.category-select {
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.category-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Active Filters */
.active-filters {
    padding-top: 1rem; /* Reduced from 1.5rem */
    border-top: 1px solid #e9ecef;
}

.filter-label {
    color: #6c757d;
    font-weight: 600;
    font-size: 0.9rem;
}

.filter-tag {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #90caf9;
}

.filter-remove {
    color: #1976d2;
    text-decoration: none;
    transition: color 0.3s ease;
}

.filter-remove:hover {
    color: #d32f2f;
}

/* Section Title */
.section-title {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 2rem; /* Reduced from 2.5rem */
    padding-bottom: 1rem;
    border-bottom: 3px solid #667eea;
    display: inline-block;
    font-size: 2rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* No Image Frame Styles */
.no-image-frame {
    width: 100%;
    height: 350px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    transition: all 0.3s ease;
}

.no-image-frame:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: #adb5bd;
    transform: scale(1.02);
}

.no-image-frame i {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.no-image-frame span {
    font-size: 1.1rem;
    font-weight: 500;
}

.no-image-frame-small {
    width: 100%;
    height: 60px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    transition: all 0.3s ease;
}

.no-image-frame-small:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: #adb5bd;
}

.no-image-frame-small i {
    font-size: 1.5rem;
    opacity: 0.7;
}

/* Featured News */
.featured-news-card {
    background: white;
    border-radius: 25px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    overflow: hidden;
    transition: all 0.5s ease;
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
}

.featured-news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.featured-news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.featured-image {
    position: relative;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-news-card:hover .featured-image img {
    transform: scale(1.1);
}

.featured-content {
    padding: 2.5rem; /* Reduced from 3rem */
}

.news-meta {
    margin-bottom: 1.5rem; /* Reduced from 2rem */
}

.news-meta .category {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-right: 1.5rem;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
    display: inline-block;
}

.news-meta .date {
    color: #6c757d;
    font-size: 1rem;
    font-weight: 500;
    display: inline-block;
}

.featured-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.featured-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.featured-title a:hover {
    color: #667eea;
}

.featured-excerpt {
    color: #6c757d;
    font-size: 1.2rem;
    line-height: 1.7;
    margin-bottom: 1.5rem; /* Reduced from 2rem */
}

.featured-author {
    color: #495057;
    font-size: 1rem;
    margin-bottom: 1.5rem; /* Reduced from 2rem */
    display: flex;
    align-items: center;
}

.featured-author i {
    color: #667eea;
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

/* News Card Link */
.news-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

/* News Grid Row */
.news-grid .row {
    display: flex;
    flex-wrap: wrap;
}

.news-grid .col-md-6,
.news-grid .col-lg-4 {
    display: flex;
    margin-bottom: 1.5rem;
}

.news-card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* Regular News Grid */
.news-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.1);
    overflow: hidden;
    height: 100%;
    border: 1px solid rgba(0,0,0,0.03);
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.news-image {
    position: relative;
    overflow: hidden;
    height: 220px;
    flex-shrink: 0;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-content {
    padding: 1.5rem; /* Reduced from 2rem */
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.4;
    color: #2c3e50;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.6rem; /* 2 lines * 1.3rem * 1.4 line-height */
}

.news-excerpt {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem; /* Reduced from 1.5rem */
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 4.56rem; /* 3 lines * 0.95rem * 1.6 line-height */
}

.news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem; /* Reduced from 1.5rem */
    border-top: 1px solid #e9ecef;
    flex-shrink: 0;
}

.news-author, .news-views {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.news-author i, .news-views i {
    color: #667eea;
    margin-right: 0.5rem;
}

/* Pagination */
.pagination {
    margin: 0;
}

.pagination .page-link {
    border: none;
    color: #667eea;
    padding: 0.875rem 1.25rem;
    margin: 0 0.25rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 1rem;
}

.pagination .page-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        padding-top: 5px; /* Even less padding on mobile */
    }
    
    .search-filter-section {
        padding: 1rem; /* Further reduced on mobile */
        margin-bottom: 1rem;
    }
    
    .featured-title {
        font-size: 1.8rem;
    }
    
    .featured-content {
        padding: 1.5rem; /* Reduced from 2rem */
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .news-content {
        padding: 1.25rem; /* Reduced from 1.5rem */
    }
    
    .news-title {
        font-size: 1.2rem;
        min-height: 2.4rem; /* Adjust for smaller font */
    }
    
    .news-excerpt {
        font-size: 0.9rem;
        min-height: 4.32rem; /* Adjust for smaller font */
    }
}

@media (max-width: 576px) {
    .main-content {
        padding-top: 2px; /* Minimal padding on small screens */
    }
    
    .search-filter-section {
        padding: 0.75rem; /* Further reduced on small screens */
        margin-bottom: 0.75rem;
    }
    
    .featured-content {
        padding: 1.25rem; /* Reduced from 1.5rem */
    }
    
    .featured-title {
        font-size: 1.5rem;
    }
    
    .news-content {
        padding: 1rem; /* Reduced from 1.25rem */
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    .news-title {
        font-size: 1.1rem;
        min-height: 2.2rem; /* Adjust for smaller font */
    }
    
    .news-excerpt {
        font-size: 0.85rem;
        min-height: 4.08rem; /* Adjust for smaller font */
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.8s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===============================
   PAGINATION STYLES
   =============================== */

.pagination-wrapper {
    margin-top: 3rem;
    padding: 2rem 0;
}

.pagination {
    margin-bottom: 1rem;
}

.pagination .page-link {
    color: #667eea;
    background-color: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    margin: 0 3px;
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.pagination .page-link:hover {
    color: white;
    background-color: #667eea;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.pagination .page-item.active .page-link {
    color: white;
    background-color: #667eea;
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #f8f9fa;
    border-color: #e9ecef;
    cursor: not-allowed;
}

.pagination .page-item.disabled .page-link:hover {
    transform: none;
    box-shadow: none;
}

.pagination-info {
    color: #6c757d;
    font-size: 0.9rem;
}

.pagination-info small {
    background: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Responsive Pagination */
@media (max-width: 768px) {
    .pagination .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
        margin: 0 2px;
    }
    
    .pagination-wrapper {
        margin-top: 2rem;
        padding: 1.5rem 0;
    }
}

@media (max-width: 576px) {
    .pagination .page-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        margin: 0 1px;
    }
    
    .pagination-info small {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
