/* ===========================================
   WORDPRESS ISOLATED NEWS ARCHIVE - FIXED FULL WIDTH
   All styles are scoped to #news-archive-wrapper
   to prevent conflicts with WordPress theme
============================================ */

/* RESET for WordPress Isolation */
#news-archive-wrapper * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

#news-archive-wrapper {
    /* Override WordPress theme styles */
    all: initial;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #73a15b , #000000, #4c726c );
    min-height: 100vh;
    color: white;
    isolation: isolate; /* Creates new stacking context */
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    display: block;
}

/* Remove flex centering and make it full width */
#news-archive-wrapper,
#news-archive-wrapper.dark-theme,
#news-archive-wrapper.light-theme {
    display: block;
    justify-content: normal;
    align-items: normal;
    padding: 0;
}

/* FIXED: THEME TOGGLE STYLES - MOVED INSIDE CONTAINER */
#news-archive-wrapper .theme-toggle-container {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 10;
}

#news-archive-wrapper .theme-toggle {
    background: rgba(115, 161, 91, 0.1);
    border: 1px solid rgba(115, 161, 91, 0.2);
    border-radius: 25px;
    padding: 8px 16px;
    color: #4c726c ;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

#news-archive-wrapper .theme-toggle:hover {
    background: linear-gradient(90deg, #4c726c , #73a15b);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(115, 161, 91, 0.3);
}

/* LIGHT THEME */
#news-archive-wrapper.light-theme {
    background: linear-gradient(135deg, #73a15b, #e4e8f0, #c3cfe2);
    color: #000000;
}

#news-archive-wrapper.light-theme .theme-toggle {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: #000000;
}

#news-archive-wrapper.light-theme .theme-toggle:hover {
    background: linear-gradient(90deg, #000000, #73a15b);
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* FIXED: NEWS ARCHIVE CONTAINER - REMOVED TOP LINES */
#news-archive-wrapper .news-archive {
    width: 100%;
    max-width: 100%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    padding: 40px 20px;
    border: none;
    box-shadow: none;
    position: relative;
    overflow: hidden;
    margin: 0;
    border-radius: 0;
}

#news-archive-wrapper.light-theme .news-archive {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    box-shadow: none;
}

/* HEADER - CENTERED BUT FULL WIDTH BACKGROUND */
#news-archive-wrapper .news-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

#news-archive-wrapper .news-header h1 {
    font-size: 3.8rem;
    font-weight: 800;
    background: linear-gradient(90deg, #73a15b, #000000, #4c726c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 10px;
    letter-spacing: -1px;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#news-archive-wrapper.light-theme .news-header h1 {
    background: linear-gradient(90deg, #000000, #73a15b, #4c726c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

#news-archive-wrapper .news-corner {
    display: inline-block;
    background: linear-gradient(90deg, #73a15b, #000000);
    color: white;
    padding: 8px 25px;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(115, 161, 91, 0.3);
    animation: cornerGlow 3s infinite;
}

#news-archive-wrapper.light-theme .news-corner {
    background: linear-gradient(90deg, #000000, #73a15b);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

@keyframes cornerGlow {
    0%, 100% { box-shadow: 0 5px 15px rgba(115, 161, 91, 0.3); }
    50% { box-shadow: 0 5px 25px rgba(115, 161, 91, 0.6); }
}

#news-archive-wrapper .news-header p {
    font-size: 1.2rem;
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

#news-archive-wrapper.light-theme .news-header p {
    color: #4a5568;
}

/* STATS - CENTERED */
#news-archive-wrapper .news-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

#news-archive-wrapper .stat {
    background: rgba(255, 255, 255, 0.07);
    padding: 15px 25px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    min-width: 180px;
}

#news-archive-wrapper.light-theme .stat {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

#news-archive-wrapper .stat:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

#news-archive-wrapper.light-theme .stat:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

#news-archive-wrapper .stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(90deg, #000000, #4c726c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

#news-archive-wrapper.light-theme .stat-number {
    background: linear-gradient(90deg, #000000, #4c726c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

#news-archive-wrapper .stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 5px;
}

#news-archive-wrapper.light-theme .stat-label {
    color: #4a5568;
}

