/* ============================================================
   SINGLE EVENT — Card-centered Layout System
   ============================================================ */

/* ----- Page Background ----- */
.ev-single {
  background: #eef1f5;
  padding: 1.5rem max(1rem, calc(50vw - 680px));
  min-height: 100vh;
}

/* ----- Event Container (white card) ----- */
.ev-container {
  max-width: 1360px;
  margin: 0 auto;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 2px 40px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

/* ----- Section spacing inside container ----- */
.ev-section {
  padding: 2.5rem 3rem;
}

.ev-section-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: 1.25rem;
}

/* ============================================================
   1. HERO (inside card)
   ============================================================ */
.ev-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.ev-hero-bg {
  position: absolute;
  inset: 0;
}

.ev-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ev-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.2) 0%,
    rgba(15, 23, 42, 0.65) 50%,
    rgba(15, 23, 42, 0.92) 100%
  );
}

.ev-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 3rem 3rem 3.5rem;
}

/* ---- Fallback hero (no image) ---- */
.ev-hero--fallback {
  min-height: 240px;
}

.ev-hero--fallback .ev-hero-title {
  color: var(--color-primary);
}

.ev-hero--fallback .ev-hero-meta-item {
  color: var(--color-text);
}

.ev-hero--fallback .ev-hero-meta-item svg {
  opacity: 0.5;
}

.ev-hero--fallback .ev-btn-ghost {
  background: rgba(0, 0, 0, 0.04);
  color: var(--color-text);
  border-color: rgba(0, 0, 0, 0.12);
}

.ev-hero--fallback .ev-btn-ghost:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.2);
}

.ev-hero-fallback {
  position: absolute;
  right: 3rem;
  bottom: 1rem;
  font-family: var(--font-heading);
  font-size: 8rem;
  font-weight: 800;
  line-height: 1;
  color: rgba(0, 0, 0, 0.06);
  user-select: none;
  pointer-events: none;
  letter-spacing: -2px;
}

.ev-hero-badge {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 0.85rem;
}

.ev-hero-title {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 0.85rem;
  max-width: 720px;
}

.ev-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.5rem;
}

.ev-hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.85);
}

.ev-hero-meta-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.ev-hero-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  align-items: center;
}

.ev-hero-status-badge {
  display: inline-block;
  padding: 11px 26px;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 600;
  background: #e2e8f0;
  color: #64748b;
  border: 2px solid #cbd5e1;
  cursor: default;
}

.ev-btn-disabled {
  background: #e2e8f0 !important;
  color: #94a3b8 !important;
  cursor: default !important;
  pointer-events: none !important;
  border-color: #e2e8f0 !important;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.ev-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  border: 2px solid transparent;
}

.ev-btn svg {
  transition: transform 0.3s ease;
}

.ev-btn:hover svg {
  transform: translateY(2px);
}

.ev-btn-primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.ev-btn-primary:hover {
  background: #2a5e30;
  border-color: #2a5e30;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(52, 120, 61, 0.35);
}

.ev-btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.ev-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.ev-btn-block {
  display: flex;
  width: 100%;
  justify-content: center;
}

.ev-btn-large {
  padding: 14px 36px;
  font-size: 1.05rem;
}

/* ============================================================
   2. OVERVIEW GRID
   ============================================================ */
.ev-overview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.ev-tag {
  display: inline-flex;
  padding: 4px 14px;
  background: #e8f5e9;
  color: #2e7d32;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 20px;
}

.ev-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.ev-overview-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.ev-overview-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: #f0fdf4;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ev-overview-icon svg {
  display: block;
}

.ev-overview-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.ev-overview-value {
  display: block;
  font-size: 0.95rem;
  color: var(--color-text);
  font-weight: 500;
}

.ev-text-full {
  color: #ef4444;
  font-weight: 600;
}

/* ============================================================
   3. CONTENT + INFO PANEL (2-column)
   ============================================================ */
.ev-section-content {
  padding-top: 0;
}

.ev-content-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 4rem;
  align-items: start;
}

.ev-content-main {
  min-width: 0;
  max-width: 75ch;
}

.ev-content-lead {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.ev-content-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-text);
}

.ev-content-body p {
  margin-bottom: 1.15rem;
}

.ev-content-body h2,
.ev-content-body h3 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.ev-content-body h2 { font-size: 1.4rem; }
.ev-content-body h3 { font-size: 1.2rem; }

.ev-content-body ul,
.ev-content-body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.ev-content-body li {
  margin-bottom: 0.4rem;
}

/* ---- Info Panel (sticky) ---- */
.ev-info-panel {
  position: sticky;
  top: 2rem;
}

.ev-info-card {
  background: #f8fafc;
  border-radius: 20px;
  padding: 1.5rem 1.5rem 1.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.ev-info-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-primary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 2px solid #e8f5e9;
}

.ev-info-list {
  margin: 0;
  padding: 0;
}

.ev-info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.ev-info-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ev-info-row dt {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  flex-shrink: 0;
}

.ev-info-row dd {
  font-size: 0.92rem;
  color: var(--color-text);
  text-align: right;
  margin: 0;
  font-weight: 500;
}

