/* =========================================
   INDEX PAGE STYLES (index.html)
   Comments added so you can see what does what
   ========================================== */


/* -----------------------------------------
   HERO SECTION (top banner with status & socials)
   ----------------------------------------- */

.hero {
  /* Rounded box & padding for the hero container */
  border-radius: 24px;
  padding: 0.35rem 0.9rem;

  /* Fancy layered background gradients */
  background:
    radial-gradient(circle at top left, rgba(129, 140, 248, 0.2), transparent 60%),
    radial-gradient(circle at bottom right, rgba(244, 180, 0, 0.21), transparent 55%),
    linear-gradient(135deg, #ffffff, #f3f4f6);

  border: 1px solid #e5e7eb;
  box-shadow: var(--shadow-soft);
  margin-bottom: 1.6rem;
  position: relative;
  overflow: hidden; /* hides the gradient overlay "bleed" */
}

.hero::after {
  /* Soft light vignette overlay on top of hero */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.4), transparent 55%);
  pointer-events: none;
  opacity: 0.5;
}

.hero-header {
  /* Container for kicker, title, subtitle */
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.4rem;
  position: relative;
  z-index: 1; /* stay above ::after overlay */
}

.hero-kicker {
  /* Uppercase mini text above main title */
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.hero-title {
  /* Big hero heading */
  font-size: 1.35rem;
  line-height: 1.25;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.2rem;
}

.hero-subtitle {
  /* Descriptive text under title */
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: 60rem;
  margin-bottom: 0.25rem;
}

.hero-status-row {
  /* Row containing status pill + meta info */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.15rem;
  position: relative;
  z-index: 1;
}


/* -----------------------------------------
   HERO SOCIAL STRIP (X, Facebook, IG pills)
   ----------------------------------------- */

.hero-social-row {
  /* Row under the hero that shows "follow us" */
  margin-top: 0.7rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.hero-social-text {
  /* "Follow live alerts & safety updates:" text */
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero-social-links {
  /* Wraps the social pills (X/Facebook/IG) */
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.social-pill {
  /* Base style for each social button */
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.social-pill:hover {
  /* Hover lift + stronger shadow */
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.social-pill img {
  /* Social icon size */
  width: 18px;
  height: 18px;
  display: block;
}

/* Brand hover colors */
.social-x:hover { border-color: #111827; }
.social-fb:hover { border-color: #1877f2; }
.social-ig:hover { border-color: #e4405f; }
.social-discord:hover { border-color: #5865f2; } /* Not used on index.html now, but kept for future */


/* Mobile adjustments for social row */
@media (max-width: 640px) {
  .hero-social-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-social-links {
    width: 100%;
  }
}


/* -----------------------------------------
   STATUS PILL (bot online/offline/degraded)
   ----------------------------------------- */

.status-pill {
  /* Base pill that JS toggles with status-healthy/offline/etc */
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.9rem;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  color: var(--text-main);
}

.status-dot {
  /* Small colored dot (you currently don't have it in HTML) */
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--text-muted);
  margin-right: 0.4rem;
}

.status-label {
  /* Text inside the status pill */
  font-weight: 600;
}

/* Bot states: these classes are added/removed by JS, not HTML directly */
.status-healthy {
  border-color: #86efac;
  background: #dcfce7;
}

.status-healthy .status-dot {
  background: var(--success);
  box-shadow: 0 0 9px rgba(34, 197, 94, 0.8);
}

.status-degraded {
  border-color: #fcd34d;
  background: #fff7ed;
}

.status-degraded .status-dot {
  background: var(--warn);
  box-shadow: 0 0 9px rgba(249, 115, 22, 0.8);
}

.status-offline {
  border-color: #fca5a5;
  background: #fee2e2;
}

.status-offline .status-dot {
  background: var(--danger);
  box-shadow: 0 0 9px rgba(239, 68, 68, 0.9);
}

.status-unknown {
  /* Default border when status is unknown */
  border-color: #cbd5e1;
}


/* HERO META (last heartbeat, source) */

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.hero-meta-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  color: #9ca3af;
}

.hero-meta-value {
  font-variant-numeric: tabular-nums;
  color: var(--text-main);
}


/* -----------------------------------------
   DASHBOARD GRID (left: calls, right: articles/gallery)
   ----------------------------------------- */

.grid {
  /* 2-column layout: left active/today calls, right articles+gallery */
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.7fr); /* left slightly smaller */
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

/* Column containers */
.left-col,
.right-col {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;  /* space between stacked cards in each column */
}


/* -----------------------------------------
   CARD BASE STYLES (used by all cards)
   ----------------------------------------- */

.card {
  /* Generic card container */
  border-radius: var(--radius-xl);
  background: var(--card-bg);
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-soft);
  padding: 1rem;   /* << This padding is what gives your right column interior space */
  position: relative;
  overflow: hidden;
  text-align: left;
}

.card-header {
  /* Top row of each card (title & optional right info/link) */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.card-title {
  /* Big text in the card header */
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #111827;
}

.card-title span.icon {
  /* Emoji/icon in card header */
  font-size: 1rem;
}

.card-subtitle {
  /* Smaller explanatory text under card title */
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Right side of card headers (e.g. “Data lags by 60–90 seconds”) */
.card-header-right {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  align-items: flex-end;
}

.card-header-link {
  /* "Open live map →" style */
  font-size: 0.72rem;
  color: #2563eb;
  text-decoration: none;
}

.card-header-link:hover {
  text-decoration: underline;
}

/* Not currently used on index, but a generic alt header layout */
.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Small text link used a few places (e.g., gallery card “View gallery →”) */
.card-link-small {
  font-size: 0.8rem;
  text-decoration: none;
  opacity: 0.8;
}

.card-link-small:hover {
  text-decoration: underline;
}


/* -----------------------------------------
   LIVE CALLS LIST (active & today's calls)
   ----------------------------------------- */

.calls-list {
  /* Stack of call entries */
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 550px;
  overflow: auto;
  scrollbar-width: thin;
  text-align: left;
}

.call-item {
  /* Individual call "pill" */
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.55rem 0.6rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.call-main-line {
  /* First row: call type + status tag */
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #111827;
}

.call-type {
  /* The call type text (e.g. DISTURBANCE) */
  font-weight: 600;
}

.call-location {
  /* Location line (truncates if too long) */
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.call-meta {
  /* Last row: time + optional status */
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.call-tag {
  /* Little status pill on the right (e.g. ACTIVE) */
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: #eef2ff;
  color: #3730a3;
}

/* Make list items in the "active" list feel clickable */
.calls-list-active .call-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.calls-list-active .call-link:hover {
  background: rgba(148, 163, 184, 0.08);
  border-radius: 12px;
}


/* -----------------------------------------
   HOME ARTICLES (right column, top card)
   ----------------------------------------- */

.home-articles-list {
  /* Scrollable list of recent articles */
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 290px;
  min-height: 235px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.home-article-item {
  /* A single "article row" in the list */
  display: flex;
  gap: 0.6rem;
  min-height: 90px;
  padding: 0.45rem 0.5rem;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #f9fafc;
  text-decoration: none;
  color: inherit;
  font-size: 0.8rem;
}

.home-article-item:hover {
  border-color: #c4b5fd;
  background: #f5f3ff;
}

.home-article-thumb {
  /* Thumbnail container */
  flex: 0 0 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: #e5e7eb;
}

.home-article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-article-text {
  /* Right side: metadata + title + summary */
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.home-article-meta {
  /* Date + topic line */
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-article-title {
  /* Article title */
  font-weight: 600;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-article-summary {
  /* Optional article summary, truncated */
  font-size: 0.7rem;
  color: var(--text-muted);
  max-height: 2.50em;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Message when there are no articles (class is in HTML) */
.home-article-empty {
  font-size: 0.8rem;
  color: var(--text-muted);
}


/* -----------------------------------------
   SAFETY TIP CARD (currently unused on index.html)
   These classes are safe to move to another CSS file
   if you use them on a different page.
   ----------------------------------------- */

.safety-tip {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-main);
}

.safety-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #15803d;
  margin-bottom: 0.5rem;
}

.safety-body {
  margin-bottom: 0.6rem;
}

.safety-footnote {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.safety-tip-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Thumbnail link + image for safety tip (if/when used) */
.safety-tip-thumb-link {
  display: block;
  border-radius: 12px;
  overflow: hidden;
}

.safety-tip-thumb {
  width: 100%;
  height: 140px;        /* controls height; adjust if needed */
  object-fit: cover;    /* crop rather than stretch */
  display: block;
}

.safety-tip-caption {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.3;
}


/* -----------------------------------------
   INDEX GALLERY PROMO CARD (right column bottom)
   ----------------------------------------- */

.gallery-promo-card {
  /* The bottom-right card that promotes the gallery */
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Clickable thumbnail wrapper */
.gallery-thumb-link {
  display: block;
  border-radius: 12px;
  overflow: hidden;
}

/* Thumbnail image inside the gallery promo */
.gallery-thumb {
  width: 100%;
  height: 600px;   /* adjust if you want shorter */
  object-fit: cover;
  display: block;

}

.gallery-thumb-caption {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* This part tries to visually match the article card height */
.gallery-promo-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 600px;   /* matches article list height; tweak as needed */
  max-height: 600px;
}


/* -----------------------------------------
   GALLERY GRID & DETAIL
   NOTE: These are used on your gallery pages,
   not index.html itself. You can move them to
   gallery.css if you want to isolate them.
   ----------------------------------------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.gallery-grid-item {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.gallery-grid-item img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
}

.gallery-grid-title {
  font-size: 0.9rem;
  color: var(--text-main);
}

/* Detail view image wrapper */
.gallery-detail-image-wrap {
  margin-top: 1rem;
}

.gallery-detail-image {
  width: 100%;
  max-width: 480px;
  display: block;
  margin: 0 auto;
  border-radius: 20px;
}


/* -----------------------------------------
   BOTTOM SUMMARY STRIP ("Today at a Glance" etc.)
   ----------------------------------------- */

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  font-size: 0.8rem;
}

.summary-card {
  border-radius: 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border-subtle);
  padding: 0.7rem 0.75rem;
}

.summary-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.summary-value {
  font-weight: 600;
  margin-bottom: 0.15rem;
  color: #111827;
}

.summary-note {
  font-size: 0.72rem;
  color: var(--text-muted);
}


/* -----------------------------------------
   RESPONSIVE TWEAKS
   ----------------------------------------- */

/* Tablet & small laptop */
@media (max-width: 900px) {
  .hero {
    padding: 0.9rem;
  }

  .hero-header {
    margin-bottom: 0.8rem;
  }

  .hero-status-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .hero-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  /* Dashboard grid collapses to 1 column */
  .grid {
    grid-template-columns: 1fr;
  }

  /* Summary strip also goes to 1 column */
  .summary-strip {
    grid-template-columns: 1fr;
  }

  /* Calls list max-height reduced so page doesn’t get too long */
  .calls-list {
    max-height: 400px;
  }
}

/* Small phones */
@media (max-width: 600px) {
  .hero-title {
    font-size: 1.25rem;
  }

  .hero-subtitle {
    font-size: 0.85rem;
  }

  .card {
    padding: 0.8rem;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .card-header-right {
    align-items: flex-start;
    text-align: left;
  }

  /* Let long locations wrap instead of truncating */
  .call-location {
    white-space: normal;
  }

  .call-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
  }

  .home-article-item {
    align-items: flex-start;
  }

  .home-article-meta,
  .home-article-title {
    white-space: normal;
  }

  .summary-card {
    padding: 0.8rem;
  }
}
