/* ==========================================================================
   Diaspora Events Countdown – Stylesheet  v2.0.0
   Colors extracted from diaspora.gov.kn:
     Dark bg   #0e1521  (site header/nav background)
     Mid dark  #151c2e  (secondary dark for gradient)
     Green     #1f9c5e  (site "Read More" button colour)
     Green hi  #27c474  (hover state)
     Gold      #c8a430  (RIDU logo accent)
     Gold hi   #e8c84a  (lighter gold for hover/glow)
     White     #ffffff
   Author: EVOKE | Janelle Mason & Twanna Finch
   ========================================================================== */

/* ---------- Custom Properties ---------- */
:root {
  --dchp-dark:         #0e1521;
  --dchp-dark-mid:     #151c2e;
  --dchp-dark-rich:    #0a1018;
  --dchp-green:        #1f9c5e;
  --dchp-green-bright: #27c474;
  --dchp-gold:         #c8a430;
  --dchp-gold-light:   #e8c84a;
  --dchp-white:        #ffffff;
  --dchp-glass:        rgba(255, 255, 255, 0.05);
  --dchp-glass-green:  rgba(31, 156, 94, 0.15);
  --dchp-glass-border: rgba(200, 164, 48, 0.25);
  --dchp-font-head:    'Georgia', 'Times New Roman', serif;
  --dchp-font-body:    'Arial', 'Helvetica Neue', sans-serif;
  --dchp-transition:   0.3s ease;
}

/* ---------- Reset ---------- */
.dchp-banner,
.dchp-banner *,
.dchp-banner *::before,
.dchp-banner *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---------- Banner shell ---------- */
.dchp-banner {
  display: block;
  width: 100%;
  overflow: hidden;
  position: relative;

  background-color: var(--dchp-dark-rich);
  background-image:
    /* green radial glow — matches the site's primary CTA colour */
    radial-gradient(ellipse 70% 55% at 50% 45%, rgba(31, 156, 94, 0.14) 0%, transparent 68%),
    /* gold shimmer top-right corner */
    radial-gradient(ellipse 40% 30% at 90% 10%, rgba(200, 164, 48, 0.10) 0%, transparent 60%),
    /* base gradient matching the site header dark tones */
    linear-gradient(160deg, var(--dchp-dark-rich) 0%, var(--dchp-dark) 50%, var(--dchp-dark-mid) 100%);
  background-size: cover;
  background-position: center;
}

/* After JS repositions to root level */
.dchp-banner.dchp-is-root {
  width: 100% !important;
  max-width: 100% !important;
  left: 0 !important;
  right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  position: relative !important;
  display: block !important;
}

/* Background image overlay (optional via admin) */
.dchp-banner[style*="--dchp-bg-img"] {
  background-image:
    linear-gradient(160deg, rgba(10, 16, 24, 0.90) 0%, rgba(14, 21, 33, 0.85) 60%, rgba(21, 28, 46, 0.88) 100%),
    var(--dchp-bg-img);
}

/* ---------- Texture overlay ---------- */
.dchp-overlay {
  position: absolute;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%231f9c5e' fill-opacity='0.025'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ---------- SKN Flag strips (top & bottom) ---------- */
.dchp-flag-strip {
  display: flex;
  width: 100%;
  height: 5px;
  position: relative;
  z-index: 2;
}
.dchp-stripe          { flex: 1; display: block; height: 100%; }
.dchp-stripe--green   { background: var(--dchp-green); }
.dchp-stripe--gold    { background: var(--dchp-gold);  flex: 0.4; }
.dchp-stripe--black   { background: #0a0a0a;           flex: 0.6; }

/* ---------- Inner layout ---------- */
.dchp-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px 24px 26px;
  gap: 12px;
}

/* ---------- Date badge ---------- */
.dchp-badge {
  display: inline-block;
  background: var(--dchp-glass-green);
  border: 1px solid rgba(31, 156, 94, 0.35);
  color: var(--dchp-green-bright);
  font-family: var(--dchp-font-body);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: 50px;
  backdrop-filter: blur(4px);
}

/* ---------- Title ---------- */
.dchp-title {
  font-family: var(--dchp-font-head);
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--dchp-white);
  line-height: 1.2;
  max-width: 800px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}

