/* =========================================================
   theme-agencies.css
   Agencies of Faith tables, details, and utilities
   ========================================================= */

/* Basic text helpers */
body.lw-site.world-rhome.agencies-page .lede {
  font-weight: 700;
  font-style: italic;
  color: var(--rhome-text-muted, #b7adc9);
}

body.lw-site.world-rhome.agencies-page .tight-top {
  margin-top: 0;
}

body.lw-site.world-rhome.agencies-page .attribution {
  font-weight: 700;
  color: var(--rhome-parchment, #d9cab3);
}

/* =========================================
   Standard Agencies Table
   (used for Paths, Pillars, etc.)
   ========================================= */

body.lw-site.world-rhome.agencies-page .table-standard {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.95rem;
  color: var(--rhome-text-main, #f0e9ff);
  background: rgba(10, 6, 20, 0.85);
  border-radius: 3px;
  overflow: hidden;
}

/* Wrap to allow rounded corners without clipping page */
body.lw-site.world-rhome.agencies-page .table-standard-wrapper {
  width: 100%;
  overflow-x: auto;
}

/* Header */
body.lw-site.world-rhome.agencies-page .table-standard thead {
  background: linear-gradient(
    90deg,
    rgba(164, 82, 255, 0.35),
    rgba(95, 213, 178, 0.20)
  );
}

body.lw-site.world-rhome.agencies-page .table-standard th,
body.lw-site.world-rhome.agencies-page .table-standard td {
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
}

/* Header typography – Inter */
body.lw-site.world-rhome.agencies-page .table-standard th {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: left;
  color: var(--rhome-parchment, #d9cab3);
}

/* Body text – inherits Merriweather from body */
body.lw-site.world-rhome.agencies-page .table-standard td {
  font-size: 0.93rem;
  color: var(--rhome-text-main, #f0e9ff);
}

/* Zebra striping for clarity */
body.lw-site.world-rhome.agencies-page .table-standard tbody tr:nth-child(even) {
  background-color: rgba(9, 5, 20, 0.85);
}

/* Hover highlight on main rows (not detail rows) */
body.lw-site.world-rhome.agencies-page .table-standard tbody tr:hover:not(.detail-row) {
  background-color: rgba(34, 24, 60, 0.95);
}

/* =========================================
   Path links + expandable detail rows
   ========================================= */

/* Clickable link that reveals a detail row */
body.lw-site.world-rhome.agencies-page .path-link {
  color: var(--rhome-primary-soft, #b38ddb);
  text-decoration: none;
  border-bottom: 1px dashed rgba(164, 82, 255, 0.6);
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease, text-shadow 120ms ease;
}

body.lw-site.world-rhome.agencies-page .path-link:hover {
  color: var(--rhome-primary-strong, #d580ff);
  border-color: rgba(213, 128, 255, 0.85);
  text-shadow: 0 0 8px rgba(164, 82, 255, 0.7);
}

/* The row that expands/collapses */
body.lw-site.world-rhome.agencies-page .detail-row {
  background: rgba(8, 4, 18, 0.96);
}

body.lw-site.world-rhome.agencies-page .detail-row td {
  padding-top: 0.4rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Hidden by default; toggled by JS */
body.lw-site.world-rhome.agencies-page .detail-hidden {
  display: none;
}

/* The div that gets HTML injected via data-include */
body.lw-site.world-rhome.agencies-page .path-desc {
  margin-top: 0.2rem;
  padding: 0.8rem 0.9rem 0.6rem;
  border-radius: 3px;
  background:
    radial-gradient(circle at 0 0, rgba(164, 82, 255, 0.18), transparent 55%),
    rgba(13, 8, 30, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
  font-size: 0.94rem;
  color: var(--rhome-text-soft, #9b93b0);
}

/* Optional inner heading inside description blocks */
body.lw-site.world-rhome.agencies-page .path-desc h4 {
  font-family: "Cinzel", "Georgia", serif;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 0;
  margin-bottom: 0.45rem;
  color: var(--rhome-parchment, #d9cab3);
}

/* Remove double borders when desc sits under table */
body.lw-site.world-rhome.agencies-page .detail-row .path-desc {
  margin-top: 0.25rem;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* =========================================
   Agencies-specific content blocks
   ========================================= */

/* Main content shell for Agencies pages (optional wrapper) */
body.lw-site.world-rhome.agencies-page .agencies-shell {
  max-width: var(--rhome-max-width-page, 960px);
  margin: 0 auto;
}

/* Section headers */
body.lw-site.world-rhome.agencies-page .agencies-shell h2,
body.lw-site.world-rhome.agencies-page .agencies-shell h3 {
  /* Cinzel already applied via theme-rhome, no override needed */
  color: var(--rhome-parchment, #d9cab3);
}

/* Small inline labels, uses Inter */
body.lw-site.world-rhome.agencies-page .agency-label {
  display: inline-block;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rhome-text-soft, #9b93b0);
}

/* Simple card-style wrapper for agency overviews */
body.lw-site.world-rhome.agencies-page .agency-card {
  background:
    radial-gradient(circle at 0 0, rgba(213, 128, 255, 0.12), transparent 55%),
    rgba(12, 7, 26, 0.98);
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.1rem 1.25rem;
  margin: 1.1rem 0;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.75);
}

body.lw-site.world-rhome.agencies-page .agency-card h3 {
  margin-top: 0;
  margin-bottom: 0.4rem;
}

body.lw-site.world-rhome.agencies-page .agency-card p {
  margin-bottom: 0.5rem;
}

.pillar-section-block {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.pillar-data-source {
  display: none;
}

/* Quote / mantra blocks for an Agency */
body.lw-site.world-rhome.agencies-page .agency-quote {
  margin: 1rem 0;
  padding: 0.75rem 0.95rem;
  border-left: 3px solid rgba(164, 82, 255, 0.85);
  background: rgba(7, 4, 16, 0.95);
  border-radius: 3px;
  font-style: italic;
  color: var(--rhome-text-soft, #9b93b0);
}

/* =========================================
   Utility alignment tweaks
   ========================================= */

body.lw-site.world-rhome.agencies-page .text-center {
  text-align: center;
}

body.lw-site.world-rhome.agencies-page .text-right {
  text-align: right;
}
