/* ===================================================================
   METRO JETHROS - EVENTS PAGE CSS
   Clean, organized styles for the new event card layout
   =================================================================== */

/* ─── CSS VARIABLES ─────────────────────────────────────────────── */
:root {
  --primary-color: #0a0a0a;
  --outlaw-gold: #d4af37;
  --outlaw-silver: #c0c0c0;
  --outlaw-dark: #1a1a1a;
  --text-primary: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.7);
  --glass-bg: rgba(20, 20, 20, 0.8);
  --glass-border: rgba(212, 175, 55, 0.2);
  --border-color: rgba(212, 175, 55, 0.1);

  /* Admin Variables */
  --admin-blue: #00d4ff;
  --admin-red: #ff6b6b;
  --pure-black: #000000;
  --dark-black: #1a1a1a;
  --card-black: #2a2a2a;
  --text-white: #ffffff;
  --text-gray: #cccccc;
  --text-muted: #888888;
}

/* ─── PAGE BACKGROUND & HERO ───────────────────────────────────── */
.events-page {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

.events-page::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 20% 50%,
      rgba(212, 175, 55, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(26, 26, 26, 0.6) 0%,
      transparent 50%
    );
  z-index: -1;
  pointer-events: none;
}

@keyframes backgroundPulse {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.1) rotate(180deg);
  }
}

.events-hero {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 6rem 2rem 4rem;
  background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1));
}

.events-hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}

/* ─── EVENTS CONTAINER ─────────────────────────────────────────── */
#events-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 3rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* ─── EVENT CARD LAYOUT (New Structure) ───────────────────────── */
.event-card {
  position: relative;
  width: 100%;
  max-width: 1000px;
  min-height: 200px;
  margin: 0 auto;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  cursor: pointer;
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Animated border on hover */
.event-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(
    45deg,
    var(--outlaw-gold),
    var(--outlaw-dark),
    #000,
    var(--outlaw-gold)
  );
  background-size: 400% 400%;
  border-radius: 12px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.6s ease;
  animation: gradientRotate 4s ease infinite;
}

@keyframes gradientRotate {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.event-card:hover::before {
  opacity: 0.8;
}

.event-card:hover {
  transform: translateY(-4px) scale(1.002);
  box-shadow: 0 12px 25px rgba(212, 175, 55, 0.15),
    0 16px 35px rgba(0, 0, 0, 0.2);
}

/* ─── CARD INNER LAYOUT ────────────────────────────────────────── */
.event-card-inner {
  display: grid;
  grid-template-columns: 200px 1fr;
  height: 100%;
  min-height: 200px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.005)
  );
  border-radius: 10px;
  overflow: hidden;
}

/* ─── DATE SECTION (Left 1/3) ──────────────────────────────────── */
.event-date-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: hsl(35, 65.1%, 55.1%);
  position: relative;
  text-align: center;
}

.date-large {
  font-family: "Bebas Neue", sans-serif;
  font-size: 4rem;
  font-weight: 900;
  line-height: 0.8;
  color: #000;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  margin-bottom: 0.2rem;
}

.date-month {
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(0, 0, 0, 0.8);
  margin-bottom: 0.1rem;
}

.date-year {
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.6);
}

.featured-indicator {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 12px;
  height: 12px;
  background: #000;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
}

/* ─── CONTENT SECTION (Right 2/3) ─────────────────────────────── */
.event-content-section {
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
}

/* ─── EVENT HEADER ─────────────────────────────────────────────── */
.event-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}

.event-title {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0;
  flex: 1;
}

.event-time {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--outlaw-gold);
  white-space: nowrap;
}

.time-icon {
  width: 14px;
  height: 14px;
}

/* ─── VENUE SECTION ────────────────────────────────────────────── */
.event-venue {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--outlaw-gold);
  position: relative;
}

.event-venue::before {
  content: "";
  position: absolute;
  left: -3px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(
    to bottom,
    var(--outlaw-gold),
    var(--outlaw-dark)
  );
}

.venue-icon {
  width: 16px;
  height: 16px;
  color: var(--outlaw-gold);
  margin-top: 2px;
  flex-shrink: 0;
}

.venue-details {
  flex: 1;
}

.venue-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.venue-location {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* ─── EVENT DESCRIPTION ────────────────────────────────────────── */
.event-description {
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.2rem;
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ─── EVENT ACTIONS ────────────────────────────────────────────── */
.event-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.action-btn i {
  width: 14px;
  height: 14px;
}

.ticket-btn {
  background: linear-gradient(135deg, var(--outlaw-gold), var(--outlaw-dark));
  color: #fff;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
  font-weight: 700;
}

.ticket-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(212, 175, 55, 0.4);
}

.directions-btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.directions-btn:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--outlaw-gold);
  transform: translateY(-2px);
}