/* FIXED: FILTER SECTION - IMPROVED VISIBILITY */
#news-archive-wrapper .filter-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 25px;
    margin: 0 auto 40px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 1200px;
}

#news-archive-wrapper.light-theme .filter-section {
    background: rgba(240, 242, 245, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

#news-archive-wrapper .filter-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
}

#news-archive-wrapper .filter-icon {
    font-size: 1.5rem;
    background: linear-gradient(90deg, #73a15b, #000000);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

#news-archive-wrapper.light-theme .filter-icon {
    background: linear-gradient(90deg, #000000, #73a15b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

#news-archive-wrapper .filter-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: white;
}

#news-archive-wrapper.light-theme .filter-title {
    color: #2d3748;
}

#news-archive-wrapper .filter-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

@media (max-width: 768px) {
    #news-archive-wrapper .filter-controls {
        grid-template-columns: 1fr;
    }
}

/* FIXED: FILTER GROUP - FIXED LABEL VISIBILITY */
#news-archive-wrapper .filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px; /* Reduced from 12px */
}

#news-archive-wrapper .filter-label {
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0.95;
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 5px;
    padding-left: 5px;
}

#news-archive-wrapper.light-theme .filter-label {
    color: #2d3748;
}

#news-archive-wrapper .filter-label::before {
    content: '▶';
    font-size: 0.7rem;
    color: #000000;
    margin-right: 5px;
}

#news-archive-wrapper.light-theme .filter-label::before {
    color: #000000;
}

#news-archive-wrapper .date-filter {
    display: flex;
    gap: 15px;
}

/* FIXED: DROPDOWN - PROPER PADDING FOR TEXT VISIBILITY */
#news-archive-wrapper .date-select {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 14px 18px; /* Increased vertical padding */
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2373a15b' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 14px;
    min-height: 48px; /* Ensures consistent height */
}

/* Light theme dropdown */
#news-archive-wrapper.light-theme .date-select {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #2d3748;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23000000' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 14px;
    min-height: 48px; /* Ensures consistent height */
}

/* Dropdown options styling */
#news-archive-wrapper .date-select option {
    background: #1a1a2e;
    color: white;
    padding: 10px;
    font-size: 0.95rem;
}

#news-archive-wrapper.light-theme .date-select option {
    background: white;
    color: #2d3748;
    padding: 10px;
}

/* Remove default arrow for IE */
#news-archive-wrapper .date-select::-ms-expand {
    display: none;
}

/* Firefox focus fix */
#news-archive-wrapper .date-select:-moz-focusring {
    color: transparent;
    text-shadow: 0 0 0 white;
}

#news-archive-wrapper.light-theme .date-select:-moz-focusring {
    text-shadow: 0 0 0 #2d3748;
}

/* Hover and focus states */
#news-archive-wrapper .date-select:hover {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

#news-archive-wrapper.light-theme .date-select:hover {
    background-color: rgba(255, 255, 255, 1);
    border-color: rgba(0, 0, 0, 0.25);
}

#news-archive-wrapper .date-select:focus {
    outline: none;
    border-color: #73a15b;
    box-shadow: 0 0 0 2px rgba(115, 161, 91, 0.3);
    background-color: rgba(255, 255, 255, 0.12);
}

#news-archive-wrapper.light-theme .date-select:focus {
    border-color: #000000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
    background-color: rgba(255, 255, 255, 1);
}

/* SEARCH - UPDATED TO MATCH DROPDOWN HEIGHT */
#news-archive-wrapper .search-container {
    position: relative;
}

#news-archive-wrapper .search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 14px 18px 14px 45px; /* Increased vertical padding */
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    min-height: 48px; /* Matches dropdown height */
}

#news-archive-wrapper.light-theme .search-input {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #2d3748;
    min-height: 48px; /* Matches dropdown height */
}

#news-archive-wrapper .search-input:focus {
    outline: none;
    border-color: #73a15b;
    box-shadow: 0 0 0 2px rgba(115, 161, 91, 0.3);
    background-color: rgba(255, 255, 255, 0.12);
}

