/* Events page specific styles */
:root {
  --mh-blue: #173f7a;
  --mh-navy: #0a2b57;
  --mh-teal: #1bb1a5;
  --mh-orange: #f59d27;
  --mh-gray-100: #f5f7fa;
  --mh-gray-200: #e8edf3;
  --mh-gray-300: #d7dee7;
  --mh-text: #1f2a3a;
}

/* Banner */
.events-hero {
  position: relative;
  background: url('../../banner.jpg') center/cover no-repeat;
  color: #fff;
}
.events-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10,43,87,.85) 0%, rgba(10,43,87,.4) 60%, rgba(10,43,87,0) 100%);
}
.events-hero .container {
  position: relative;
  z-index: 1;
  /*padding: 72px 200px;*/
  /*height: 300px;*/
}
.events-hero h1 {
  font-weight: 700;
  font-size: clamp(28px, 3.5vw, 52px);
  margin: 0 0 8px;
}
.events-hero p {
  /*max-width: 720px;*/
  font-size: clamp(14px, 1.6vw, 27px);
  margin: 0;
  max-width: 510px;
}

/* Upcoming Events header + filters */
.events-wrap {
  background: #f5f7fa;
  padding-bottom: 50px;
}
.events-wrap .container {
  max-width: 1480px;
  padding-left: 32px;
  padding-right: 32px;
}
.events-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 12px;
}
.events-head h2 {
  font-weight: 700;
  color: var(--mh-navy);
  margin: 0;
}
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.filters .field {
  position: relative;
}
.filters input[type="text"],
.filters select {
  height: 40px;
  border-radius: 6px;
  border: 1px solid var(--mh-gray-300);
  background: #fff;
  padding: 0 12px;
  color: var(--mh-text);
}
.filters button {
  height: 40px;
  padding: 0 14px;
  background: var(--mh-navy);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}
.filters button:hover { background: var(--mh-blue); }

/* Events grid */
.events-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 24px;
  padding: 20px 0 12px;
}
.event-card {
  display: grid;
  /*grid-template-columns: 220px 1fr;*/
  grid-template-columns: 170px 1fr;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 0 rgba(0,0,0,0.05), 0 8px 24px rgba(10,43,87,0.08);
  overflow: hidden;
}

.event-body{
  padding: 22px 24px;
}

.event-date.badge.orange .dow {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #F78D29 !important;
}

.event-date.badge.orange .mon {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #F78D29 !important;
}

















.badge {
  align-self: stretch;
  display: grid;
  place-items: center;
  border-radius: 18px 0 0 18px;
  /*background: #eaf3ff;*/
}

.badge.teal { background: #e5f6f4; }
.badge.purple { background: #efe6fb; }
.badge.orange { background: #fff1dd; }

.badge .dow {
  text-transform: uppercase;
  font-size: 18px;
  font-weight: 600;
  color: var(--mh-blue);
  text-align: center;
}

.badge .day {
  font-size: 50px;
  /* line-height: 1.1; */
  font-weight: 800;
  color: var(--mh-navy);
  text-align: center;
}
.badge.teal .day { color: #15a596; }
.badge.purple .day { color: #6f3fb6; }
.badge.orange .day { color: #F78D29 }
.badge .mon {
  text-transform: uppercase;
  font-size: 18px;
  font-weight: 700;
  color: var(--mh-blue);
  text-align: center;
  line-height: 20px;
}

.event-body h3 {
  margin: 2px 0 6px;
  font-size: 20px;
  font-weight: 800;
  color: var(--mh-navy);
}
.event-body .meta {
  margin: 0 0 12px;
  color: var(--mh-text);
  font-size: 15px;
  line-height: 1.4;
}
.event-body .btn {
  display: inline-block;
  background: var(--mh-blue);
  color: #fff;
  border-radius: 10px;
  padding: 4px 14px;
  font-weight: 700;
  text-decoration: none;
}
.event-body .btn:hover { background: var(--mh-navy); }

.events-more-wrap { text-align: center; padding: 18px 0 34px; }
.events-more { color: var(--mh-navy); font-weight: 700; text-decoration: underline; }
.events-more:hover { text-decoration: underline; }

/* CTA band spacing on this page */
.cta-band { margin-top: 0; }

/* Lazy-reveal animation */
.reveal { opacity: 1; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 1100px) {
  .event-card { grid-template-columns: 200px 1fr; }
}
@media (max-width: 900px) {
  .events-grid { grid-template-columns: 1fr; }
  .event-card { 
      /*grid-template-columns: 180px 1fr; */
      grid-template-columns: 1fr;
    padding: 0;
      
  }
}
@media (max-width: 640px) {
  .events-head { flex-direction: column; align-items: flex-start; }
  .filters {
      width: 100%;
        flex-direction: column;
  }
  
  #filter-submit {
  padding: 8px 0;
}

  .filters .field, .filters button { flex: 1; }
  .event-card { grid-template-columns: 1fr; }
  .event-body { border-left: none; border-top: 1px solid var(--mh-gray-200); }
  .badge { 
      grid-row: 1;
      /*height: 120px;*/
      border-radius: 18px 18px 0 0; 
  }
  /* Banner improvements on small screens */
  .events-hero .container { padding: 36px 20px: }
  .events-hero p { font-size: 14px; max-width: 95%; }
  /* Tighter cards and typography */
  .event-body { padding: 16px 18px; }
  .badge .day { font-size: 48px; }
  .badge .mon { font-size: 18px; }
  .event-body h3 { font-size: 18px; }
  .event-body .meta { font-size: 14px; }
  .event-body .btn { padding: 6px 12px; border-radius: 8px; }
}


/* Popup */
.rsvp-popup {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* Centered box */
.rsvp-popup__content {
  background: #fff;
  padding: 30px;
  max-width: 440px;
  width: 100%;
  border-radius: 10px;
  position: relative;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  transform-origin: center;
  animation: popup-appear .18s ease;
}

@keyframes popup-appear {
  from { opacity: 0; transform: scale(.98); }
  to   { opacity: 1; transform: scale(1); }
}

.rsvp-popup__close {
  position: absolute;
  top: 10px; right: 15px;
  font-size: 24px;
  cursor: pointer;
}

.event-title-display {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #333;
  text-align: center;
}


/* Category chips styling using TEC category color variables */
.tec-events-calendar-list__event-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tec-events-calendar-list__category {
  /* consume the category variables set on .tribe_events_cat-{slug} */
  background: var(--tec-color-category-secondary, #eef2ff);
  color: var(--tec-color-category-text, #0f172a);
  border-left: 4px solid var(--tec-color-category-primary, #3b82f6);
  padding: 6px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}

.tec-events-calendar-list__category a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.tec-events-calendar-list__category-icon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--tec-color-category-primary, currentColor);
  display: inline-block;
}


/* Badge consumes TEC category color variables applied by .tribe_events_cat-{slug} */
/*.event-card .badge {*/
/*  background: var(--tec-color-category-secondary, #eef2ff);*/
/*  color: var(--tec-color-category-text, #0f172a);*/
/*  border-left: 6px solid var(--tec-color-category-primary, #3b82f6);*/
/*  border-radius: 10px;*/
/*  padding: 10px 12px;*/
/*  display: inline-flex;*/
/*  align-items: center;*/
/*  min-width: 94px;*/
/*}*/

.event-card .badge .dow {
  font-size: 12px;
  text-transform: uppercase;
  opacity: .85;
}

.event-card .badge .day {
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
}

.event-card .badge .mon {
  font-size: 12px;
  text-transform: uppercase;
  opacity: .85;
}