/* Define all variables at the top */
:root {
  --primary-blue: #2C4A6B;
  --accent-gold: #C09853;
  --soft-green: #8B9D7A;
  --cream: #F4F1E8;
  --white: #ffffff;
  --text-dark: #333333;
  --text-medium: #666666;
  --text-light: #999999;
  --border-light: rgba(168, 181, 195, 0.15);
  --shadow-light: 0 12px 40px rgba(44, 74, 107, 0.08);
  --shadow-medium: 0 20px 60px rgba(44, 74, 107, 0.12);
  --webinar-blue: #5B8DB8;
  --retreat-gold: #8B6914;
  --workshop-green: #5D7052;}

/* Base reset and styles */
* {
  box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* WordPress theme override for plugin container */
#leadership-events-container {
  margin: 0 !important;
  padding: 0 !important;
}

#leadership-events-container * {
  box-sizing: border-box;
}

.page-events {
  font-family: 'Inter', sans-serif;
  line-height: 1.7;
  background: linear-gradient(135deg, var(--cream) 0%, #f0ede4 100%);
  color: var(--primary-blue);
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

#leadership-events-container {
  margin: 0;
  padding: 0;
}

/* Events Hero Section */
.hero {
  background: linear-gradient(135deg, 
              var(--primary-blue) 0%, 
              rgba(44, 74, 107, 0.95) 70%,
              rgba(139, 157, 122, 0.9) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 15% 25%, rgba(192, 152, 83, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 85% 75%, rgba(192, 152, 83, 0.06) 0%, transparent 60%);
  z-index: 1;
}

.hero-content {
  max-width: 1200px;
}

.hero-badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(192, 152, 83, 0.9) 0%, rgba(212, 168, 102, 0.85) 100%);
  color: var(--primary-blue);
  padding: 0.6rem 1.5rem;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 0 4px 12px rgba(192, 152, 83, 0.2);
  transition: all 0.3s ease;
}

.hero-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(192, 152, 83, 0.3);
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 700;
  color: var(--cream);
  opacity: 0;
  animation: fadeInUp 1s ease-out forwards;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: rgba(244, 241, 232, 0.8);
  word-spacing: .2em;
  letter-spacing: 1px;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.3s forwards;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(244, 241, 232, 0.9);
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.3s forwards;
  line-height: 1.7em;
  margin: 0 auto;
  max-width: 900px;
 
  text-align: center;
}

.view-controls {
  background: var(--cream);
  padding: 2rem 1rem 4rem;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 0rem;
}

.view-toggle {
  display: inline-flex;
  background: var(--white);
  border-radius: 40px;
  padding: 0.5rem;
  box-shadow: 0 8px 30px rgba(44, 74, 107, 0.08);
  margin-bottom: 1rem;
  border: 1px solid rgba(192, 152, 83, 0.1);
}

.view-btn {
  padding: 0.8rem 2rem;
  border: none;
  background: transparent;
  color: var(--text-medium);
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.view-btn.active {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #d4a866 100%);
  color: var(--primary-blue);
  box-shadow: 0 4px 15px rgba(192, 152, 83, 0.25);
  transform: translateY(-1px);
}

.event-filters {
  text-align: center;
  margin-top: 1rem;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.filter-btn {
  padding: 0.7rem 1.5rem;
  border: 2px solid rgba(192, 152, 83, 0.3);
  background: transparent;
  color: var(--accent-gold);
  border-radius: 35px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(192, 152, 83, 0.1);
}

.filter-btn:hover,
.filter-btn.active {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #d4a866 100%);
  color: var(--cream);
  border-color: var(--accent-gold);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(192, 152, 83, 0.25);
}

/* Main Container */
.main-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

/* LIST VIEW STYLES */
.list-view {
  display: block;
}

.list-view.hidden {
  display: none;
}

/* Featured Event */
.featured-event {
  background: linear-gradient(135deg, var(--primary-blue), rgba(139, 157, 122, 0.9));
  color: var(--cream);
  border-radius: 15px;
  padding: 3rem;
  margin: 0rem 0;
  position: relative;
  overflow: hidden;
}

.featured-event::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(192, 152, 83, 0.1) 0%, transparent 70%);
  z-index: 1;
}

.featured-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