#news-archive-wrapper.light-theme .search-input:focus {
    border-color: #000000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
    background-color: rgba(255, 255, 255, 1);
}

#news-archive-wrapper .search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
}

#news-archive-wrapper.light-theme .search-icon {
    color: rgba(74, 85, 104, 0.6);
}

/* FILTER BUTTONS - UPDATED HEIGHT */
#news-archive-wrapper .filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
}

#news-archive-wrapper .filter-btn {
    padding: 12px 25px; /* Increased vertical padding */
    border-radius: 12px;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px; /* Ensures consistent height */
}

#news-archive-wrapper .filter-apply {
    background: linear-gradient(90deg, #73a15b, #000000);
    color: white;
}

#news-archive-wrapper.light-theme .filter-apply {
    background: linear-gradient(90deg, #000000, #73a15b);
}

#news-archive-wrapper .filter-apply:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(115, 161, 91, 0.3);
}

#news-archive-wrapper.light-theme .filter-apply:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

#news-archive-wrapper .filter-reset {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#news-archive-wrapper.light-theme .filter-reset {
    background: rgba(255, 255, 255, 0.8);
    color: #4a5568;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

#news-archive-wrapper .filter-reset:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

#news-archive-wrapper.light-theme .filter-reset:hover {
    background: rgba(255, 255, 255, 1);
}

/* NEWS GRID - CENTERED WITH MAX WIDTH */
#news-archive-wrapper .news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

/* NEWS CARDS */
#news-archive-wrapper .news-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    animation: cardEntrance 0.6s forwards;
}

#news-archive-wrapper.light-theme .news-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

@keyframes cardEntrance {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#news-archive-wrapper .news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent);
    z-index: 0;
}

#news-archive-wrapper.light-theme .news-card::before {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.02), transparent);
}

#news-archive-wrapper .news-card:hover {
    transform: translateY(-12px) scale(1.02);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

#news-archive-wrapper.light-theme .news-card:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

#news-archive-wrapper .news-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.7s ease;
}

#news-archive-wrapper.light-theme .news-card::after {
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.05), transparent);
}

#news-archive-wrapper .news-card:hover::after {
    left: 100%;
}

/* NEWS DATE */
#news-archive-wrapper .news-date {
    display: inline-block;
    background: linear-gradient(90deg, #73a15b, #000000);
    color: white;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    box-shadow: 0 5px 15px rgba(115, 161, 91, 0.3);
}

#news-archive-wrapper.light-theme .news-date {
    background: linear-gradient(90deg, #000000, #73a15b);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* NEWS TITLE - FIXED */
#news-archive-wrapper .news-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 18px;
    line-height: 1.4;
    position: relative;
    z-index: 1;
    color: #ffffff !important; /* Force white in dark mode */
    transition: all 0.3s ease;
}

#news-archive-wrapper.light-theme .news-title {
    color: #2d3748 !important; /* Force dark in light mode */
}

#news-archive-wrapper .news-card:hover .news-title {
    background: linear-gradient(90deg, #000000, #4c726c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important; /* Override on hover */
}

#news-archive-wrapper.light-theme .news-card:hover .news-title {
    background: linear-gradient(90deg, #000000, #4c726c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important; /* Override on hover */
}

/* NEWS EXCERPT */
#news-archive-wrapper .news-excerpt {
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.7;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
    font-size: 1.05rem;
}

#news-archive-wrapper.light-theme .news-excerpt {
    color: #4a5568;
}

/* NEWS FOOTER */
#news-archive-wrapper .news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#news-archive-wrapper.light-theme .news-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* READ MORE BUTTON - FIXED */
#news-archive-wrapper .news-read-more {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
}

#news-archive-wrapper.light-theme .news-read-more {
    color: #2d3748;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.15);
}

#news-archive-wrapper .news-read-more:hover {
    background: linear-gradient(90deg, #73a15b, #000000);
    transform: translateX(5px);
    box-shadow: 0 10px 20px rgba(115, 161, 91, 0.3);
    color: white !important; /* Force white text on hover */
}