/* ─── FEATURED EVENT STYLING ───────────────────────────────────── */
.featured-event {
  position: relative;
}

.featured-event::after {
  content: "FEATURED";
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: linear-gradient(135deg, var(--outlaw-silver), var(--outlaw-gold));
  color: #000;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  animation: featuredPulse 3s ease-in-out infinite;
}

@keyframes featuredPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.featured-event .event-date-section {
  background: linear-gradient(135deg, var(--outlaw-gold), var(--outlaw-dark));
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.featured-event::before {
  animation-duration: 3s;
}

/* ─── FILTER INPUT ─────────────────────────────────────────────── */
#event-filter {
  max-width: 400px;
  margin: 2rem auto;
  padding: 1rem 1.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 2px solid var(--glass-border);
  border-radius: 25px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
}

#event-filter:focus {
  outline: none;
  border-color: var(--outlaw-gold);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

#event-filter::placeholder {
  color: var(--text-muted);
}

/* ─── ERROR MESSAGE ────────────────────────────────────────────── */
.error-message {
  text-align: center;
  color: var(--outlaw-gold);
  font-size: 1.2rem;
  padding: 2rem;
  font-weight: 600;
}

/* ─── ANIMATIONS ───────────────────────────────────────────────── */
@keyframes fadeInEvent {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.event-card {
  opacity: 0;
  animation: fadeInEvent 0.6s ease forwards;
}

/* ==================================================
   PUBLIC EVENTS STATUS BADGES
   ================================================== */

/* Status badges for public event cards */
.event-status-badge,
.status-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 10;
}

/* Upcoming events - Green */
.event-status-badge.upcoming,
.status-badge.upcoming {
  background: rgba(39, 174, 96, 0.9);
  color: white;
  border-color: rgba(39, 174, 96, 0.3);
  box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

/* Today's events - Blue */
.event-status-badge.today,
.status-badge.today {
  background: rgba(52, 152, 219, 0.9);
  color: white;
  border-color: rgba(52, 152, 219, 0.3);
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

/* Past events - Gray */
.event-status-badge.past,
.status-badge.past {
  background: rgba(127, 140, 141, 0.9);
  color: white;
  border-color: rgba(127, 140, 141, 0.3);
  box-shadow: 0 2px 8px rgba(127, 140, 141, 0.3);
}

/* Cancelled events - Red */
.event-status-badge.cancelled,
.status-badge.cancelled {
  background: rgba(231, 76, 60, 0.9);
  color: white;
  border-color: rgba(231, 76, 60, 0.3);
  box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

/* Featured events get a special gold badge */
.event-status-badge.featured,
.status-badge.featured {
  background: rgba(212, 175, 55, 0.9);
  color: #1a1a1a;
  border-color: rgba(212, 175, 55, 0.3);
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

/* Ensure badges appear above other content */
.event-card {
  position: relative;
}

/* Animation for badges */
.event-status-badge,
.status-badge {
  animation: badgeFadeIn 0.3s ease-out;
}

@keyframes badgeFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================================================
   ADMIN EVENTS STYLING - OVERRIDE FOR ADMIN PAGES
   ================================================== */

/* KILL ALL ANIMATIONS, TRANSITIONS, AND EFFECTS FOR ADMIN */
body.admin-event-page * {
  transition: none !important;
  animation: none !important;
  transform: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  background-image: none !important;
}

/* Body Override for Admin Events */
body.admin-event-page {
  background: var(--pure-black) !important;
  color: var(--text-white) !important;
  font-family: "JetBrains Mono", "Courier New", monospace !important;
  margin: 0;
  padding: 0;
}

/* Admin Event Cards */
body.admin-event-page .event-card {
  background: var(--card-black) !important;
  border: 1px solid var(--admin-blue) !important;
  border-radius: 8px;
  overflow: hidden;
}

body.admin-event-page .event-card-inner {
  display: grid;
  grid-template-columns: 180px 1fr;
  min-height: 180px;
  background: var(--card-black) !important;
}

/* Admin Date Section */
body.admin-event-page .event-date-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  background: var(--dark-black) !important;
  color: var(--admin-blue) !important;
  text-align: center;
  border-right: 1px solid var(--admin-blue) !important;
}

body.admin-event-page .date-large {
  font-size: 3rem;
  font-weight: bold;
  color: var(--admin-blue) !important;
}

body.admin-event-page .date-month {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-white) !important;
}

body.admin-event-page .date-year {
  font-size: 0.9rem;
  color: var(--text-gray) !important;
}

/* Admin Content Section */
body.admin-event-page .event-content-section {
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--card-black) !important;
}

body.admin-event-page .event-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-white) !important;
}

