:root {
    --ev-gold: var(--av-gold);
    --ev-gold-bright: var(--av-gold-strong);
    --ev-ivory: var(--av-text);
    --ev-muted: var(--av-muted);
    --ev-panel: var(--av-surface-strong);
    --ev-blue: var(--av-blue);
}

.ev-page {
    min-height: 100vh;
    padding: 72px 0 32px;
    color: var(--ev-ivory);
    font-family: 'Cinzel', serif;
}

.ev-container {
    width: min(1480px, calc(100% - 48px));
    margin-inline: auto;
}

.ev-header {
    min-height: 135px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 12px;
    text-align: center;
}

.ev-header__title {
    margin: 0;
    color: #e8bd6d;
    font-size: clamp(2.25rem, 3.1vw, 3rem);
    font-weight: 500;
    letter-spacing: .025em;
    line-height: 1.08;
    text-transform: uppercase;
    text-shadow: 0 2px 2px #000, 0 0 14px rgba(229, 172, 80, .2);
    text-wrap: balance;
}

.ev-header__ornament {
    width: min(692px, 58vw);
    height: 22px;
    margin-top: 1px;
    object-fit: fill;
}

.ev-header__sub {
    margin: 4px 0 0;
    color: #c4c4c6;
    font-size: .78rem;
    font-weight: 500;
    letter-spacing: .07em;
    line-height: 1.5;
    text-transform: uppercase;
}

.ev-layout {
    display: grid;
    grid-template-columns: minmax(0, 1080px) 355px;
    gap: 14px;
    align-items: start;
    margin-top: 20px;
}

@media (max-width: 1024px) {
    .ev-layout {
        grid-template-columns: 1fr;
    }
}

.ev-panel {
    min-width: 0;
    position: relative;
    padding: 33px 30px 24px;
    background: rgba(1, 8, 15, .94);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.ev-panel__frame {
    position: absolute;
    inset: 0;
    z-index: 0;
    border-style: solid;
    border-color: transparent;
    border-image-source: url('/images/news/v2/panel-frame.webp');
    border-image-slice: 90 fill;
    border-image-outset: 0;
    border-image-repeat: stretch;
    pointer-events: none;
    border-width: 25px;
    border-image-width: 25px;
}

.ev-panel__content {
    position: relative;
    z-index: 1;
}

.ev-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    position: relative;
    z-index: 4;
}

.ev-filter {
    min-width: 120px;
    min-height: 44px;
    display: grid;
    place-items: center;
    padding: 0 16px;
    position: relative;
    color: #d9b66d;
    background: url('/images/news/reference/tab-inactive.webp') center / 100% 100% no-repeat;
    text-decoration: none;
    text-transform: uppercase;
    font-size: .72rem;
    font-weight: 600;
    line-height: 1;
    transition: color .18s ease, filter .18s ease;
    cursor: pointer;
}

.ev-filter:hover,
.ev-filter:focus-visible {
    color: #fff0bc;
    filter: brightness(1.24);
    outline: none;
}

.ev-filter.is-active {
    color: #fff;
    background-image: url('/images/news/reference/tab-active.webp');
    text-shadow: 0 0 8px rgba(51, 139, 255, .7);
}

/* Event Cards List */
.ev-card-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ev-card {
    display: grid;
    grid-template-columns: 190px 70px 1fr 152px 130px;
    align-items: center;
    gap: 20px;
    padding: 16px 0;
    border-bottom: 1px dashed rgba(217, 179, 106, 0.18);
}

.ev-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

@media (max-width: 1024px) {
    .ev-card {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 20px 0;
    }
}

.ev-card__media {
    position: relative;
    width: 190px;
    height: 115px;
    flex-shrink: 0;
    border: 2px solid rgba(217, 179, 106, 0.35);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}

@media (max-width: 768px) {
    .ev-card__media {
        width: 100%;
        height: 160px;
    }
}

.ev-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.ev-card:hover .ev-card__image {
    transform: scale(1.05);
}

.ev-card__badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 7px;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.6);
    line-height: 1;
}

.ev-card__badge--ongoing {
    background: #166534;
    color: #86efac;
    border: 1px solid #22c55e;
}

.ev-card__badge--upcoming {
    background: #1e3a8a;
    color: #93c5fd;
    border: 1px solid #3b82f6;
}