#news-archive-wrapper.light-theme .news-read-more:hover {
    background: linear-gradient(90deg, #000000, #73a15b);
    color: white !important; /* Force white text on hover */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* NEWS ID - FIXED NUMBERING */
#news-archive-wrapper .news-id {
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#news-archive-wrapper.light-theme .news-id {
    background: rgba(255, 255, 255, 0.8);
    color: #4a5568;
}

#news-archive-wrapper .news-id::before {
    content: '🔖';
    font-size: 0.8rem;
}

/* Staggered animation delays */
#news-archive-wrapper .news-card:nth-child(1) { animation-delay: 0.1s; }
#news-archive-wrapper .news-card:nth-child(2) { animation-delay: 0.2s; }
#news-archive-wrapper .news-card:nth-child(3) { animation-delay: 0.3s; }
#news-archive-wrapper .news-card:nth-child(4) { animation-delay: 0.4s; }
#news-archive-wrapper .news-card:nth-child(5) { animation-delay: 0.5s; }
#news-archive-wrapper .news-card:nth-child(6) { animation-delay: 0.6s; }
#news-archive-wrapper .news-card:nth-child(7) { animation-delay: 0.7s; }
#news-archive-wrapper .news-card:nth-child(8) { animation-delay: 0.8s; }
#news-archive-wrapper .news-card:nth-child(9) { animation-delay: 0.9s; }
#news-archive-wrapper .news-card:nth-child(10) { animation-delay: 1.0s; }
#news-archive-wrapper .news-card:nth-child(11) { animation-delay: 1.1s; }
#news-archive-wrapper .news-card:nth-child(12) { animation-delay: 1.2s; }
#news-archive-wrapper .news-card:nth-child(13) { animation-delay: 1.3s; }
#news-archive-wrapper .news-card:nth-child(14) { animation-delay: 1.4s; }
#news-archive-wrapper .news-card:nth-child(15) { animation-delay: 1.5s; }

/* LATEST BADGE */
#news-archive-wrapper .latest-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(90deg, #73a15b, #000000);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    animation: pulse 2s infinite;
    z-index: 2;
}

#news-archive-wrapper.light-theme .latest-badge {
    background: linear-gradient(90deg, #000000, #73a15b);
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(115, 161, 91, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(115, 161, 91, 0); }
    100% { box-shadow: 0 0 0 0 rgba(115, 161, 91, 0); }
}

/* RESPONSIVE DESIGN */
@media (max-width: 1100px) {
    #news-archive-wrapper .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
        max-width: 1000px;
    }
    
    #news-archive-wrapper .news-header,
    #news-archive-wrapper .news-stats,
    #news-archive-wrapper .filter-section,
    #news-archive-wrapper .news-grid {
        max-width: 1000px;
    }
}

@media (max-width: 768px) {
    #news-archive-wrapper .news-header h1 {
        font-size: 2.8rem;
    }
    
    #news-archive-wrapper .news-stats {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    #news-archive-wrapper .stat {
        min-width: 150px;
    }
    
    #news-archive-wrapper .news-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        max-width: 600px;
    }
    
    #news-archive-wrapper .news-card {
        padding: 25px;
    }
    
    #news-archive-wrapper .filter-section {
        max-width: 600px;
    }
    
    /* FIXED: Theme toggle responsive */
    #news-archive-wrapper .theme-toggle-container {
        top: 20px;
        right: 20px;
    }
    
    #news-archive-wrapper .theme-toggle {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    #news-archive-wrapper .news-header h1 {
        font-size: 2.2rem;
    }
    
    #news-archive-wrapper .news-corner {
        font-size: 1rem;
        padding: 6px 20px;
    }
    
    #news-archive-wrapper .news-header p {
        font-size: 1rem;
    }
    
    #news-archive-wrapper .news-card {
        padding: 20px;
    }
    
    #news-archive-wrapper .filter-section {
        padding: 20px;
    }
    
    #news-archive-wrapper .theme-toggle-container {
        top: 15px;
        right: 15px;
    }
    
    #news-archive-wrapper .theme-toggle {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
}

