/* ============================================================
   OVERLAY STYLESHEET
   ============================================================
   This file controls the pop-up window that appears when you
   click on a card or tag.

   The colors used here come from style.css (--teal, --ink, etc.)
   ============================================================ */


/* ---------- BACKDROP ----------
   The dark, blurred layer that covers the whole screen behind
   the pop-up.
*/
.overlay-backdrop {
  position: fixed;
  inset: 0;                                  /* covers entire screen */
  background: rgba(17, 17, 17, 0.4);         /* semi-transparent dark */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);        /* for Safari */
  opacity: 0;                                /* invisible by default */
  pointer-events: none;                      /* can't be clicked when hidden */
  transition: opacity 0.25s ease;
  z-index: 100;                              /* sits on top of everything */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

/* When the .active class is added (by JavaScript), it shows */
.overlay-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Stops the page behind from scrolling while overlay is open */
body.no-scroll {
  overflow: hidden;
}


/* ---------- THE POP-UP CARD ITSELF ---------- */
.overlay {
  background: var(--bg);
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  max-height: 85vh;                          /* never taller than 85% of screen */
  overflow-y: auto;                          /* scroll if content is long */
  padding: 2rem;
  position: relative;

  /* Animation: starts slightly down and small, then snaps to normal */
  transform: translateY(20px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);

  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.25);
}

.overlay-backdrop.active .overlay {
  transform: translateY(0) scale(1);
}


/* ---------- CLOSE BUTTON (×) ---------- */
.overlay-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--ink-soft);
  transition: all 0.18s ease;
  line-height: 1;
}

.overlay-close:hover {
  background: var(--ink);
  color: #fff;
}


/* ---------- CONTENT INSIDE THE POP-UP ---------- */

/* The small uppercase tag at the top (e.g. "EXPERIENCE") */
.overlay-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
  margin-bottom: 0.6rem;
}

/* The big title */
.overlay-title {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.3rem;
  line-height: 1.25;
  padding-right: 2rem;          /* space for close button */
}

/* The subtitle (organisation name, etc.) */
.overlay-sub {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
}

/* Date or location info */
.overlay-meta {
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin-bottom: 1.25rem;
}

/* The longer description text */
.overlay-body {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.65;
}

.overlay-body p + p {
  margin-top: 0.8rem;           /* space between paragraphs */
}

/* Bulleted lists in the description */
.overlay-body ul {
  list-style: none;
  margin-top: 0.5rem;
}

.overlay-body li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.4rem;
}

/* Custom teal dot for bullet points */
.overlay-body li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 4px;
  height: 4px;
  background: var(--teal);
  border-radius: 50%;
}


/* ---------- "VERIFY" / EXTERNAL LINK BUTTON ----------
   Appears at the bottom of the pop-up if the data has a `link` field.
*/
.overlay-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.25rem;
  padding: 0.65rem 1rem;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.18s ease;
}

.overlay-link:hover {
  background: var(--teal);
}


/* ---------- MOBILE ---------- */
@media (max-width: 420px) {
  .overlay {
    padding: 1.5rem;
  }
}
