/* News Page Specific Styles */

/* Page Title */
.page-title {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    border-radius: 10px;
    border: 1px solid #333;
}

.page-title h1 {
    color: #ffffff;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.page-title h1 i {
    color: #ff4444;
    margin-right: 15px;
}

.page-title p {
    color: #cccccc;
    font-size: 1.1rem;
}

/* News Filter */
.news-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 24px;
    border: 2px solid #ff4444;
    background: transparent;
    color: #ffffff;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: #ff4444;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 68, 68, 0.3);
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

/* News Card */
.news-card {
    background: #1a1a1a;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid #333;
    transition: all 0.3s ease;
    position: relative;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    border-color: #ff4444;
}

.news-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #2a2a2a;
}

.news-type-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-type-badge.event {
    background: #ff8800;
    color: #ffffff;
}

.news-type-badge.maintenance {
    background: #ff4444;
    color: #ffffff;
}

.news-type-badge.patch {
    background: #00aa00;
    color: #ffffff;
}

.news-type-badge.update {
    background: #0088ff;
    color: #ffffff;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-badge.scheduled {
    background: #ffaa00;
    color: #000000;
}

.status-badge.completed {
    background: #00aa00;
    color: #ffffff;
}

/* News Card Image */
.news-card-image {
    height: 200px;
    background: linear-gradient(135deg, #2a2a2a, #3a3a3a);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.news-card-image img {
    width: 350px;
    height: 200px;
    object-fit: cover; /* fill 350x200 */
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.news-card:hover .news-card-image img {
    filter: grayscale(0%);
}

.news-image-placeholder {
    width: 80px;
    height: 80px;
    background: rgba(255, 68, 68, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ff4444;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.news-card:hover .news-image-placeholder {
    filter: grayscale(0%);
}

.news-image-placeholder i {
    font-size: 2rem;
    color: #ff4444;
}

/* News Card Content */
.news-card-content {
    padding: 20px;
}

.news-title {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 15px;
    line-height: 1.4;
}

.news-excerpt {
    color: #cccccc;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.news-date {
    color: #888888;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.read-more-btn {
    background: #ff4444;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    background: #cc3333;
    transform: translateX(3px);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
}

.page-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #333;
    background: #1a1a1a;
    color: #ffffff;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.page-btn:hover,
.page-btn.active {
    background: #ff4444;
    border-color: #ff4444;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    margin: 3% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    border: 2px solid #ff4444;
    box-shadow: 0 25px 80px rgba(255, 68, 68, 0.3);
    animation: modalSlideIn 0.4s ease;
    position: relative;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 68, 68, 0.1), rgba(255, 136, 0, 0.1));
    border-radius: 20px;
    pointer-events: none;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-100px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, #ff4444 0%, #ff8800 100%);
    color: #ffffff;
    padding: 25px 30px;
    border-radius: 18px 18px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), transparent);
    pointer-events: none;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.close {
    color: #ffffff;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-body {
    padding: 40px;
    color: #ffffff;
    position: relative;
    z-index: 1;
}

/* News Detail Styles */
.news-detail {
    color: #ffffff;
}

.news-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 68, 68, 0.3);
    flex-wrap: wrap;
    gap: 15px;
}

