/* ======= Enhanced List Page Styles (News & Events) ======= */

/* Hero Section */
.news-hero-section,
.events-hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8rem 0 4rem;
    position: relative;
    overflow: hidden;
    margin-top: -100px;
    padding-top: 180px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: float 10s ease-in-out infinite;
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(255, 255, 255, 0.05) 0%, 
        transparent 30%, 
        transparent 70%, 
        rgba(255, 255, 255, 0.05) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.95;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Enhanced Filters Section */
.filters-section {
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

.filters-wrapper {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-top: -50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

.filters-form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Search Input Enhancement */
.search-wrapper {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid #e9ecef;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background: #f8f9fa;
    padding-right: 60px;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(253, 133, 53, 0.1);
}

.search-btn {
    position: absolute;
    right: 5px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.search-btn:hover,
.search-btn.active {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(253, 133, 53, 0.3);
}

/* Filter Pills */
.filter-pills {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-select {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    padding: 0.8rem 1.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 1rem;
    padding-right: 3rem;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(253, 133, 53, 0.1);
}

.filter-apply-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(253, 133, 53, 0.3);
}

/* Enhanced News/Events Grid */
.news-grid-section,
.events-grid-section {
    background: #f8f9fa;
}

.news-card,
.event-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    border: none;
    height: 100%;
    position: relative;
}

.news-card:hover,
.event-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

/* News Card Specific Styles */
.news-image-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
}

.news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-image {
    transform: scale(1.1) rotate(1deg);
}

.news-image-placeholder {
    height: 220px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-card:hover .image-overlay {
    opacity: 1;
}

.overlay-badges {
    display: flex;
    gap: 0.5rem;
    align-self: flex-start;
}

.featured-badge {
    background: rgba(255, 193, 7, 0.9);
    color: #000;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.overlay-stats {
    align-self: flex-end;
    color: white;
    font-weight: 600;
}

.news-content {
    padding: 2rem;
}

.news-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.news-category {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
}

.news-district,
.news-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.news-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.news-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: var(--primary-color);
}

.news-summary {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.news-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
}

.news-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.news-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-like,
.btn-share {
    background: transparent;
    border: 1px solid #e9ecef;
    color: var(--text-muted);
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-like:hover {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
    transform: scale(1.1);
}

.btn-like.liked {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.btn-like.animate-heart {
    animation: heartBeat 0.6s ease-in-out;
}

.btn-share:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.btn-read-more {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-read-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(253, 133, 53, 0.3);
    color: white;
}

/* Event Card Specific Styles */
.event-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.event-date-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 1rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(253, 133, 53, 0.3);
    min-width: 70px;
}

.date-day {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}

.date-month {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.9;
}

.date-year {
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.8;
}

.event-status {
    text-align: right;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.status-badge.available {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.status-badge.full {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.event-content {
    padding: 1.5rem;
}

.event-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.event-category {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
}

.event-district {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.event-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.event-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.event-title a:hover {
    color: var(--primary-color);
}

.event-description {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.event-details {
    margin-bottom: 1.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.detail-item i {
    color: var(--primary-color);
    width: 16px;
}

.registration-progress {
    margin-bottom: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 10px;
    transition: width 1s ease-in-out;
}

.progress-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.event-footer {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #f0f0f0;
}

.footer-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-view-detail {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-view-detail:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(253, 133, 53, 0.3);
}

.btn-register {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.3);
    color: white;
}

.btn-register.disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.event-decorations {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.featured-ribbon {
    position: absolute;
    top: 15px;
    right: -30px;
    background: linear-gradient(135deg, #ffc107, #ff8f00);
    color: #000;
    padding: 0.5rem 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    transform: rotate(45deg);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 4rem;
    color: #e9ecef;
    margin-bottom: 2rem;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.empty-description {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Enhanced Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
}

.modern-pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-item {
    border-radius: 50%;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border: 2px solid #e9ecef;
    border-radius: 50%;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    background: white;
}

.page-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(253, 133, 53, 0.2);
}

.page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(253, 133, 53, 0.3);
}

/* Special styling for prev/next buttons */
.page-link:has(span) {
    width: auto;
    padding: 0 1rem;
    border-radius: 25px;
    gap: 0.5rem;
}

/* Toast Notifications */
.toast-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: white;
    border-radius: 15px;
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-notification.toast-success {
    border-left: 4px solid #28a745;
}

.toast-notification.toast-error {
    border-left: 4px solid #dc3545;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-dark);
    font-weight: 500;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(1deg); }
    66% { transform: translateY(5px) rotate(-1deg); }
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1.1); }
    75% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* Loading States */
.btn-register.loading {
    position: relative;
    color: transparent;
}

.btn-register.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1199.98px) {
    .news-card,
    .event-card {
        margin-bottom: 2rem;
    }
}

@media (max-width: 991.98px) {
    .news-hero-section,
    .events-hero-section {
        padding: 6rem 0 3rem;
        padding-top: 140px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .filters-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-wrapper {
        min-width: auto;
        max-width: none;
    }
    
    .filter-pills {
        justify-content: center;
    }
    
    .event-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .event-meta {
        justify-content: center;
    }
    
    .detail-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .footer-actions {
        flex-direction: column;
    }
}

@media (max-width: 767.98px) {
    .news-hero-section,
    .events-hero-section {
        padding: 5rem 0 2rem;
        padding-top: 120px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .filters-wrapper {
        padding: 1.5rem;
        margin-top: -30px;
    }
    
    .filter-pills {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-select {
        min-width: auto;
    }
    
    .news-image-wrapper,
    .news-image-placeholder {
        height: 180px;
    }
    
    .news-content,
    .event-content {
        padding: 1.5rem;
    }
    
    .news-title,
    .event-title {
        font-size: 1.2rem;
    }
    
    .event-date-badge {
        padding: 0.8rem;
    }
    
    .date-day {
        font-size: 1.5rem;
    }
    
    .page-link {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .modern-pagination {
        gap: 0.3rem;
    }
}

@media (max-width: 575.98px) {
    .news-hero-section,
    .events-hero-section {
        padding: 4rem 0 2rem;
        padding-top: 100px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .filters-wrapper {
        padding: 1rem;
        border-radius: 15px;
    }
    
    .search-input {
        padding: 0.8rem 1rem;
        padding-right: 50px;
        font-size: 0.95rem;
    }
    
    .search-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .filter-select {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
        padding-right: 2.5rem;
    }
    
    .filter-apply-btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .news-image-wrapper,
    .news-image-placeholder {
        height: 160px;
    }
    
    .news-content,
    .event-content {
        padding: 1rem;
    }
    
    .event-header {
        padding: 1rem;
    }
    
    .event-footer {
        padding: 1rem;
    }
    
    .empty-icon {
        font-size: 3rem;
    }
    
    .empty-title {
        font-size: 1.3rem;
    }
    
    .toast-notification {
        right: 10px;
        left: 10px;
        transform: translateY(-100px);
    }
    
    .toast-notification.show {
        transform: translateY(0);
    }
}

/* Print Styles */
@media print {
    .news-hero-section,
    .events-hero-section,
    .filters-section,
    .pagination-wrapper {
        display: none;
    }
    
    .news-card,
    .event-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