.ev-card__badge--scheduled {
    background: #78350f;
    color: #fde047;
    border: 1px solid #eab308;
}

.ev-card__badge--ended {
    background: #374151;
    color: #d1d5db;
    border: 1px solid #6b7280;
}

/* Date Box */
.ev-card__date-box {
    width: 70px;
    height: 75px;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(20, 16, 35, 0.95), rgba(10, 8, 20, 0.9));
    border: 1.5px solid rgba(217, 179, 106, 0.45);
    border-radius: 6px;
    box-shadow: 
        0 4px 10px rgba(0, 0, 0, 0.6),
        inset 0 0 8px rgba(217, 179, 106, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Cinzel', serif;
}

.ev-card__date-month {
    font-size: 10px;
    color: #aeb9c8;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1;
}

.ev-card__date-day {
    font-size: 20px;
    color: #d9b36a;
    font-weight: 700;
    line-height: 1.1;
    margin: 1px 0;
}

.ev-card__date-year {
    font-size: 9px;
    color: #8f9daf;
    letter-spacing: 0.05em;
    line-height: 1;
}

/* Details Section */
.ev-card__details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ev-card__title {
    margin: 0;
    color: #e6b45e;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-family: 'Cinzel', serif;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ev-card__desc {
    margin: 0;
    color: #aaa8a4;
    font-family: 'Rajdhani', sans-serif;
    font-size: .86rem;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ev-card__rewards-container {
    margin-top: 4px;
}

.ev-card__rewards-label {
    font-size: 8px;
    color: #8f9daf;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-bottom: 4px;
}

.ev-card__rewards {
    display: flex;
    gap: 12px;
    align-items: center;
}

.ev-card__reward-icon {
    width: 28px !important;
    height: 28px !important;
    object-fit: contain !important;
    mix-blend-mode: screen !important;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
    transition: transform 0.2s ease;
}

.ev-card__reward-icon:hover {
    transform: scale(1.15) !important;
}

/* Countdown Block */
.ev-card__timer-container {
    width: 142px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

@media (max-width: 768px) {
    .ev-card__timer-container {
        width: 100%;
        align-items: flex-start;
    }
}

.ev-card__timer-label {
    font-size: 8px;
    color: #8f9daf;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.ev-card__timer {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.45);
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid rgba(217, 179, 106, 0.12);
}

.ev-card__timer-digit-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 24px;
}

.ev-card__timer-num {
    font-family: ui-monospace, monospace;
    font-size: 14px;
    font-weight: bold;
    color: #facc15;
    text-shadow: 0 0 6px rgba(250, 204, 21, 0.4);
    line-height: 1;
}

.ev-card__timer-unit {
    font-size: 7px;
    color: #8f9daf;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 3px;
    letter-spacing: 0.02em;
    line-height: 1;
}

.ev-card__timer-sep {
    color: #facc15;
    font-weight: 700;
    font-size: 13px;
    transform: translateY(-4px);
    line-height: 1;
}

/* Button & Action Link */
.ev-card__action {
    width: 130px;
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .ev-card__action {
        width: 100%;
        justify-content: flex-start;
    }
}

.ev-button {
    width: 130px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #e8e0e0;
    background: url('/images/news/reference/button.webp') center / 100% 100% no-repeat;
    text-decoration: none;
    text-transform: uppercase;
    font-size: .62rem;
    font-weight: 600;
    line-height: 1;
    transition: filter .18s ease, transform .18s ease;
    cursor: pointer;
    border: none;
}

.ev-button:hover,
.ev-button:focus-visible {
    color: #fff;
    filter: brightness(1.22);
    transform: translateY(-1px);
    outline: none;
    text-decoration: none;
}

/* Sidebar Styling */
.ev-sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ev-sidebar-panel {
    min-width: 0;
    position: relative;
    padding: 28px 20px 20px;
    background: rgba(1, 8, 15, .94);
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}

.ev-sidebar-panel__frame {
    position: absolute;
    inset: 0;
    z-index: 0;
    border-style: solid;
    border-color: transparent;
    border-image-source: url('/images/news/v2/panel-frame.webp');
    border-image-slice: 90 fill;
    border-image-outset: 0;
    border-image-repeat: stretch;
    pointer-events: none;
    border-width: 20px;
    border-image-width: 20px;
}

.ev-sidebar-panel__content {
    position: relative;
    z-index: 1;
}

.ev-sidebar-panel__title {
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    color: #e6b45e;
    text-align: center;
    text-transform: uppercase;
    margin: 0 0 16px;
    padding-bottom: 12px;
    line-height: 1.2;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-size: auto;
}

.ev-sidebar-panel--calendar .ev-sidebar-panel__title {
    background-image: url('/images/sliced/sidebar_title_calendar.png');
}

.ev-sidebar-panel--categories .ev-sidebar-panel__title {
    background-image: url('/images/sliced/sidebar_title_categories.png');
}

.ev-sidebar-panel--participate .ev-sidebar-panel__title {
    background-image: url('/images/sliced/sidebar_title_participate.png');
}

/* Event Calendar */
.ev-calendar__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Cinzel', serif;
    color: #d9b66d;
    font-size: 11px;
    font-weight: 700;
    padding: 0 4px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.ev-calendar__nav {
    cursor: pointer;
    color: #8f9daf;
    font-size: 9px;
    transition: color 0.2s ease;
    background: none;
    border: none;
}

.ev-calendar__nav:hover {
    color: #e6b45e;
}

.ev-calendar__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}