/* Test 1 */
.featured-description {
  color: rgba(244, 241, 232, 0.9); /* You need this for cream color */
  margin-bottom: 1.5rem;
  line-height: 1.6;
  text-align: left;
  max-width: 100%;
}

.featured-badge {
  display: inline-block;
  background: var(--accent-gold);
  color: var(--primary-blue);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1;
  height: fit-content;
}

.featured-details {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}

.featured-detail {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--cream);
  font-size: 1.1rem;
  font-weight: 500;
}

.event-icon {
  width: 18px;
  height: 18px;
  color: var(--accent-gold);
}

/* Events Grid */
.events-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
  margin: 2rem 0;
}


/* Regular Event Cards - Enhanced from improved modal */
.event-card {
  background: var(--white);
  border-radius: 20px;
  padding: 2rem 2rem 1.5rem;
  box-shadow: 0 12px 40px rgba(44, 74, 107, 0.08);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 380px;
  cursor: pointer;
  max-width: 400px;
  width: 100%;
  border: 1px solid rgba(192, 152, 83, 0.08);
}


.event-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(44, 74, 107, 0.15),
              0 0 20px rgba(192, 152, 83, 0.2),
              0 0 40px rgba(192, 152, 83, 0.1);
  border-color: rgba(192, 152, 83, 0.3);
}


/* Badge row wrapper for regular cards */
.event-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
  width: calc(100% - 85px);
}

/* Event type badge on regular cards */
.event-category {
  background: linear-gradient(135deg, rgba(192, 152, 83, 0.12) 0%, rgba(192, 152, 83, 0.08) 100%);
  color: var(--accent-gold);
  padding: 0.8rem 1rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  white-space: nowrap;
  height: fit-content;
  width: fit-content;
  margin-bottom: 0;
}

/* ================================
   COHORT BADGE STYLES
   ================================ */

/* Wrapper for featured event badges (inline layout) */
.featured-badges-row {
  display: flex;
  gap: .5rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  height: fit-content;
}

/* Cohort badge on regular cards */
.event-cohort {
  display: inline-flex;
  width: fit-content;
  font-size: 0.65rem;
  color: #2C4A6B;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.8rem 0.85rem;
  border: none;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(44, 74, 107, 0.08) 0%, rgba(44, 74, 107, 0.06) 100%);
  margin: 0;
  white-space: normal;
  transition: all 0.3s ease;
  line-height: 1;
  height: fit-content;
}

.event-cohort:hover {
  background: linear-gradient(135deg, rgba(44, 74, 107, 0.12) 0%, rgba(44, 74, 107, 0.08) 100%);
  box-shadow: 0 2px 4px rgba(44, 74, 107, 0.1);
}

/* Cohort badge on featured event card */
.event-cohort-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 0.9rem;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  white-space: nowrap;
  line-height: 1;
  height: fit-content;
}

.event-cohort-badge:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Cohort badge in modal */
.modal-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
}

.modal-badges .event-cohort-badge {
  background: white;
  border: 1.5px solid rgba(44, 74, 107, 0.3);
  color: #2C4A6B;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 0.9rem;
  border-radius: 15px;
  backdrop-filter: none;
  transition: all 0.3s ease;
  white-space: nowrap;
  line-height: 1;
}

.modal-badges .event-cohort-badge:hover {
  border-color: rgba(44, 74, 107, 0.5);
  box-shadow: 0 2px 4px rgba(44, 74, 107, 0.1);
}

.modal-badges .event-type-badge {
    background: linear-gradient(135deg, rgba(192, 152, 83, 0.12) 0%, rgba(192, 152, 83, 0.08) 100%);
    border: 1.5px solid rgba(192, 152, 83, 0.3);
    color: var(--accent-gold);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 0.9rem;
    border-radius: 15px;
    transition: all 0.3s ease;
    white-space: nowrap;
    line-height: 1;
}

.modal-badges .event-type-badge:hover {
    border-color: rgba(192, 152, 83, 0.5);
    box-shadow: 0 2px 4px rgba(192, 152, 83, 0.1);
}

.modal-schedule {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: #666;
    font-size: 0.95rem;
}

.modal-schedule svg {
    width: 1.2em;
    height: 1.2em;
    margin-right: 0.5em;
    color: var(--accent-gold);
    flex-shrink: 0;
}

