/* --- Event Page Stylesheet --- */
.event-layout-wrapper {
  width: 96%;
  max-width: 1650px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
}

/* Event Title Area */
.event-title-section {
  text-align: center;
  margin-bottom: 20px;
}

/* Widescreen 2x2 Grid */
.events-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  width: 100%;
  max-height: calc(100vh - 300px);
}

/* Event Card */
.event-item-card {
  background: rgba(10, 22, 14, 0.85);
  border: 1px solid rgba(221, 217, 176, 0.2);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(0, 0, 0, 0.8);
  display: flex;
  height: 200px;
  position: relative;
  transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.event-item-card::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(221, 217, 176, 0.05);
  pointer-events: none;
  border-radius: 4px;
  z-index: 2;
}

.event-item-card:hover {
  border-color: var(--gold);
  box-shadow: 0 12px 35px rgba(127, 255, 212, 0.12), inset 0 0 15px rgba(221, 217, 176, 0.05);
  transform: translateY(-2px);
}

/* Left Image Section */
.event-card-banner {
  width: 40%;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  transition: transform 0.6s ease;
}

.event-item-card:hover .event-card-banner {
  transform: scale(1.03);
}

.event-card-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent 60%, rgba(10, 22, 14, 0.95) 100%);
  z-index: 1;
}

/* Status Badge */
.event-status-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  font-family: "Cinzel", serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 4px 10px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.status-active {
  background: rgba(0, 255, 102, 0.15);
  border: 1px solid #00ff66;
  color: #00ff66;
  text-shadow: 0 0 6px rgba(0, 255, 102, 0.4);
}

.status-scheduled {
  background: rgba(221, 217, 176, 0.15);
  border: 1px solid var(--gold);
  color: var(--gold);
  text-shadow: 0 0 6px rgba(221, 217, 176, 0.4);
}

/* Right Details Section */
.event-card-details {
  flex: 1;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  z-index: 3;
  background: rgba(10, 22, 14, 0.4);
}

.event-details-top {
  display: flex;
  flex-direction: column;
}

.event-card-title {
  font-family: "Cinzel", serif;
  font-size: 16px;
  letter-spacing: 1.5px;
  color: var(--gold);
  margin: 0 0 4px;
  font-weight: 700;
  text-transform: uppercase;
}

.event-card-time {
  font-size: 11px;
  color: rgba(243, 241, 228, 0.6);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.event-card-desc {
  font-size: 12px;
  line-height: 1.45;
  color: rgba(243, 241, 228, 0.8);
  margin: 0;
}

/* Bottom Rewards Grid */
.event-rewards-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(221, 217, 176, 0.1);
  padding-top: 10px;
}

.rewards-label {
  font-family: "Cinzel", serif;
  font-size: 9.5px;
  letter-spacing: 1.5px;
  color: var(--gold);
  opacity: 0.8;
  text-transform: uppercase;
}

.rewards-list-icons {
  display: flex;
  gap: 6px;
}

.reward-icon-item {
  width: 24px;
  height: 24px;
  border-radius: 3px;
  border: 1px solid rgba(221, 217, 176, 0.2);
  background-size: cover;
  background-position: center;
  transition: all 0.3s ease;
  position: relative;
  cursor: pointer;
}

.reward-icon-item:hover {
  border-color: var(--gold);
  transform: scale(1.1);
}

/* Reward tooltip on hover */
.reward-icon-item::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(7, 14, 9, 0.95);
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 9px;
  font-family: "Cinzel", serif;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
}

.reward-icon-item:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Responsive Rules */
@media (max-width: 850px) {
  .events-grid {
    grid-template-columns: 1fr;
    max-height: none;
    overflow-y: auto;
  }
  .event-item-card {
    height: 180px;
  }
}

.event-section-wrapper {
  overflow-y: hidden !important;
}