.ev-calendar__day-label {
    font-size: 8px;
    color: #8f9daf;
    font-weight: 700;
    text-transform: uppercase;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(217, 179, 106, 0.15);
    margin-bottom: 2px;
}

.ev-calendar__day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #aeb9c8;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    font-family: ui-monospace, monospace;
}

.ev-calendar__day:hover {
    background-color: rgba(217, 179, 106, 0.1);
    color: #fff;
}

.ev-calendar__day--muted {
    color: #4b5563;
    cursor: default;
}

.ev-calendar__day--muted:hover {
    background: none;
    color: #4b5563;
}

.ev-calendar__day--active-blue {
    background-color: rgba(37, 99, 235, 0.25) !important;
    background-image: none !important;
    border: 1.5px solid #3b82f6 !important;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.6) !important;
    color: #fff !important;
    font-weight: bold !important;
    border-radius: 50% !important;
}

.ev-calendar__day--active-orange {
    background-color: rgba(217, 179, 106, 0.25) !important;
    background-image: none !important;
    border: 1.5px solid #d9b36a !important;
    box-shadow: 0 0 10px rgba(217, 179, 106, 0.5) !important;
    color: #fff !important;
    font-weight: bold !important;
    border-radius: 50% !important;
}

.ev-calendar__day--today {
    border: 1px solid #3b82f6;
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.4);
}

/* Event Categories */
.ev-categories {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ev-category {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #aeb9c8;
}

.ev-category:hover {
    background: rgba(217, 179, 106, 0.05);
    border-color: rgba(217, 179, 106, 0.25);
    color: #fff;
}

.ev-category.is-active {
    background: linear-gradient(90deg, rgba(30, 58, 138, 0.6), rgba(30, 58, 138, 0.2));
    border-color: #2563eb;
    color: #fff;
}

.ev-category__label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Cinzel', serif;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.ev-category__icon {
    width: 14px;
    height: 14px;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

.ev-category__count {
    font-size: 10px;
    font-family: ui-monospace, monospace;
    font-weight: 700;
    color: #8f9daf;
}

.ev-category.is-active .ev-category__count {
    color: #93c5fd;
}

/* How to Participate Steps */
.ev-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ev-step {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ev-step__icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
    flex-shrink: 0;
}

.ev-step__details {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.ev-step__title {
    font-family: 'Cinzel', serif;
    font-size: 9px;
    font-weight: 700;
    color: #e6b45e;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.ev-step__desc {
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    color: #8f9daf;
    font-weight: 500;
    margin: 0;
    line-height: 1.2;
}

/* Pagination Control */
.ev-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
}

.ev-pagination__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: url('/images/news/reference/pager.png') center / 100% 100% no-repeat;
    color: #d9b66d;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: filter 0.15s, transform 0.15s;
    border: none;
}

.ev-pagination__btn:hover {
    color: #fff;
    filter: brightness(1.22);
    transform: scale(1.05);
    text-decoration: none;
}

.ev-pagination__btn.is-active {
    color: #fff;
    filter: brightness(1.3);
    box-shadow: 0 0 10px rgba(217, 179, 106, 0.4);
    transform: scale(1.05);
}

.ev-pagination__btn.is-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}
