/* ============================================================
   popup.css — Romanian National Visual Identity
   Dark theme: bg #051e30, accent #FFC72C
   Fonts: Montserrat (titles), Open Sans (body)
   ============================================================ */

/* ----- Overlay ----- */
#popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 30, 48, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

#popup-overlay.popup-visible {
  opacity: 1;
}

#popup-overlay.popup-hidden {
  display: none;
}

/* ----- Card ----- */
#popup-card {
  position: relative;
  max-width: 680px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 12px;
  background: #0d2035;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 199, 44, 0.3) transparent;
}

#popup-card::-webkit-scrollbar {
  width: 4px;
}

#popup-card::-webkit-scrollbar-track {
  background: transparent;
}

#popup-card::-webkit-scrollbar-thumb {
  background: rgba(255, 199, 44, 0.3);
  border-radius: 2px;
}

#popup-overlay.popup-visible #popup-card {
  opacity: 1;
  transform: translateY(0);
}

/* ----- Photo ----- */
#popup-photo {
  width: 100%;
  height: 45vh;
  object-fit: cover;
  display: block;
  border-radius: 12px 12px 0 0;
}

/* ----- Content area ----- */
#popup-content {
  padding: 28px 32px 32px;
}

/* ----- Eyebrow ----- */
#popup-eyebrow {
  color: #FFC72C;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  margin-bottom: 2px;
}

/* ----- Title ----- */
#popup-title {
  color: #ffffff;
  font-size: 28px;
  font-weight: 800;
  font-family: 'Montserrat', sans-serif;
  margin: 8px 0 4px;
  line-height: 1.2;
}

#popup-title-en {
  color: rgba(255, 255, 255, 0.4);
  font-size: 16px;
  font-weight: 500;
  font-family: 'Montserrat', sans-serif;
  margin: 0 0 14px;
  line-height: 1.3;
}

/* ----- Description ----- */
#popup-desc {
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  line-height: 1.65;
  font-family: 'Open Sans', sans-serif;
  margin: 0 0 6px;
}

#popup-desc-en {
  color: rgba(255, 255, 255, 0.38);
  font-size: 13px;
  line-height: 1.6;
  font-family: 'Open Sans', sans-serif;
  margin: 0 0 24px;
  font-style: italic;
}

/* ----- Stats row ----- */
#popup-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 4px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.popup-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.popup-stat-value {
  color: #FFC72C;
  font-size: 24px;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  line-height: 1;
}

.popup-stat-label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-family: 'Open Sans', sans-serif;
  line-height: 1.3;
  text-transform: lowercase;
}

/* ----- Close button ----- */
#popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.15s ease, transform 0.15s ease;
  font-family: 'Montserrat', sans-serif;
  padding: 0;
}

#popup-close:hover {
  background: rgba(255, 199, 44, 0.25);
  transform: scale(1.1);
}

#popup-close:focus-visible {
  outline: 2px solid #FFC72C;
  outline-offset: 2px;
}

/* ----- Responsive ----- */
@media (max-width: 520px) {
  #popup-photo {
    height: 35vh;
  }

  #popup-content {
    padding: 20px 20px 24px;
  }

  #popup-title {
    font-size: 22px;
  }

  #popup-title-en {
    font-size: 14px;
  }

  #popup-stats {
    gap: 16px;
  }

  .popup-stat-value {
    font-size: 20px;
  }
}
