/* News Page Styles */
.news-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 15px;
    position: relative;
    z-index: 1; /* Lower z-index than header */
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.page-header h1 {
    font-size: 36px;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.page-header h1:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #e53935, #ff5252);
    border-radius: 3px;
}

/* Red title underline for other pages to match */
.page-header h1 span {
    color: #e53935;
}

/* News search and filters */
.news-search-filter {
    display: flex;
    align-items: stretch;
    margin-bottom: 30px;
    background: rgba(22, 22, 30, 0.5);
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    max-width: 100%;
}

.news-search {
    flex: 0 0 40%;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
}

.search-form {
    display: flex;
    width: 100%;
    height: 100%;
}

.search-form input[type="text"] {
    flex: 1;
    padding: 10px 15px;
    background: rgba(22, 22, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px 0 0 8px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.2);
    height: 40px;
}

.search-form input[type="text"]:focus {
    border-color: rgba(229, 57, 53, 0.5);
    box-shadow: 0 0 0 2px rgba(229, 57, 53, 0.1), inset 0 1px 4px rgba(0, 0, 0, 0.2);
}

.search-form .search-btn {
    background: linear-gradient(135deg, #e53935, #ff5252);
    color: #fff;
    border: none;
    border-radius: 0 8px 8px 0;
    padding: 0 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(229, 57, 53, 0.3);
    font-size: 16px;
    height: 40px;
}

.search-form .search-btn:hover {
    background: linear-gradient(135deg, #d32f2f, #f44336);
    box-shadow: 0 6px 20px rgba(229, 57, 53, 0.4);
}

.news-filters {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: rgba(20, 20, 28, 0.7);
    flex: 1;
}

.filter-label {
    margin-right: 15px;
    font-weight: 600;
    color: #e0e0e0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(229, 57, 53, 0.3) rgba(0, 0, 0, 0.1);
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding-bottom: 5px;
    align-items: center;
}

.filter-options::-webkit-scrollbar {
    height: 4px;
}

.filter-options::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}

.filter-options::-webkit-scrollbar-thumb {
    background-color: rgba(229, 57, 53, 0.3);
    border-radius: 2px;
}

.filter-option {
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(30, 30, 40, 0.6);
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    height: 28px;
    line-height: 1;
    display: flex;
    align-items: center;
}

.filter-option:hover {
    background: rgba(229, 57, 53, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.2);
    border-color: rgba(229, 57, 53, 0.3);
}

.filter-option.active {
    background: linear-gradient(135deg, #e53935, #ff5252);
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.3);
    border-color: transparent;
}

/* Search results info */
.search-results-info {
    background: rgba(229, 57, 53, 0.1);
    border: 1px solid rgba(229, 57, 53, 0.3);
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-results-info p {
    color: #e0e0e0;
    font-size: 14px;
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.search-results-info strong {
    color: #ffffff;
    font-weight: 600;
}

.clear-search {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: rgba(229, 57, 53, 0.2);
    border-radius: 20px;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
    margin-left: auto;
    border: 1px solid rgba(229, 57, 53, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.clear-search:hover {
    background: rgba(229, 57, 53, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(229, 57, 53, 0.2);
}

.clear-search i {
    margin-right: 6px;
    font-size: 12px;
}

/* News items grid layout */
.news-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 30px;
}

/* Main item style */
.news-item {
    display: flex;
    flex-direction: column;
    background: rgba(22, 22, 30, 0.5);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    height: auto;
    position: relative;
}

.news-item:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #e53935, #ff5252);
    border-radius: 0 0 10px 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-item:hover {
    transform: translateY(-7px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
    border-color: rgba(229, 57, 53, 0.3);
}

.news-item:hover:after {
    opacity: 1;
}

.news-image {
    height: 180px;
    background: #1a1a24;
    position: relative;
    overflow: hidden;
    width: 100%;
    flex-shrink: 0;
}

.news-image:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(to top, rgba(22, 22, 30, 0.8), transparent);
    z-index: 1;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s ease;
    display: block;
}

.news-item:hover .news-image img {
    transform: scale(1.08);
}

.news-content {
    flex: 1;
    padding: 20px 20px 0 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-meta {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.news-date {
    color: #7a7a8c;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.news-date:before {
    content: '\f017';
    font-family: 'Font Awesome 5 Free';
    margin-right: 6px;
    opacity: 0.7;
    font-size: 12px;
    position: relative;
    top: 0;
}

/* News type styles moved to style.css for consistency */

.news-title {
    font-size: 18px;
    color: #fff;
    margin-bottom: 12px;
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.news-item:hover .news-title {
    color: #ff5252;
}

.news-summary {
    color: #a0a0b0;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-footer {
    margin-top: auto;
    padding: 0 0 20px 0;
    width: 100%;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: linear-gradient(135deg, #e53935, #ff5252);
    color: #fff;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(229, 57, 53, 0.3);
    font-size: 14px;
    letter-spacing: 0.5px;
    justify-content: center;
    width: calc(100% - 40px);
    margin: 0 20px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(229, 57, 53, 0.4);
    background: linear-gradient(135deg, #d32f2f, #f44336);
}

.btn-primary i {
    margin-left: 8px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.btn-primary:hover i {
    transform: translateX(3px);
}

.text-right {
    text-align: center;
    width: 100%;
}

.news-empty {
    grid-column: 1 / -1;
    background: rgba(22, 22, 30, 0.5);
    border-radius: 10px;
    padding: 60px 30px;
    text-align: center;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    margin: 30px 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.news-empty p {
    color: #7a7a8c;
    font-size: 18px;
    font-weight: 500;
    margin: 0;
}

/* Responsive styles */
@media (max-width: 1200px) {
    .news-search {
        flex: 0 0 40%;
    }
}

@media (max-width: 992px) {
    .news-search-filter {
        flex-direction: column;
        max-height: none;
    }
    
    .news-search {
        width: 100%;
        flex: none;
        border-right: none;
        padding: 12px 15px;
        margin-bottom: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .news-filters {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 15px;
    }
    
    .filter-label {
        margin-right: 10px;
    }
    
    .filter-options {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 5px;
    }
}

@media (max-width: 768px) {
    .news-search-filter {
        margin-bottom: 20px;
    }
    
    .filter-options {
        gap: 8px;
    }
    
    .filter-option {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .filter-options {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 5px;
        flex-wrap: nowrap;
        width: 100%;
    }
    
    .filter-option {
        white-space: nowrap;
    }
}

/* News image placeholder */
.news-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a24, #252532);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.news-image-placeholder:before {
    content: '\f03e';
    font-family: 'Font Awesome 5 Free';
    font-weight: 400;
    font-size: 42px;
    color: rgba(255, 255, 255, 0.1);
}

/* Prevent empty grid spaces from affecting layout */
.news-item.placeholder {
    box-shadow: none;
    background: transparent;
    border: none;
}

/* Ensure all card heights are equal */
@media (min-width: 769px) {
    .news-item {
        min-height: 450px;
    }
    
    .news-image {
        height: 180px;
    }
    
    .news-content {
        height: calc(100% - 180px);
    }
}

/* News details page improvements */
.news-details-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 15px 60px;
    margin-top: 80px; /* Increased to create more space below header */
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    background: rgba(22, 22, 30, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 10;
    margin-top: 30px; /* Added to push breadcrumb down away from header */
}

.breadcrumb a {
    color: #a0a0b0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.breadcrumb a:hover {
    color: #ff5252;
    text-decoration: none;
}

.breadcrumb .separator {
    margin: 0 10px;
    color: #666;
}

.breadcrumb .current {
    color: #fff;
    font-weight: 600;
}

.news-details {
    position: relative;
    background: rgba(22, 22, 30, 0.5);
    border-radius: 10px;
    padding: 0;
    margin-bottom: 40px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    display: block;
    width: 100%;
    overflow: hidden;
    margin-top: 10px;
}

.news-header {
    width: 100%;
    padding: 30px 30px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: rgba(15, 15, 20, 0.3);
}

.header-content {
    flex: 1;
    padding-right: 20px;
}

.header-actions {
    min-width: 120px;
    margin-top: 5px;
}

.header-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: rgba(22, 22, 30, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.header-back-btn:hover {
    background: rgba(229, 57, 53, 0.1);
    border-color: rgba(229, 57, 53, 0.3);
    transform: translateX(-2px);
}

.header-back-btn i {
    margin-right: 6px;
    font-size: 14px;
}

.news-content-main {
    display: flex;
    width: 100%;
    position: relative;
    background: linear-gradient(135deg, rgba(25, 25, 35, 0.3), rgba(15, 15, 20, 0.3));
}

.news-details .news-title {
    font-size: 32px;
    margin-bottom: 15px;
    color: #fff;
    line-height: 1.3;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Improved featured image display */
.news-featured-image {
    margin: 0;
    position: relative;
    overflow: hidden;
    border-radius: 0;
    max-height: 600px;
    width: 100%;
    text-align: center;
    background: rgba(20, 20, 28, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.news-featured-image:before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to top, rgba(22, 22, 30, 0.8), transparent);
    z-index: 1;
}

.news-featured-image img {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    height: auto;
    object-fit: cover;
    max-height: 600px;
}

.news-video {
    padding: 0;
    margin: 30px auto;
    max-width: 900px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* Default aspect ratio 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    background: rgba(20, 20, 28, 0.3);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.news-content-block {
    flex: 1;
    min-width: 0;
    padding: 40px 30px;
    width: 75%;
    line-height: 1.7;
    color: #e0e0e0;
    font-size: 16px;
}

.news-sidebar {
    width: 25%;
    min-width: 250px;
    position: sticky;
    top: 30px;
    align-self: flex-start;
    padding: 40px 30px 40px 0;
}

.sidebar-block {
    background: rgba(30, 30, 40, 0.7);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.sidebar-block:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.sidebar-block h3 {
    font-size: 18px;
    color: #fff;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.sidebar-block h3:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #e53935, transparent);
}

.sidebar-button {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 15px;
    background: rgba(22, 22, 30, 0.7);
    border-radius: 6px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-button:last-child {
    margin-bottom: 0;
}

.sidebar-button:hover {
    background: rgba(229, 57, 53, 0.1);
    transform: translateX(5px);
    border-color: rgba(229, 57, 53, 0.3);
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.sidebar-button i {
    margin-right: 10px;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.sidebar-button:hover i {
    transform: translateX(-3px);
}

.news-content-block > *:first-child {
    margin-top: 0;
}

.news-content-block > *:last-child {
    margin-bottom: 0;
}

.news-content-block h1, 
.news-content-block h2, 
.news-content-block h3, 
.news-content-block h4, 
.news-content-block h5, 
.news-content-block h6 {
    color: #fff;
    margin: 1.8em 0 0.8em;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.news-content-block h1 {
    font-size: 28px;
    margin-top: 1.5em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.news-content-block h2 {
    font-size: 24px;
    padding-bottom: 0.3em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.news-content-block h2:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, #e53935, transparent);
}

.news-content-block h3 {
    font-size: 20px;
    color: #ff5252;
}

.news-content-block h4 {
    font-size: 18px;
}

.news-content-block p {
    margin: 0 0 1.5em;
    line-height: 1.7;
}

.news-content-block ul, 
.news-content-block ol {
    margin: 0 0 1.5em 1.5em;
    padding: 0;
}

.news-content-block ul li, 
.news-content-block ol li {
    margin-bottom: 0.8em;
    line-height: 1.6;
}

.news-content-block a {
    color: #ff5252;
    text-decoration: underline;
    transition: color 0.3s, text-decoration 0.3s;
}

.news-content-block a:hover {
    color: #ff7070;
    text-decoration: none;
}

.news-content-block blockquote {
    margin: 2em 0;
    padding: 20px 30px;
    border-left: 4px solid #e53935;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: #e0e0e0;
    position: relative;
}

.news-content-block blockquote:before {
    content: '"';
    font-size: 60px;
    color: rgba(229, 57, 53, 0.2);
    position: absolute;
    top: 10px;
    left: 10px;
    font-family: serif;
    line-height: 1;
}

.news-content-block img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.news-content-block code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

.news-content-block pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1.5em 0;
}

.news-content-block pre code {
    background: transparent;
    padding: 0;
}

.news-content-block hr {
    margin: 2em 0;
    border: none;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

/* Improved table styles */
.news-content-block table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.5em 0;
    background: rgba(22, 22, 30, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    table-layout: fixed; /* Makes columns more consistent */
}

.news-content-block table th,
.news-content-block table td {
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    border-left: none;
    text-align: left;
    vertical-align: middle;
    line-height: 1.5;
    word-wrap: break-word; /* Prevents text from overflowing */
    overflow-wrap: break-word;
}

.news-content-block table th:last-child,
.news-content-block table td:last-child {
    border-right: none;
}

.news-content-block table tr:last-child td {
    border-bottom: none;
}

.news-content-block table th {
    background: rgba(229, 57, 53, 0.9);
    font-weight: 600;
    color: #fff;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-color: rgba(255, 255, 255, 0.2);
}

.news-content-block table tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.1);
}

.news-content-block table tr:hover {
    background: rgba(229, 57, 53, 0.05);
}

.news-footer {
    width: 100%;
    padding: 20px 30px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(15, 15, 20, 0.3);
}

.news-actions {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-actions .btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    gap: 10px;
}

.news-actions .btn-secondary {
    background: rgba(30, 30, 40, 0.7);
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.news-actions .btn-secondary:hover {
    background: rgba(229, 57, 53, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    border-color: rgba(229, 57, 53, 0.2);
}

.news-actions .btn i {
    font-size: 14px;
}

/* News navigation */
.news-navigation {
    margin-top: 30px;
    width: 100%;
}

.news-nav-header {
    margin-bottom: 20px;
    text-align: center;
    position: relative;
}

.news-nav-header h3 {
    font-size: 20px;
    color: #fff;
    margin: 0;
    font-weight: 600;
    padding-bottom: 15px;
    position: relative;
}

.news-nav-header h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #e53935, #ff5252);
    border-radius: 3px;
}

.news-nav-links {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.news-nav-item {
    flex: 1;
    background: rgba(22, 22, 30, 0.5);
    border-radius: 8px;
    padding: 20px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    text-decoration: none;
}

.news-nav-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-color: rgba(229, 57, 53, 0.3);
    background: rgba(22, 22, 30, 0.7);
}

.prev-news:before {
    left: 0;
}

.next-news:before {
    right: 0;
}

.news-nav-item:hover {
    background: rgba(229, 57, 53, 0.1);
    border-color: rgba(229, 57, 53, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.news-nav-direction {
    color: #7a7a8c;
    font-size: 14px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.prev-news .news-nav-direction {
    justify-content: flex-start;
}

.next-news .news-nav-direction {
    justify-content: flex-end;
}

.news-nav-title {
    color: #fff;
    font-weight: 500;
    font-size: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.5;
}

/* News share */
.news-share {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.news-share span {
    color: #7a7a8c;
    font-size: 14px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.share-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.share-btn.vk {
    background: linear-gradient(135deg, #4c75a3, #3a5b85);
    box-shadow: 0 3px 10px rgba(76, 117, 163, 0.3);
}

.share-btn.telegram {
    background: linear-gradient(135deg, #0088cc, #0072aa);
    box-shadow: 0 3px 10px rgba(0, 136, 204, 0.3);
}

.share-btn.discord {
    background: linear-gradient(135deg, #7289da, #5c72c0);
    box-shadow: 0 3px 10px rgba(114, 137, 218, 0.3);
}

/* Home page news improvements */
.news-section .news-card {
    background: rgba(22, 22, 30, 0.5);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-section .news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
    border-color: rgba(229, 57, 53, 0.3);
}

.news-section .news-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.news-section .news-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-section .news-meta {
    margin-bottom: 10px;
}

.news-section h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #fff;
    line-height: 1.3;
    font-weight: 600;
    transition: color 0.3s ease;
}

.news-section .news-card:hover h3 {
    color: #ff5252;
}

.news-section p {
    color: #a0a0b0;
    margin-bottom: 15px;
    line-height: 1.5;
    font-size: 14px;
    flex: 1;
}

.news-section .read-more {
    color: #ff5252;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    margin-top: auto;
}

.news-section .read-more:after {
    content: '→';
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.news-section .read-more:hover {
    color: #ff7070;
}

.news-section .read-more:hover:after {
    transform: translateX(3px);
}

/* Media queries with new elements */
@media (max-width: 992px) {
    .news-search-filter {
        flex-direction: column;
    }
    
    .news-navigation {
        margin-top: 40px;
    }
    
    .news-content-main {
        width: 100%;
    }
    
    .news-content-block {
        padding: 20px;
    }
    
    .news-sidebar {
        width: 100%;
        margin-top: 30px;
    }
    
    .news-details .news-title {
        font-size: 26px;
    }
    
    .event-banner {
        min-height: 350px;
    }
    
    .event-banner-content {
        padding: 30px;
    }
    
    .event-banner-back {
        padding: 0 30px 30px;
    }
    
    .news-details-container {
        padding: 30px 15px;
    }
}

@media (max-width: 768px) {
    .news-item {
        flex-direction: column;
        height: auto;
    }
    
    .news-image {
        flex: 0 0 200px;
        width: 100%;
        border-radius: 8px 8px 0 0;
    }
    
    .news-image img {
        border-radius: 8px 8px 0 0;
        height: 100%;
        position: absolute;
    }
    
    .news-image:after {
        display: none;
    }
    
    .news-content {
        padding: 15px 15px 0 15px;
    }
    
    .news-title {
        font-size: 20px;
    }
    
    .news-summary {
        font-size: 14px;
    }
    
    .text-right {
        text-align: center;
    }
    
    .news-nav-links {
        flex-direction: column;
    }
    
    .news-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .news-share {
        margin-top: 15px;
    }
    
    .search-results-info p {
        font-size: 13px;
    }
    
    .clear-search {
        margin-top: 10px;
    }
    
    .filter-options {
        gap: 8px;
    }
    
    .filter-option {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .news-filters {
        padding: 12px 15px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-label {
        margin-bottom: 10px;
    }
    
    .news-search-filter {
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    .news-details-container {
        padding: 20px 10px;
    }
    
    .page-header h1 {
        font-size: 28px;
    }
    
    .breadcrumb {
        font-size: 13px;
        margin-bottom: 15px;
    }
    
    .news-header {
        padding: 15px;
    }
    
    .news-title {
        font-size: 18px;
    }
    
    .news-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

/* Tables in news content */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(22, 22, 30, 0.5);
}

.content-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    margin: 0; /* Reset margin since container has margin */
    table-layout: fixed; /* Makes columns more consistent */
}

.content-table thead {
    background-color: rgba(229, 57, 53, 0.9);
    color: #fff;
}

.content-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
}

.content-table td {
    padding: 12px 15px;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
    color: #e0e0e0;
    line-height: 1.5;
}

.content-table tbody tr {
    background-color: rgba(30, 30, 40, 0.6);
    transition: all 0.3s ease;
}

.content-table tbody tr:nth-child(even) {
    background-color: rgba(20, 20, 30, 0.7);
}

.content-table tbody tr:hover {
    background-color: rgba(50, 50, 70, 0.7);
}

.content-table tbody tr:last-child td {
    border-bottom: none;
}

/* Additional table styling for better alignment */
.content-table th:first-child,
.content-table td:first-child,
.news-content-block table th:first-child,
.news-content-block table td:first-child {
    padding-left: 20px; /* Extra padding on first column */
}

.content-table th:last-child,
.content-table td:last-child,
.news-content-block table th:last-child,
.news-content-block table td:last-child {
    padding-right: 20px; /* Extra padding on last column */
}

/* Ensure table cells with numeric content are right-aligned */
.content-table td.numeric,
.news-content-block table td.numeric {
    text-align: right;
}

/* Add hover effect to rows */
.content-table tbody tr,
.news-content-block table tbody tr {
    transition: transform 0.15s ease, background-color 0.3s ease;
}

.content-table tbody tr:hover,
.news-content-block table tbody tr:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1;
    position: relative;
}

/* Responsive adjustment for very small screens */
@media (max-width: 576px) {
    .table-responsive {
        margin: 10px 0;
        border-radius: 4px;
    }
    
    .content-table th,
    .content-table td,
    .news-content-block table th,
    .news-content-block table td {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .content-table th:first-child,
    .content-table td:first-child,
    .news-content-block table th:first-child,
    .news-content-block table td:first-child {
        padding-left: 12px;
    }
    
    .content-table th:last-child,
    .content-table td:last-child,
    .news-content-block table th:last-child,
    .news-content-block table td:last-child {
        padding-right: 12px;
    }
}

.news-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a24, #252532);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.news-image-placeholder:before {
    content: '\f03e';
    font-family: 'Font Awesome 5 Free';
    font-weight: 400;
    font-size: 42px;
    color: rgba(255, 255, 255, 0.1);
}

/* Prevent empty grid spaces from affecting layout */
.news-item.placeholder {
    box-shadow: none;
    background: transparent;
    border: none;
}

/* Ensure all card heights are equal */
@media (min-width: 769px) {
    .news-item {
        min-height: 450px;
    }
    
    .news-image {
        height: 180px;
    }
    
    .news-content {
        height: calc(100% - 180px);
    }
}

/* Event Banner Styles */
.event-banner {
    background: rgba(22, 22, 30, 0.7);
    border-radius: 8px;
    margin-bottom: 30px;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center 15%;
}

.event-banner:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(114, 137, 218, 0.15), rgba(114, 137, 218, 0.05));
    z-index: 0;
}

.event-banner-content {
    position: relative;
    z-index: 1;
    flex: 1;
    padding-right: 30px;
}

.event-banner-meta {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
}

.event-date {
    color: #7a7a8c;
    font-size: 14px;
}

.event-type {
    background: linear-gradient(135deg, #7b68ee, #9281f1);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.event-title {
    font-size: 28px;
    margin-bottom: 12px;
    color: #fff;
    font-weight: 700;
}

.event-description {
    color: #a0a0b0;
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 15px;
    max-width: 750px;
}

.event-read-more {
    background: linear-gradient(135deg, #7b68ee, #9281f1);
    color: #fff;
    padding: 10px 25px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(123, 104, 238, 0.3);
    letter-spacing: 1px;
}

.event-read-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(123, 104, 238, 0.4);
}

.event-banner-back {
    position: relative;
    z-index: 1;
}

.event-back-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.event-back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .event-banner {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .event-banner-content {
        padding-right: 0;
        margin-bottom: 20px;
    }
    
    .event-banner-back {
        width: 100%;
    }
    
    .event-back-btn {
        width: 100%;
        text-align: center;
    }
}

.news-embedded-image {
    margin: 30px 0;
    text-align: center;
    background: rgba(20, 20, 28, 0.3);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.news-embedded-image img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
}

.news-video {
    margin: 30px auto;
    max-width: 900px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* Default aspect ratio 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    background: rgba(20, 20, 28, 0.3);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 768px) {
    .news-embedded-image {
        margin: 20px 0;
    }
    
    .news-video {
        margin: 20px auto;
    }
    
    .news-video, 
    .news-embedded-image {
        max-width: 100% !important;
    }
}

/* Image aspect ratio handling for news list */
.news-image.tall-image img {
    object-position: center 10%;
}

.news-image.portrait-image img {
    object-position: center 25%;
}

.news-image.wide-image img {
    object-position: center center;
}

/* Special handling for the event banner in news list */
.news-item:has(.news-type-event) .news-image img,
.news-item:has([class*="news-type-event"]) .news-image img {
    object-position: center 20%;
}

/* Fallback for browsers that don't support :has() */
.news-type-event ~ .news-title ~ .news-summary ~ .text-right ~ .news-image img {
    object-position: center 20%;
}

/* Direct selector for event images for better compatibility */
.news-type-event ~ .news-image img,
[class*="news-type-event"] ~ .news-image img {
    object-position: center 20%;
}

/* Image placeholder for loading or missing images */
.news-image.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(26, 26, 36, 0), rgba(40, 40, 50, 0.5), rgba(26, 26, 36, 0));
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    z-index: 2;
}

@keyframes loading {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Special styling for event type news items */
.news-item-type-event .news-image img {
    object-position: center 20%;
}

.news-image[data-type="event"] img {
    object-position: center 20%;
}

/* Ensure images properly fill container with correct aspect ratio */
.news-item {
    display: flex;
    flex-direction: column;
    background: rgba(22, 22, 30, 0.5);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    height: auto;
}

/* Better mobile display for news items */
@media (max-width: 768px) {
    .news-item {
        flex-direction: column;
        height: auto;
    }
    
    .news-image {
        flex: 0 0 200px;
        width: 100%;
        max-height: 200px;
        height: 200px;
    }
    
    .news-image img {
        width: 100%;
        height: 100%;
        object-position: center;
    }
    
    /* For event type, adjust image position in mobile */
    .news-item-type-event .news-image img,
    .news-image[data-type="event"] img {
        object-position: center 15%;
    }
}

/* Event image special handling */
.news-image.event-image img {
    object-position: center 15%;
}

/* Make sure event banners look good */
.event-banner {
    background: rgba(22, 22, 30, 0.7);
    border-radius: 8px;
    margin-bottom: 30px;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center 15%;
}

@media (max-width: 992px) {
    .news-details {
        flex-direction: column;
    }
    
    .news-content-block {
        width: 100%;
        padding-right: 0;
        margin-bottom: 30px;
    }
    
    .news-sidebar {
        width: 100%;
        padding-left: 0;
        position: static;
    }
}

/* Responsive tables for mobile */
@media (max-width: 768px) {
    .table-responsive {
        margin: 15px 0;
        border-radius: 6px;
    }
    
    .content-table th,
    .content-table td {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .news-content-block table th,
    .news-content-block table td {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* Fix for tables with uneven content */
.news-content-block table.auto-width,
.content-table.auto-width {
    table-layout: auto;
}

/* Ensure table inside responsive container looks good */
.table-responsive .content-table {
    border: none;
    margin: 0;
    box-shadow: none;
}

/* Ensure tables with few columns have more even spacing */
.news-content-block table.even-columns th,
.content-table.even-columns th {
    width: 1%;
}

/* Fix for empty cells */
.news-content-block table td:empty,
.content-table td:empty {
    height: 2.5em;
    background-color: rgba(0, 0, 0, 0.05);
}

/* Improve table borders for better visibility */
.news-content-block table,
.table-responsive {
    border: 1px solid rgba(255, 255, 255, 0.15);
} 