.ev-info-row dd a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
}

.ev-info-row dd a:hover {
  text-decoration: underline;
}

.ev-info-card .ev-btn {
  margin-top: 1.25rem;
}

/* ============================================================
   4. GALLERY
   ============================================================ */
.ev-section-gallery {
  border-top: 1px solid #f1f5f9;
}

.ev-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.ev-gallery-item {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  position: relative;
}

.ev-gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0);
  transition: background 0.3s ease;
}

.ev-gallery-item:hover::after {
  background: rgba(15, 23, 42, 0.05);
}

.ev-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.ev-gallery-item:hover img {
  transform: scale(1.07);
}

/* ============================================================
   5. MAP
   ============================================================ */
.ev-section-map {
  border-top: 1px solid #f1f5f9;
}

.ev-map-embed {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* ============================================================
   6. INSCRIPTION
   ============================================================ */
.ev-section-registration {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  border-radius: 0 0 24px 24px;
}

.ev-registration-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.ev-registration-header .ev-section-title {
  margin-bottom: 0;
}

.ev-registration-badge {
  display: inline-flex;
  padding: 5px 14px;
  background: #e8f5e9;
  color: #2e7d32;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 20px;
}

.ev-badge-full {
  background: #fef2f2;
  color: #dc2626;
}

/* ---- Form ---- */
.ev-registration-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 600px;
}

.ev-form-row {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ev-form-row--split {
  flex-direction: row;
}

.ev-form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ev-form-group label {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}

.ev-req {
  color: #ef4444;
}

.ev-form-group input,
.ev-form-group select {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  background: #fff;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.ev-form-group input:focus,
.ev-form-group select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(52, 120, 61, 0.12);
}

.ev-form-group input::placeholder {
  color: #94a3b8;
}

.ev-form-group select {
  cursor: pointer;
}

/* ---- Messages ---- */
.ev-registration-header + .abc-register-success,
.ev-registration-header + .abc-register-error {
  background: #e8f5e9;
  color: #2e7d32;
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-weight: 500;
  font-size: 0.95rem;
}

.ev-registration-header + .abc-register-error {
  background: #fef2f2;
  color: #dc2626;
}

.ev-registration-header + .abc-register-error ul {
  margin: 0;
  padding-left: 1.25rem;
}

.ev-registration-header + .abc-register-error li {
  margin-bottom: 4px;
}

/* ---- Full notice ---- */
.ev-registration-full {
  text-align: center;
  padding: 1.5rem 0;
}

.ev-registration-full svg {
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

.ev-registration-full p {
  font-size: 1.05rem;
  color: var(--color-text);
}

.ev-registration-full a {
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: none;
}

.ev-registration-full a:hover {
  text-decoration: underline;
}

/* ============================================================
   MODAL (Image Lightbox)
   ============================================================ */
.ev-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ev-modal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.ev-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(4px);
}

.ev-modal-wrap {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.ev-modal[aria-hidden="false"] .ev-modal-wrap {
  transform: scale(1);
}

.ev-modal-close {
  position: absolute;
  top: -48px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.4rem;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  line-height: 1;
}

.ev-modal-close:hover {
  opacity: 1;
}

.ev-modal-img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
  display: block;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .ev-single {
    padding: 1rem;
  }

  .ev-container {
    border-radius: 20px;
  }

  .ev-section {
    padding: 2rem 1.75rem;
  }

  .ev-hero-content {
    padding: 2.5rem 1.75rem;
  }

  .ev-hero-title {
    font-size: 2.2rem;
  }

  .ev-content-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .ev-content-main {
    max-width: none;
  }

  .ev-info-panel {
    position: static;
  }

  .ev-info-card {
    padding: 1.35rem 1.35rem 1.5rem;
  }

  .ev-info-card .ev-btn {
    margin-top: 0;
  }

  .ev-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

@media (max-width: 768px) {
  .ev-single {
    padding: 0;
  }

  .ev-container {
    border-radius: 0;
    box-shadow: none;
  }

  .ev-section {
    padding: 1.75rem 1.25rem;
  }

  .ev-hero-content {
    padding: 2rem 1.25rem 2.5rem;
  }

  .ev-hero-title {
    font-size: 1.7rem;
  }

  .ev-hero-fallback {
    font-size: 5rem;
    right: 1.5rem;
    bottom: 0.5rem;
  }

  .ev-overview-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .ev-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
  }

  .ev-section-title {
    font-size: 1.3rem;
  }

  .ev-section-registration {
    border-radius: 0;
  }

  .ev-modal-wrap {
    max-width: 95vw;
  }
}

@media (max-width: 480px) {
  .ev-hero-title {
    font-size: 1.4rem;
  }

  .ev-hero-actions {
    flex-direction: column;
  }

  .ev-hero-actions .ev-btn {
    width: 100%;
    justify-content: center;
  }

  .ev-btn-large {
    padding: 12px 24px;
    font-size: 1rem;
  }

  .ev-form-row--split {
    flex-direction: column;
  }
}