body.admin-event-page .event-time {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--admin-blue) !important;
}

body.admin-event-page .event-venue {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.8rem;
  background: var(--dark-black) !important;
  border: 1px solid var(--admin-blue) !important;
  border-radius: 4px;
}

body.admin-event-page .venue-name {
  font-weight: 600;
  color: var(--text-white) !important;
}

body.admin-event-page .venue-location {
  font-size: 0.9rem;
  color: var(--text-gray) !important;
}

/* Admin Action Buttons */
body.admin-event-page .event-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

body.admin-event-page .event-actions .action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
  border: 1px solid;
}

body.admin-event-page .event-actions .edit {
  background: var(--dark-black) !important;
  color: var(--admin-blue) !important;
  border-color: var(--admin-blue) !important;
}

body.admin-event-page .event-actions .delete {
  background: var(--dark-black) !important;
  color: var(--admin-red) !important;
  border-color: var(--admin-red) !important;
}

/* ─── RESPONSIVE DESIGN - UNIVERSAL SELECTORS ─────────────────────────────── */
@media (max-width: 768px) {
  /* Target ALL event containers */
  #events-container,
  .events-container,
  div[id="events-container"] {
    padding: 2rem 1rem !important;
    gap: 1.5rem !important;
  }

  /* Target ALL event cards regardless of parent class */
  .event-card,
  article.event-card,
  div.event-card {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto !important;
  }

  /* KILL GRID COMPLETELY - Use Flexbox Instead */
  .event-card-inner,
  .event-card .event-card-inner,
  article.event-card .event-card-inner {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    min-height: auto !important;
  }

  /* Date section - FORCE TO TOP */
  .event-date-section,
  .event-card .event-date-section {
    width: 100% !important;
    order: -1 !important;
    padding: 1rem 1.5rem !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 1rem !important;
    text-align: left !important;
    flex: none !important;
  }

  /* Content section - FORCE TO BOTTOM */
  .event-content-section,
  .event-card .event-content-section {
    width: 100% !important;
    order: 1 !important;
    padding: 1rem 1.5rem !important;
    flex: 1 !important;
  }

  /* Date typography */
  .date-large {
    font-size: 2.5rem !important;
    margin-bottom: 0 !important;
  }

  .date-month {
    font-size: 0.9rem !important;
    margin-bottom: 0 !important;
  }

  .date-year {
    font-size: 0.8rem !important;
  }

  /* Content adjustments */
  .event-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
    margin-bottom: 0.8rem !important;
  }

  .event-title {
    font-size: 1.2rem !important;
  }

  .event-time {
    align-self: flex-start !important;
  }

  /* Venue section */
  .event-venue {
    display: flex !important;
    align-items: flex-start !important;
    gap: 0.6rem !important;
    margin-bottom: 1rem !important;
  }

  /* Description */
  .event-description {
    margin-bottom: 1rem !important;
    font-size: 0.85rem !important;
  }

  /* Action buttons */
  .event-actions {
    gap: 0.5rem !important;
    flex-wrap: wrap !important;
  }

  .action-btn {
    font-size: 0.75rem !important;
    padding: 0.5rem 0.8rem !important;
  }

  /* Status badges mobile */
  .event-status-badge,
  .status-badge {
    top: 0.5rem !important;
    right: 0.5rem !important;
    font-size: 0.7rem !important;
    padding: 0.2rem 0.5rem !important;
  }

  /* Featured badge mobile */
  .featured-event::after {
    top: 0.5rem !important;
    left: 0.5rem !important;
    font-size: 0.6rem !important;
    padding: 0.2rem 0.6rem !important;
  }

  /* ADMIN OVERRIDES - Keep admin functionality */
  body.admin-event-page .event-card-inner {
    display: flex !important;
    flex-direction: column !important;
  }

  body.admin-event-page .event-date-section {
    order: -1 !important;
    flex-direction: row !important;
    border-right: none !important;
    border-bottom: 1px solid var(--admin-blue) !important;
  }

  body.admin-event-page .event-content-section {
    order: 1 !important;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .event-card-inner {
    display: flex !important;
    flex-direction: column !important;
  }

  .event-date-section {
    order: -1 !important;
    padding: 0.8rem 1rem !important;
    gap: 0.8rem !important;
  }

  .event-content-section {
    order: 1 !important;
    padding: 1rem !important;
  }

  .date-large {
    font-size: 2rem !important;
  }

  .date-month {
    font-size: 0.8rem !important;
  }

  .date-year {
    font-size: 0.75rem !important;
  }

  .event-actions {
    gap: 0.5rem !important;
  }

  .action-btn {
    font-size: 0.7rem !important;
    padding: 0.4rem 0.6rem !important;
  }
}