/* PARTICLES */
#news-archive-wrapper .particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

#news-archive-wrapper .particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 15s infinite linear;
}

#news-archive-wrapper.light-theme .particle {
    background: rgba(0, 0, 0, 0.1);
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
    }
}

/* MODAL - FIXED */
#news-archive-wrapper .news-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: modalFadeIn 0.3s ease;
}

#news-archive-wrapper.light-theme .news-modal {
    background: rgba(0, 0, 0, 0.7);
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#news-archive-wrapper .modal-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 20px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: modalSlideIn 0.4s ease;
}

#news-archive-wrapper.light-theme .modal-content {
    background: linear-gradient(135deg, #ffffff, #f7fafc);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

@keyframes modalSlideIn {
    from { transform: translateY(50px) scale(0.9); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

#news-archive-wrapper .modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

#news-archive-wrapper.light-theme .modal-close {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

#news-archive-wrapper .modal-close:hover {
    background: linear-gradient(90deg, #73a15b, #000000);
    transform: rotate(90deg);
}

#news-archive-wrapper.light-theme .modal-close:hover {
    background: linear-gradient(90deg, #000000, #73a15b);
    color: white;
}

#news-archive-wrapper .modal-header {
    margin-bottom: 30px;
    position: relative;
}

#news-archive-wrapper .modal-date {
    display: inline-block;
    background: linear-gradient(90deg, #73a15b, #000000);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(115, 161, 91, 0.3);
}

#news-archive-wrapper.light-theme .modal-date {
    background: linear-gradient(90deg, #000000, #73a15b);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

#news-archive-wrapper .modal-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 25px;
    background: linear-gradient(90deg, #000000, #4c726c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

#news-archive-wrapper.light-theme .modal-title {
    background: linear-gradient(90deg, #000000, #4c726c);
    -webkit-background-clip: text;
    background-clip: text;
}

#news-archive-wrapper .modal-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
}

#news-archive-wrapper.light-theme .modal-body {
    color: #4a5568;
}

#news-archive-wrapper .modal-body p {
    margin-bottom: 20px;
}

#news-archive-wrapper .modal-body h3 {
    color: #73a15b;
    margin: 25px 0 15px;
    font-size: 1.4rem;
}

#news-archive-wrapper.light-theme .modal-body h3 {
    color: #000000;
}

#news-archive-wrapper .modal-loading {
    text-align: center;
    padding: 50px;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
}

#news-archive-wrapper.light-theme .modal-loading {
    color: rgba(74, 85, 104, 0.7);
}

#news-archive-wrapper .modal-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #73a15b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

#news-archive-wrapper.light-theme .modal-loading::after {
    border: 3px solid rgba(74, 85, 104, 0.3);
    border-top-color: #000000;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* CATEGORIES REMOVED */
#news-archive-wrapper .modal-tags {
    display: none !important;
}

#news-archive-wrapper .modal-tag {
    display: none !important;
}

/* LOADING */
#news-archive-wrapper .loading {
    opacity: 0.7;
    pointer-events: none;
}

#news-archive-wrapper .loading::after {
    content: 'Loading...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    color: #73a15b;
}

#news-archive-wrapper.light-theme .loading::after {
    color: #000000;
}

/* NO RESULTS */
#news-archive-wrapper .no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
}

#news-archive-wrapper.light-theme .no-results {
    color: rgba(74, 85, 104, 0.7);
}

#news-archive-wrapper .no-results-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Loading animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Loading and error states */
#news-archive-wrapper .loading-container {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
}

#news-archive-wrapper .error-container {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    color: #ff6b6b;
}

#news-archive-wrapper .error-container button {
    margin-top: 20px;
    padding: 10px 20px;
    background: linear-gradient(90deg, #73a15b, #000000);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-weight: 600;
}

#news-archive-wrapper.light-theme .error-container {
    color: #d32f2f;
}

#news-archive-wrapper .news-image {
    height: 200px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    margin-bottom: 15px;
}