/* ---------- Subtitle ---------- */
.dchp-subtitle {
  font-family: var(--dchp-font-body);
  font-size: clamp(0.78rem, 1.6vw, 0.9rem);
  color: rgba(255, 255, 255, 0.65);
  max-width: 520px;
  line-height: 1.5;
}

/* ---------- Countdown clock ---------- */
.dchp-clock {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0;
}

.dchp-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Green-tinted glass card — matches the site's button colour */
  background: var(--dchp-glass-green);
  border: 1px solid rgba(31, 156, 94, 0.28);
  border-radius: 10px;
  padding: 12px 20px 10px;
  min-width: 76px;
  backdrop-filter: blur(10px);
  transition: transform var(--dchp-transition), border-color var(--dchp-transition), background var(--dchp-transition);
}
.dchp-unit:hover {
  transform: translateY(-2px);
  border-color: var(--dchp-green);
  background: rgba(31, 156, 94, 0.22);
}

/* Numbers in site's gold (RIDU logo accent) */
.dchp-num {
  font-family: var(--dchp-font-head);
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 700;
  color: var(--dchp-gold);
  line-height: 1;
  letter-spacing: -0.02em;
  text-shadow: 0 0 22px rgba(200, 164, 48, 0.45);
  display: block;
  transition: opacity 0.15s ease;
}
.dchp-num.dchp-flip { opacity: 0; }

.dchp-label {
  font-family: var(--dchp-font-body);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
}

/* Separator — site's green */
.dchp-sep {
  font-family: var(--dchp-font-head);
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 700;
  color: var(--dchp-green);
  line-height: 1;
  margin-bottom: 18px;
  user-select: none;
  opacity: 0.6;
}

/* ---------- Live / Ended message ---------- */
.dchp-live-msg {
  font-family: var(--dchp-font-head);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--dchp-green-bright);
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* ---------- CTA — single "Learn More" button ---------- */
.dchp-ctas {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

.dchp-btn {
  display: inline-block;
  font-family: var(--dchp-font-body);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 11px 30px;
  border-radius: 50px;
  border: 2px solid transparent;
  cursor: pointer;
  transition:
    background var(--dchp-transition),
    color var(--dchp-transition),
    border-color var(--dchp-transition),
    transform var(--dchp-transition),
    box-shadow var(--dchp-transition);
}
.dchp-btn:hover { transform: translateY(-2px); }

/* "Learn More" — solid green, matching site's Read More buttons exactly */
.dchp-btn--outline {
  background: var(--dchp-green);
  color: var(--dchp-white);
  border-color: var(--dchp-green);
}
.dchp-btn--outline:hover {
  background: var(--dchp-green-bright);
  border-color: var(--dchp-green-bright);
  color: var(--dchp-white);
  box-shadow: 0 8px 28px rgba(31, 156, 94, 0.45);
}

/* ---------- Placeholder (left by JS reposition) ---------- */
.dchp-placeholder {
  display: none !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* ---------- Tablet ---------- */
@media (max-width: 768px) {
  .dchp-inner { padding: 22px 16px 18px; gap: 10px; }
  .dchp-unit  { min-width: 64px; padding: 10px 14px 8px; }
  .dchp-clock { gap: 5px; }
  .dchp-sep   { margin-bottom: 14px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 480px) {
  .dchp-inner { padding: 18px 12px 16px; gap: 8px; }
  .dchp-unit  { min-width: 56px; padding: 8px 10px 6px; border-radius: 8px; }
  .dchp-sep   { display: none; }
  .dchp-clock { gap: 6px; }
  .dchp-btn   { padding: 10px 24px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .dchp-btn, .dchp-unit, .dchp-num { transition: none; }
}
