/* css/agenda.css */

/* Prevent mobile horizontal overflow on Agenda (fixes right-side whitespace) */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

/* Safer sizing (avoids width+padding overflow) */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Global container padding to match reference (~5% or 60-80px) */
.agenda-page-container {
  max-width: 100%;
  margin: 0;
  padding: 0;
  /* Remove top padding so hero starts at top */
  font-family: "Manrope", sans-serif;
  color: #3b3b3b;
}

/* =========================================
   HERO SECTION (Featured Item)
   ========================================= */
.agenda-hero-wrapper {
  position: relative;
  width: 100%;
  height: 100vh;
  /* Full viewport height */
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  /* Position card at bottom */
  justify-content: flex-start;
  /* Position card at left */
  overflow: hidden;
  /* Prevent overflow */
  margin-bottom: 0;
  /* Remove margin for full page effect */
  padding: 0;
  /* Remove padding, card will have its own */
}

/* Background Image Container */
.agenda-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.agenda-hero-bg.active {
  opacity: 1;
}

.agenda-hero-wrapper:hover .agenda-hero-bg.active {
  transform: scale(1.02);
}

/* The Overlay "Card" - Bottom Left Positioned */
.agenda-hero-card {
  position: relative;
  z-index: 10;
  background-color: rgba(255, 255, 255, 0.95);
  /* White background */
  backdrop-filter: blur(8px);
  width: 100%;
  /* Full width */
  max-width: 100%;
  /* Span entire width */
  margin: 0 0 0 0;
  /* No margins - full width */
  padding: 4rem 3rem;
  /* Padding on sides for content */
  display: grid;
  /* Grid layout: Title/Meta | Description | Badge/Arrow */
  grid-template-columns: minmax(220px, 0.8fr) 1.8fr auto;
  gap: 2rem;
  align-items: flex-start;
  color: #3b3b3b;
  text-decoration: none;
  transition: background-color 0.3s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  opacity: 0.9;
}

.agenda-hero-card:hover {
  background-color: rgba(255, 255, 255, 0.98);
}

/* Left Group */
.hero-left-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 220px;
}

.hero-title {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 0.5rem 0;
  color: #1a1a1a;
}

.hero-meta {
  font-size: 14px;
  font-weight: 400;
  color: #3b3b3b;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.hero-venue {
  font-size: 16px;
  font-weight: 500;
  color: #1a1a1a;
}

.hero-date-range {
  font-size: 14px;
  font-weight: 400;
  color: #3b3b3b;
}

.hero-date-range {
  display: flex;
  gap: 0.5rem;
}

/* Middle Group (Description) */
.hero-description {
  font-size: 14px;
  line-height: 1.6;
  font-weight: 400;
  color: #3b3b3b;
  margin: 0;
  padding-right: 1rem;
}

/* Right Group (Status/Icon) */
.hero-right-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 1.25rem;
  padding-left: 1rem;
}

.hero-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 2rem;
}

.hero-slider-nav {
  position: static;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #e1e1e1e6;
  padding: 0.75rem 1.25rem;
  border-radius: 30px;
  backdrop-filter: blur(4px);
}

.slider-nav-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1a1a;
  transition: opacity 0.2s;
}

.slider-nav-btn:hover {
  opacity: 0.6;
}

.slider-counter {
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  min-width: 40px;
  text-align: center;
}

.agenda-status-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 5px 12px;
  border: 1px solid #3b3b3b;
  border-radius: 20px;
  display: inline-block;
}

.hero-arrow-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.hero-arrow-icon svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.agenda-hero-wrapper:hover .hero-arrow-icon svg {
  transform: translateX(5px);
}

/* =========================================
   PAST EVENTS SECTION
   ========================================= */
.past-events-section {
  padding: 0 2rem;
  /* Match hero outer padding */
  margin-top: 6rem;
  /* Add top margin since hero has no bottom margin */
  margin-bottom: 8rem;
}

.past-events-title {
  font-size: 15px;
  /* Subtle header */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e0e0e0;
}

.agenda-list {
  display: flex;
  flex-direction: column;
}

.agenda-list-item {
  display: grid;
  /* Two columns: Info | Right (Date + View Gallery) */
  grid-template-columns: 1fr auto;
  gap: 3rem;
  padding: 2.5rem 0.8rem;
  border-bottom: 1px solid #e0e0e0;
  color: inherit;
  transition: background-color 0.2s ease;
  align-items: flex-start;
  position: relative;
}

.agenda-list-item:hover {
  background-color: #f9f9f9;
}

/* Item Info (Left + Description) */
.item-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Item Left */
.item-left {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.item-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.item-status {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border: 1px solid #1a1a1a;
  border-radius: 12px;
  text-transform: uppercase;
}

.item-location {
  font-size: 14px;
  color: #666;
  font-weight: 400;
}

/* Item Description */
.item-desc {
  font-size: 14px;
  line-height: 1.6;
  color: #666;
}

/* Item Right (Date + View Gallery) */
.item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
  min-width: 150px;
}

.item-date {
  font-size: 13px;
  font-weight: 500;
  color: #666;
  padding: 4px 12px;
  background: #f5f5f5;
  border-radius: 4px;
  white-space: nowrap;
}