/* --- Coverflow Layout --- */
.event-coverflow-wrapper {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 10px auto 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.event-coverflow-container {
  position: relative;
  width: 100%;
  height: 450px;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1200px;
  overflow: visible;
  cursor: grab;
  user-select: none;
}

.event-coverflow-container:active {
  cursor: grabbing;
}

/* Card override for coverflow layout */
.event-coverflow-container .event-item-card {
  position: absolute;
  width: 290px;
  height: 380px;
  flex-direction: column;
  background: rgba(8, 16, 11, 0.92);
  border: 1px solid rgba(221, 217, 176, 0.2);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(0, 0, 0, 0.9);
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.5s ease, z-index 0s, visibility 0.5s ease;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform-style: preserve-3d;
}

/* Banner override */
.event-coverflow-container .event-card-banner {
  width: 100%;
  height: 170px;
  flex-shrink: 0;
}

.event-coverflow-container .event-card-banner::after {
  background: linear-gradient(to bottom, transparent 40%, rgba(8, 16, 11, 0.95) 100%);
}

/* Details override */
.event-coverflow-container .event-card-details {
  flex: 1;
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(8, 16, 11, 0.4);
}

.event-coverflow-container .event-card-desc {
  font-size: 11px;
  line-height: 1.4;
  color: rgba(243, 241, 228, 0.7);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

/* 3D transforms for Cover Flow states */
.event-coverflow-container .event-item-card.active {
  transform: translate3d(0, 0, 150px) scale(1.08);
  opacity: 1;
  visibility: visible;
  z-index: 10;
  pointer-events: auto;
  border-color: var(--gold);
  box-shadow: 0 20px 45px rgba(127, 255, 212, 0.15), 0 0 15px rgba(221, 217, 176, 0.1);
}

.event-coverflow-container .event-item-card.prev-1 {
  transform: translate3d(-200px, 0, 0) rotateY(32deg) scale(0.9);
  opacity: 0.75;
  visibility: visible;
  z-index: 5;
  pointer-events: auto;
}

.event-coverflow-container .event-item-card.next-1 {
  transform: translate3d(200px, 0, 0) rotateY(-32deg) scale(0.9);
  opacity: 0.75;
  visibility: visible;
  z-index: 5;
  pointer-events: auto;
}

.event-coverflow-container .event-item-card.prev-2 {
  transform: translate3d(-330px, 0, -80px) rotateY(48deg) scale(0.78);
  opacity: 0.4;
  visibility: visible;
  z-index: 2;
  pointer-events: auto;
}

.event-coverflow-container .event-item-card.next-2 {
  transform: translate3d(330px, 0, -80px) rotateY(-48deg) scale(0.78);
  opacity: 0.4;
  visibility: visible;
  z-index: 2;
  pointer-events: auto;
}

/* Controls */
.coverflow-controls {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 15px;
  z-index: 15;
}

.coverflow-btn {
  background: rgba(10, 22, 14, 0.8);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.coverflow-btn:hover {
  background: var(--gold);
  color: #000;
  box-shadow: 0 0 10px var(--gold-glow);
  transform: scale(1.08);
}

.coverflow-dots {
  display: flex;
  gap: 8px;
}

.coverflow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(221, 217, 176, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.coverflow-dot.active {
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold-glow);
  transform: scale(1.2);
}

/* Karus theme overrides */
body.karus-theme .event-coverflow-container .event-item-card {
  background: rgba(12, 13, 15, 0.95);
  border-color: rgba(176, 190, 197, 0.2);
}

body.karus-theme .event-coverflow-container .event-item-card.active {
  border-color: #b0bec5 !important;
  box-shadow: 0 20px 45px rgba(176, 190, 197, 0.15), 0 0 15px rgba(176, 190, 197, 0.1) !important;
}

body.karus-theme .coverflow-btn {
  border-color: #b0bec5;
  color: #b0bec5;
}

body.karus-theme .coverflow-btn:hover {
  background: #b0bec5;
  color: #000;
  box-shadow: 0 0 10px rgba(176, 190, 197, 0.5);
}

body.karus-theme .coverflow-dot.active {
  background: #b0bec5;
  box-shadow: 0 0 8px rgba(176, 190, 197, 0.5);
}

/* --- Event Countdown Styling --- */
.event-countdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(221, 217, 176, 0.1);
  padding-top: 12px;
  width: 100%;
}

.countdown-label {
  font-family: "Cinzel", serif;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--gold);
  opacity: 0.8;
  font-weight: 600;
}

.countdown-timer-val {
  font-family: monospace;
  font-size: 14px;
  font-weight: 700;
  color: #7fffd4;
  text-shadow: 0 0 10px rgba(127, 255, 212, 0.5);
  letter-spacing: 1px;
}

/* Karus theme styling */
body.karus-theme .event-countdown-row {
  border-color: rgba(176, 190, 197, 0.15) !important;
}

body.karus-theme .countdown-label {
  color: #b0bec5 !important;
}

body.karus-theme .countdown-timer-val {
  color: #b0bec5 !important;
  text-shadow: 0 0 10px rgba(176, 190, 197, 0.45) !important;
}