.event-date-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--primary-blue);
  color: var(--cream);
  padding: 0.8rem;
  border-radius: 10px;
  text-align: center;
  min-width: 70px;
  z-index: 10;
}

.registration-closed-badge {
  display: inline-block;
  padding: 1rem 3rem;
  background: var(--accent-gold);
  color: var(--cream);
  border-radius: 4px;
  text-align: center;
  font-weight: 600;
  font-size: 1.1rem;
  min-width: 200px;
  transition: all 0.3s ease;
  cursor: default;
}

.registration-closed-badge:hover {
  background: #a8843f;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(192, 152, 83, 0.3);
}

.event-day {
  font-size: 1.5rem;
  font-weight: 700;
  display: block;
}

.event-month {
  font-size: 0.8rem;
  text-transform: uppercase;
}

.event-title,
h3.event-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-top: .5rem;
    margin-bottom: .8rem;
    padding-right: 100px;
    line-height: 1.3;
}

.featured-event .event-title {
    color: var(--cream);
    font-size: 2.2rem;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    padding-right: 0;
}


.event-description {
  color: rgba(44, 74, 107, 0.8);
  margin-top: 0;
  margin-bottom: 1.5rem;
  line-height: 1.6;
  text-align: left;
  max-width: 100%;
}

/* version 1 */
.learn-more-link {
  color: var(--accent-gold);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  display: inline;
  transition: all 0.3s ease;
}

.learn-more-link:hover {
  color: var(--primary-blue);
  text-decoration: underline;
}

.event-details {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 0;
}

.event-detail {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--accent-gold);
  font-size: 1rem;
  font-weight: 600;
}

.event-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 1.5rem;
}