.news-type-badge {
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.news-type-badge.update {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.news-type-badge.event {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
}

.news-type-badge.patch {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
}

.news-type-badge.maintenance {
    background: linear-gradient(135deg, #FF5722, #E64A19);
    color: white;
}

.news-date {
    color: #cccccc;
    font-size: 0.95rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.news-detail-content {
    line-height: 1.8;
    font-size: 16px;
}

.news-detail-content h3 {
    color: #ff4444;
    margin: 30px 0 20px 0;
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.news-detail-content h4 {
    color: #ff8800;
    margin: 25px 0 15px 0;
    font-size: 1.3rem;
    font-weight: bold;
}

.news-detail-content p {
    margin: 15px 0;
    color: #e0e0e0;
}

.news-detail-content ul {
    margin: 15px 0 25px 25px;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px 30px;
    border-radius: 15px;
    border-left: 4px solid #ff4444;
}

.news-detail-content li {
    margin: 12px 0;
    color: #cccccc;
    position: relative;
    padding-left: 20px;
}

.news-detail-content li::before {
    content: '▶';
    color: #ff4444;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.news-detail-content strong {
    color: #ff8800;
    font-weight: bold;
}

/* News Image Styles */
.news-featured-image {
    width: 720px;
    height: 480px;
    object-fit: cover;
    border-radius: 15px;
    margin: 20px auto;
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 68, 68, 0.3);
}

.news-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.news-content-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.news-content-section h4 {
    color: #ff4444;
    margin-bottom: 20px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.news-content-section h4::before {
    content: '⚡';
    font-size: 1.5rem;
}

/* Enhanced hover effects */
.news-content-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(255, 68, 68, 0.2);
    border-color: rgba(255, 68, 68, 0.5);
}

.news-content-section {
    transition: all 0.3s ease;
}

/* Enhanced news type badges */
.news-type-badge {
    position: relative;
    overflow: hidden;
}

.news-type-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.news-type-badge:hover::before {
    left: 100%;
}

/* Enhanced featured image */
.news-featured-image {
    position: relative;
    overflow: hidden;
}

.news-featured-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 68, 68, 0.1), rgba(255, 136, 0, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-featured-image:hover::after {
    opacity: 1;
}

/* Enhanced list items */
.news-detail-content li {
    transition: all 0.3s ease;
}

.news-detail-content li:hover {
    color: #ff8800;
    transform: translateX(5px);
}

.news-detail-content li::before {
    transition: all 0.3s ease;
}

.news-detail-content li:hover::before {
    color: #ff8800;
    transform: scale(1.2);
}

/* Custom Scrollbar for Modal */
.modal-content::-webkit-scrollbar {
    width: 10px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin: 5px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ff4444, #ff8800);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ff6666, #ffaa00);
}

/* Responsive Design */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-filter {
        gap: 10px;
    }
    
    .filter-btn {
        padding: 10px 20px;
        font-size: 0.8rem;
    }
    
    .page-title h1 {
        font-size: 2rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 90vh;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-header h2 {
        font-size: 1.4rem;
    }
    
    .modal-body {
        padding: 25px;
    }
    
    .news-detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .news-content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-featured-image {
        width: 100%;
        height: 250px;
        max-width: 720px;
    }
    
    .news-card-image {
        height: 200px;
    }
    
    .news-card-image img {
        width: 100%;
        height: 200px;
        max-width: 350px;
    }
}

@media (max-width: 480px) {
    .news-card-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .news-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.75rem;
    }
}

/* Animation for news cards */
.news-card {
    animation: fadeInUp 0.6s ease-out;
}

.news-card:nth-child(1) { animation-delay: 0.1s; }
.news-card:nth-child(2) { animation-delay: 0.2s; }
.news-card:nth-child(3) { animation-delay: 0.3s; }
.news-card:nth-child(4) { animation-delay: 0.4s; }
.news-card:nth-child(5) { animation-delay: 0.5s; }
.news-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading animation for modal content */
.news-detail {
    animation: fadeInContent 0.5s ease-out;
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation for content sections */
.news-content-section {
    animation: slideInSection 0.6s ease-out;
}

.news-content-section:nth-child(1) { animation-delay: 0.1s; }
.news-content-section:nth-child(2) { animation-delay: 0.2s; }
.news-content-section:nth-child(3) { animation-delay: 0.3s; }
.news-content-section:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideInSection {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Pulse animation for important elements */
.news-type-badge.update {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(76, 175, 80, 0.6);
    }
    100% {
        box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    }
}

/* Filter animation */
.news-card.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.news-card.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: all;
} 