.item-gallery-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  text-decoration: none;
  transition: opacity 0.2s;
}

.item-gallery-link:hover {
  opacity: 0.6;
}

.item-gallery-link svg {
  width: 16px;
  height: 16px;
}

/* Remove old CTA styles */
.item-cta {
  display: none;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .agenda-hero-card,
  .agenda-list-item {
    grid-template-columns: 1fr 1fr;
    /* 2 cols */
    gap: 2rem;
  }

  .hero-right-group,
  .item-right {
    grid-column: 2;
    grid-row: 1;
    /* Move to top right or adjust */
    align-items: flex-start;
  }

  .item-right {
    align-items: flex-end;
  }
}

@media (max-width: 768px) {
  .agenda-hero-wrapper {
    height: auto;
    /* Auto height for mobile */
    min-height: 80vh;
    /* Increased height for more image space */
    /* Minimum height to show image */
    padding: 0;
    margin-bottom: 0;
  }

  .agenda-hero-bg {
    background-position: center center;
    /* Center image on mobile */
    background-size: cover;
  }

  .agenda-hero-card {
    padding: 1.5rem 1rem;
    /* Smaller padding to prevent overflow */
    /* Reduce padding on mobile */
    grid-template-columns: 1fr;
    /* Single column layout */
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    /* Ensure padding is included in width */
  }

  .hero-left-group {
    min-width: auto;
  }

  .hero-title {
    font-size: 24px;
    /* Smaller title on mobile */
  }

  .hero-meta {
    font-size: 14px;
  }

  .hero-venue {
    font-size: 15px;
  }

  .hero-description {
    font-size: 13px;
    padding-right: 0;
  }

  .hero-right-group {
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    min-height: auto;
    padding-left: 0;
    gap: 0.75rem;
  }

  .hero-actions {
    justify-content: space-between;
    width: 100%;
  }

  .hero-slider-nav {
    align-self: center;
    padding: 0.6rem 1.1rem;
  }

  .slider-counter {
    font-size: 12px;
  }
  .past-events-section {
    padding: 0 1.5rem;
    margin-top: 4rem;
    /* Add space after hero */
  }

  .agenda-list-item {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 2rem 0;
  }

  .item-right {
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    align-items: flex-start;
    margin-top: 1rem;
    gap: 0.75rem;
  }

  .item-date {
    align-self: flex-start;
  }

  /* Mobile: match "+ View Gallery" style */
  .item-gallery-link svg {
    display: none;
  }

  .item-gallery-link::before {
    content: "+";
    display: inline-block;
    margin-right: 0.5rem;
    color: currentColor;
  }

  .item-cta {
    opacity: 1;
    transform: translateY(0);
    background: transparent;
    color: #000;
    text-decoration: underline;
    padding: 0;
  }

  .agenda-list-item:hover .item-date {
    opacity: 1;
    display: block;
  }
}

/* =========================================
   UPCOMING / PAST ACCORDION (Mobile)
   ========================================= */
.events-section {
  padding: 0 2rem;
  margin-top: 2.5rem;
}

.events-title {
  font-size: 2rem;
  font-weight: 500;
  margin: 0;
  padding: 0;
  color: #1a1a1a;
}

.events-toggle {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: none;
  background: #eeeeee;
  color: #1a1a1a;
  padding: 1.5rem 1.5rem;
  font-size: 2rem;
  font-weight: 500;
  cursor: pointer;
}

.events-toggle .chev {
  display: inline-flex;
  transition: transform 0.2s ease;
}

.events-section.is-open .events-toggle .chev {
  transform: rotate(180deg);
}

@media (max-width: 768px) {
  .events-section {
    padding: 0;
    margin-top: 0;
  }

  /* Hide desktop titles; show mobile toggles */
  .events-title {
    display: none;
  }

  .events-toggle {
    display: flex;
  }

  /* Accordion body */
  .events-body {
    padding: 0 1.5rem;
  }

  .events-section:not(.is-open) .events-body {
    display: none;
  }

  /* Match the reference spacing between accordions */
  .events-section + .events-section {
    margin-top: 0;
  }
}

/* =========================================
   GALLERY MODAL
   ========================================= */
.gallery-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
}

.gallery-modal.active {
  display: block;
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1;
}

.gallery-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.gallery-image {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  user-select: none;
}

.gallery-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 48px;
  cursor: pointer;
  z-index: 3;
  line-height: 1;
  padding: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.gallery-close:hover {
  opacity: 0.7;
}

.gallery-prev,
.gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 3;
}

.gallery-prev:hover,
.gallery-next:hover {
  background: rgba(255, 255, 255, 0.2);
}

.gallery-prev {
  left: 2rem;
}

.gallery-next {
  right: 2rem;
}

.gallery-counter {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  z-index: 3;
}
/* Gallery Error Message */
.gallery-error-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(220, 53, 69, 0.95);
  color: #fff;
  padding: 2rem;
  border-radius: 8px;
  max-width: 400px;
  text-align: center;
  font-size: 16px;
  line-height: 1.5;
  z-index: 4;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -60%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}