.event-cta {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: var(--accent-gold);
  color: var(--cream);
  text-decoration: none;
  border-radius: 25px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.event-cta:hover {
  background: var(--primary-blue);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(44, 74, 107, 0.3);
}

.event-cta.secondary {
  background: var(--cream);
  color: var(--primary-blue);
  border: 2px solid var(--primary-blue);
  font-weight: 600;
}

.event-cta.secondary:hover {
  background: var(--primary-blue);
  color: var(--cream);
  border-color: var(--primary-blue);
}

.calendar-view {
  display: none;
  margin-top: 3rem;
}

.calendar-view.active {
  display: block;
}

.calendar-container {
  background: var(--white);
  border-radius: 15px;
  box-shadow: var(--shadow-medium);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.calendar-header {
  background: linear-gradient(135deg, var(--primary-blue) 0%, #3a5a7a 100%);
  color: var(--cream);
  padding: 2rem;
  text-align: center;
  position: relative;
}

.month-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
  gap: 2rem;
}

.nav-btn {
  flex: 0 0 50px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: var(--cream);
  font-size: 1.5rem;
  font-weight: 500;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.current-month {
  flex: 1 1 auto;
  text-align: center;
  min-width: 0;
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0 1rem;
  min-width: 300px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.day-header {
  background: linear-gradient(170deg, var(--soft-green) 22%, #a2b08c 100%);
  color: var(--cream);
  padding: 1.2rem 0;
  text-align: center;
  font-weight: 600;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.calendar-day {
  min-height: 150px;
  max-height: 150px;
  border: 1px solid var(--border-light);
  padding: 0.8rem;
  position: relative;
  background: var(--white);
  transition: background-color 0.2s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* ADD THIS */
  min-width: 0; /* ADD THIS - critical for flex/grid children */
}

.calendar-day:hover {
  background-color: rgba(244, 241, 232, 0.3);
}

.calendar-events-container {
  max-height: 110px; /* Adjust this value to show ~2-3 events */
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px; /* Prevent content from touching scrollbar */
  margin-top: 0.3rem;
  min-width: 0;
  width: 100%;
}


.calendar-events-container::-webkit-scrollbar {
  width: 4px;
}

.calendar-events-container::-webkit-scrollbar-track {
  background: rgba(192, 152, 83, 0.1);
  border-radius: 2px;
}

.calendar-events-container::-webkit-scrollbar-thumb {
  background: var(--accent-gold);
  border-radius: 2px;
}

.calendar-events-container::-webkit-scrollbar-thumb:hover {
  background: var(--primary-blue);
}


.calendar-day {
  min-height: 150px;
  max-height: 150px; /* Lock the height */
  border: 1px solid var(--border-light);
  padding: 0.8rem;
  position: relative;
  background: var(--white);
  transition: background-color 0.2s ease;
  display: flex;
  flex-direction: column;
}

.calendar-day.other-month {
  background: rgba(244, 241, 232, 0.3);
  color: var(--text-light);
}

.calendar-day.today {
  background: linear-gradient(135deg, rgba(192, 152, 83, 0.1) 0%, rgba(139, 157, 122, 0.05) 100%);
  border: 2px solid var(--accent-gold);
  box-shadow: inset 0 0 0 1px rgba(192, 152, 83, 0.2);
}

.day-number {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
}

.calendar-day.other-month .day-number {
  color: var(--text-light);
}

.calendar-day.today .day-number {
  color: var(--accent-gold);
  font-weight: 700;
}

.event-item {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #d4a866 100%);
  color: var(--primary-blue);
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: block;
  line-height: 1.3;
  box-shadow: 0 2px 8px rgba(192, 152, 83, 0.2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  min-width: 0;
}

.event-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(192, 152, 83, 0.3);
}

.event-item.mastermind {
  background: linear-gradient(135deg, var(--soft-green) 0%, #a2b08c 100%);
  color: var(--cream);
  box-shadow: 0 2px 8px rgba(139, 157, 122, 0.2);
}

.event-item.mastermind:hover {
  box-shadow: 0 4px 15px rgba(139, 157, 122, 0.3);
}

.event-item.webinar {
  background: linear-gradient(135deg, var(--webinar-blue) 0%, #4a7ba0 100%);
  color: var(--cream);
  box-shadow: 0 2px 8px rgba(91, 141, 184, 0.2);
}

.event-item.webinar:hover {
  box-shadow: 0 4px 15px rgba(91, 141, 184, 0.3);
}

.event-item.masterclass {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #d4a866 100%);
  color: var(--primary-blue);
  box-shadow: 0 2px 8px rgba(192, 152, 83, 0.2);
}

.event-item.masterclass:hover {
  box-shadow: 0 4px 15px rgba(192, 152, 83, 0.3);
}

.event-item.course {
  background: linear-gradient(135deg, var(--primary-blue) 0%, #3a5a7a 100%);
  color: var(--cream);
  box-shadow: 0 2px 8px rgba(44, 74, 107, 0.2);
}

.event-item.course:hover {
  box-shadow: 0 4px 15px rgba(44, 74, 107, 0.3);
}

.event-item.retreat {
  background: linear-gradient(135deg, var(--retreat-gold) 0%, #a07e2a 100%);
  color: var(--cream);
  box-shadow: 0 2px 8px rgba(139, 105, 20, 0.2);
}

.event-item.retreat:hover {
  box-shadow: 0 4px 15px rgba(139, 105, 20, 0.3);
}

.event-item.workshop {
  background: linear-gradient(135deg, var(--workshop-green) 0%, #4d5e44 100%);
  color: var(--cream);
  box-shadow: 0 2px 8px rgba(93, 112, 82, 0.2);
}

.event-item.workshop:hover {
  box-shadow: 0 4px 15px rgba(93, 112, 82, 0.3);
}

.event-time {
  font-size: 0.75rem;
  opacity: 0.9;
  display: block;
  margin-top: 0.2rem;
}

/* Legend Styles */
.legend {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--white);
  border-radius: 15px;
  box-shadow: var(--shadow-light);
}

.legend-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-blue);
  margin-bottom: 1rem;
  text-align: center;
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-medium);
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend-masterclass {
  background-color: var(--accent-gold);
}

.legend-course {
  background-color: var(--primary-blue);
}

.legend-mastermind {
  background-color: var(--soft-green);
}

.legend-webinar {
  background-color: var(--webinar-blue);
}

.legend-retreat {
  background-color: var(--retreat-gold);
}

.legend-workshop {
  background-color: var(--workshop-green);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.event-modal {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    background: var(--cream); /* Changed from white to cream for softer look */
    border-radius: 20px;
    max-width: 800px; /* Increased from 550px */
    width: 90%;
    max-height: 90vh; /* Ensures modal fits in viewport */
    margin: 40px auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: scale(0.7);
    opacity: 0;
    transition: all 0.3s ease;
}

.modal-overlay.active .event-modal {
    transform: scale(1);
    opacity: 1;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    background: transparent;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    z-index: 15;
}

.modal-content {
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
    padding: 30px;
    padding-bottom: 80px; /* Increased padding to prevent content overlap */
    background: var(--cream);
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(192, 152, 83, 0.1);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--accent-gold);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue); /* Dark blue on hover */
}

.modal-scroll-cue {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 40px;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(244, 241, 232, 0) 0%,
        rgba(244, 241, 232, 0.85) 40%,
        var(--cream) 100%
    );
    z-index: 5; /* Lower z-index */
    transition: opacity 0.3s;
    opacity: 1;
}

.modal-cta-section {
    position: relative;
    padding: 24px 32px;
    background: var(--white);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* Modal Content Styling */
.event-type-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(192, 152, 83, 0.1);
    color: var(--accent-gold);
    line-height: 1;
}

.badge-workshop {
    background: rgba(93, 112, 82, 0.15);
    color: var(--workshop-green);
}

.badge-masterclass {
    background: rgba(192, 152, 83, 0.15);
    color: var(--accent-gold);
}

.badge-consultation {
    background: rgba(44, 74, 107, 0.15);
    color: var(--primary-blue);
}

.badge-webinar {
    background: rgba(91, 141, 184, 0.15);
    color: var(--webinar-blue);
}

.badge-course {
    background: rgba(44, 74, 107, 0.15);
    color: var(--primary-blue);
}

.badge-mastermind {
    background: rgba(139, 157, 122, 0.15);
    color: var(--soft-green);
}

.badge-retreat {
    background: rgba(139, 105, 20, 0.15);
    color: var(--retreat-gold);
}

.event-item.featured {
  background: linear-gradient(135deg, var(--primary-blue), rgba(139, 157, 122, 0.9));
  color: var(--cream);
  position: relative;
  overflow: hidden;
}

.event-item.featured::before {
  content: '★ ';
  color: var(--accent-gold);
  font-weight: bold;
  margin-right: 5px;
}

.event-item.featured::after {
  content: none; /* Explicitly remove the content of ::after */
}

.modal-title {
    font-size: 24px;
    margin: 0 0 15px;
    padding-right: 40px; /* Space for close button */
}

.modal-datetime {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    color: #666;
}

.modal-icon {
    font-size: 1.3em;
    margin-right: 0.7em;
    display: inline-block;
    min-width: 1.3em;
}

.modal-pricing {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    color: var(--text-dark);
    font-size: 1rem;
}

.modal-pricing > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
    line-height: 1.4;
}

.modal-pricing > div > div:first-child {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-blue);
}

.modal-pricing span[style*="line-through"] {
    color: #999 !important;
    text-decoration: line-through !important;
    margin-right: 10px;
    font-weight: 400;
}

.modal-pricing > div > div:last-child {
    font-size: 0.9em;
    color: var(--text-medium);
    font-style: italic;
}

.modal-content-sections {
    margin-top: 30px;
}

.modal-section {
    position: relative;
    z-index: 10; /* Higher z-index than scroll cue */
    margin-bottom: 30px;
    color: var(--text-dark);
}

/* Flexible Modal Content Sections - Supports any formatting */
.modal-section-content {
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.modal-section-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.modal-section-content ul,
.modal-section-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.modal-section-content ul {
    list-style-type: disc;
}

.modal-section-content ol {
    list-style-type: decimal;
}

.modal-section-content li {
    position: relative;
    z-index: 10;
    color: var(--text-dark);
    margin-bottom: 0.8rem;
    line-height: 1.5;
    font-weight: 400;
}

.modal-section-content strong,
.modal-section-content b {
    font-weight: 600;
}

.modal-section-content em,
.modal-section-content i {
    font-style: italic;
}

.modal-section-content h1,
.modal-section-content h2,
.modal-section-content h3,
.modal-section-content h4 {
    color: var(--primary-blue);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.modal-section-content a {
    color: var(--accent-gold);
    text-decoration: underline;
}

.modal-section-content a:hover {
    color: var(--primary-blue);
}

/* Legacy class support (in case used elsewhere) */
.modal-description,
.benefit-list,
.target-audience,
.event-format,
.facilitator-info {
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.section-title {
    color: var(--primary-blue);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    opacity: 1;
}

/* Modal CTA Button Styling */
.modal-cta {
    display: inline-block;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    color: var(--white);
    background: var(--accent-color, #2C5282); /* Match your brand color */
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    width: auto;
    min-width: 200px;
}

.modal-cta:hover {
    background: var(--accent-color-dark, #1A365D); /* Darker shade for hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pagination Styles */
.pagination-container {
  text-align: center;
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}

.pagination {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  box-shadow: 0 8px 30px rgba(44, 74, 107, 0.12);
  border: 1px solid rgba(192, 152, 83, 0.15);
}

.pagination-btn {
  min-width: 45px;
  height: 45px;
  padding: 0.75rem 1rem;
  border: 2px solid transparent;
  background: transparent;
  color: var(--primary-blue);
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pagination-btn:hover:not(.active) {
  background: rgba(192, 152, 83, 0.1);
  border-color: rgba(192, 152, 83, 0.3);
  transform: translateY(-2px);
}

.pagination-btn.active {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #d4a866 100%);
  color: var(--cream);
  border-color: var(--accent-gold);
  box-shadow: 0 4px 15px rgba(192, 152, 83, 0.3);
  cursor: default;
  transform: translateY(-1px);
}

.pagination-ellipsis {
  color: var(--text-light);
  padding: 0 0.5rem;
  font-weight: 600;
}

 
/* Mobile pagination styles */
@media (max-width: 768px) {

  .pagination {
    gap: 0.3rem;
    padding: 0.5rem 1rem;
  }
  
  .pagination-btn {
    min-width: 40px;
    height: 40px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .pagination-container {
    padding: 2rem 0 1rem;
  }
  
  .pagination {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .pagination-btn {
    min-width: 35px;
    height: 35px;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
  }
}

/* ========================================
/* ========================================
   CONSOLIDATED RESPONSIVE DESIGN
   Place at the bottom of your CSS file
   ======================================== */

@media (max-width: 1024px) {
  .hero {
    min-height: 75vh;
    padding: 3rem 2rem;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin: 1.5rem auto;
  }

  .hero-subtitle {
    font-size: 1.6rem;
  }

  .hero p {
    font-size: 1.1rem;
    max-width: 650px;
  }
}
 
/* Mobile pagination styles */
@media (max-width: 768px) {

  .pagination {
    gap: 0.3rem;
    padding: 0.5rem 1rem;
  }
  
  .pagination-btn {
    min-width: 40px;
    height: 40px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .pagination-container {
    padding: 2rem 0 1rem;
  }
  
  .pagination {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .pagination-btn {
    min-width: 35px;
    height: 35px;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
  }
}

/* ========================================
   CONSOLIDATED RESPONSIVE DESIGN
   Place at the bottom of your CSS file
   ======================================== */

/* Tablet - 1024px and below */
@media (max-width: 1024px) {
  .hero {
    min-height: 100vh;
    height: auto;
    padding: 0rem 2rem 3.5rem;
  }

  .hero-content {
    max-width: 700px;
    padding: 3.5rem 0;
    gap: 1.25rem;
    margin-top: 0;
  }
  
  .hero p {
    max-width: 300px;
}

.hero-badge {
margin: 2rem;
}

  .hero h1 {
    font-size: 3rem;
    margin: 0.5rem auto 1.75rem;
  }

 .hero-subtitle {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1.2rem;
    max-width: 750px;
  }

    .events-grid {
    display: flex; /* Change from grid to flex */
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
  }
  
  .event-card {
    width: calc(50% - 1rem);  /* Guarantees 2 columns */
    max-width: 450px;
    min-height: 420px;
  }
}

/* Tablet/Mobile - 768px and below */
@media (max-width: 768px) {
  .hero {
    min-height: 100vh;
    height: auto;
    padding: 0rem 2rem 3rem;
  }

  .hero-content {
    max-width: 600px;
    padding: 3rem 0;
    gap: 1rem;
    margin-top: 0;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem) !important;
    margin: 1.5rem auto;
  }

.hero-subtitle {
  font-size: clamp(1.2rem, 4vw, 1.8rem) !important;
  margin-bottom: 1.8rem;
}

  .hero p {
    font-size: 1.1rem !important;
    max-width: 550px;
    margin: 0 auto;
  }

  .featured-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
    margin-top: -1rem;
  }

  .featured-content .event-title {
    text-align: center;
    padding-right: 0;
    margin: 1.5rem auto 1rem;
  }
  
  .featured-description {
    text-align: center;
  }

  .featured-details {
    justify-content: center;
  }
  
  .events-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
  .event-card {
    width: 85%;
    max-width: 500px;
    min-width: 280px;
  }

  .view-controls {
    padding: 1.5rem 1rem 2.5rem;
  }

  .main-container {
    padding: 0 1rem 3rem;
  }
  
  .filter-buttons {
    flex-direction: column;
    align-items: center;
  }

  .event-cta {
    padding: 0.6rem 1.6rem;
    font-size: 0.8rem;
    min-width: 180px;
  }
}

/* Mobile - 480px and below */
@media (max-width: 480px) {
  .hero {
    min-height: 100vh;
    height: auto;
    padding: 0rem 1.5rem 2rem;
  }

  .hero-content {
    max-width: 100%;
    padding: 1.5rem 0;
    gap: 0.75rem;
    margin-top: 0;
  }

  .hero-badge {
    padding: 0.5rem 1.2rem;
    font-size: 0.8rem;
  }
  
  .hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.2rem) !important;
    margin: 1.4rem auto;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 1.2rem !important;
    margin-bottom: 1.2rem;
    line-height: 1.4;
  }

  .hero p {
    font-size: 0.875rem !important;
    line-height: 1.6;
    max-width: 90%;
    margin: 0 auto;
  }

  .featured-event {
    padding: 2rem 1rem;
  }

  .featured-content {
    margin-top: -1rem;
  }

  .featured-event .event-title {
    font-size: 1.4rem;
    line-height: 1.3;
    margin: 1rem 0 0 0;
  }

  .featured-description {
    text-align: center;
    line-height: 1.4;
    padding: .5rem 0 .5rem 0; 
  }

  .featured-details {
    gap: 1rem;
    justify-content: center;
  }

  .featured-detail {
    justify-content: center;
    width: 100%;
  }

  .view-controls {
    padding: 1rem 1rem 3rem;
  }

  .view-toggle {
    flex-direction: column;
    padding: 0.3rem;
  }

  .view-btn {
    padding: 0.6rem 1.5rem;
    margin: 0.2rem 0;
  }

  .event-card {
    width: 100%;
    text-align: left;
    padding: 1.5rem;
  }

  .event-title,
  h3.event-title {
    text-align: left;
    padding-right: 80px; /* Space for date badge */
    margin-top: 0.75rem; /* CONSISTENT top margin - not 4rem */
  }
  
  .event-badges-row {
    justify-content: flex-start; /* ADD THIS */
    margin-bottom: 0.75rem;
    min-height: 0;
  }
  
  .event-cohort {
    margin-bottom: 0; /* Remove any bottom margin */
  }

  .event-date-badge {
    right: 1.5rem;
    top: 1.5rem; /* Fixed position from top */
  }

  .event-details {
    justify-content: flex-start;
  }

  .event-detail {
    justify-content: flex-start;
  }
  
  .event-actions {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start; /* ADD THIS - aligns buttons to left */
  }

  .event-actions {
    flex-direction: column;
    gap: 1rem;
  }

  .event-cta {
    width: auto;
    min-width: 160px;
    padding: 0.8rem 1.6rem;
  }

  .nav-btn {
    padding: 0.6rem 0.8rem;
    font-size: 1.2rem;
  }
  
  .calendar-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr)); /* Ensure this is here too */
  }

  .current-month {
    font-size: 1.6rem;
    min-width: 150px;
  }

  .calendar-day {
    min-height: 100px;
    max-height: 100px; /* ADD max-height */
    padding: 0.5rem;
    overflow: hidden; /* ADD THIS */
    min-width: 0; /* ADD THIS */
  }

  .event-item {
    font-size: 0.7rem;
    padding: 0.3rem 0.5rem;
    overflow: hidden; /* ADD THIS */
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
/* ========================================
/* ========================================
   AGENDA VIEW (Mobile/Tablet)
   ======================================== */

.agenda-view-mobile {
  display: none;
}

@media (max-width: 768px) {
  /* Hide traditional calendar grid on mobile/tablet */
  .calendar-container {
    display: none !important;
  }
  
  .legend {
    display: none !important;
  }
  
  /* Show agenda view instead */
  .calendar-view.active .agenda-view-mobile {
    display: block;
  }
  
  /* Agenda Header */
  .agenda-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #3a5a7a 100%);
    color: var(--cream);
    padding: 2rem 1.5rem;
    border-radius: 15px 15px 0 0;
    text-align: center;
  }
  
  .agenda-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
  }
  
  .agenda-month-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
  }
  
  .agenda-nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--cream);
    font-size: 1.5rem;
    font-weight: 500;
    width: 45px;
    height: 45px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
  }
  
  .agenda-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
  }
  
  .agenda-current-month {
    font-size: 1.3rem;
    font-weight: 600;
    min-width: 180px;
    text-align: center;
  }
  
  /* Agenda List */
  .agenda-list {
    background: var(--white);
    border-radius: 0 0 15px 15px;
    padding: 1.5rem;
    max-height: 600px;
    overflow-y: auto;
  }
  
  .agenda-list::-webkit-scrollbar {
    width: 6px;
  }
  
  .agenda-list::-webkit-scrollbar-track {
    background: rgba(192, 152, 83, 0.1);
  }
  
  .agenda-list::-webkit-scrollbar-thumb {
    background: var(--accent-gold);
    border-radius: 3px;
  }

  /* Timeline Container */
  .agenda-timeline {
    display: flex;
    flex-direction: column;
  }

  /* Individual Event Row */
  .agenda-event {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .agenda-event:hover .agenda-event-content {
    background: rgba(244, 241, 232, 0.5);
  }

  .agenda-event.last {
    padding-bottom: 0;
  }

  /* Date Column */
  .agenda-event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 45px;
    text-align: center;
    padding-top: 0.5rem;
  }

  .agenda-event-month {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent-gold);
    letter-spacing: 0.5px;
    text-transform: uppercase;
  }

  .agenda-event-day {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    line-height: 1.2;
  }

  .agenda-event-weekday {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-medium);
    letter-spacing: 0.5px;
  }

  /* Event Content */
  .agenda-event-content {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    transition: background 0.3s ease;
  }

  .agenda-event-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
  }

  .agenda-event-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .agenda-event-time {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-medium);
  }

  .agenda-event-divider {
    color: var(--text-light);
    font-weight: 300;
  }

  .agenda-event-type {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.6rem;
    border-radius: 10px;
  }
  
  .agenda-event-type.masterclass {
    background: rgba(192, 152, 83, 0.15);
    color: var(--accent-gold);
  }
  
  .agenda-event-type.course {
    background: rgba(44, 74, 107, 0.15);
    color: var(--primary-blue);
  }
  
  .agenda-event-type.mastermind {
    background: rgba(139, 157, 122, 0.15);
    color: var(--soft-green);
  }
  
  .agenda-event-type.webinar {
    background: rgba(91, 141, 184, 0.15);
    color: var(--webinar-blue);
  }
  
  .agenda-event-type.retreat {
    background: rgba(139, 105, 20, 0.15);
    color: var(--retreat-gold);
  }
  
  .agenda-event-type.workshop {
    background: rgba(93, 112, 82, 0.15);
    color: var(--workshop-green);
  }
  
  /* Empty State */
  .agenda-empty {
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-medium);
  }
  
  .agenda-empty-icon {
    margin-bottom: 1rem;
    color: var(--accent-gold);
    opacity: 0.5;
  }

  .agenda-empty-icon svg {
    width: 48px;
    height: 48px;
  }
  
  .agenda-empty-text {
    font-size: 1.1rem;
  }
}

/* Mobile specific adjustments */
@media (max-width: 480px) {
  .agenda-header {
    padding: 1.5rem 1rem;
  }
  
  .agenda-title {
    font-size: 1.5rem;
  }
  
  .agenda-current-month {
    font-size: 1.1rem;
    min-width: 150px;
  }
  
  .agenda-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
  }

  .agenda-list {
    padding: 1rem;
  }

  .agenda-event-date {
    min-width: 40px;
  }

  .agenda-event-day {
    font-size: 1.3rem;
  }

  .agenda-event-content {
    padding: 0.5rem 0.75rem;
  }

  .agenda-event-title {
    font-size: 0.95rem;
  }
}