/* Elysium additions for the AIPKI template.
 * Only two jobs: style the JSON-rendered organisation blocks so they sit inside the existing
 * Quarto/Bootstrap look, and collapse the media boxes left behind by images this capture lost.
 * Colours come from currentColor so the theme's light and dark modes both work.
 */

/* ---- collapse empty media boxes (images that were never captured) ---- */
.card-img-top:empty,
.quarto-figure:empty,
figure.figure:empty,
.quarto-layout-cell:empty,
.quarto-layout-row:empty,
.quarto-layout-panel:empty,
.ely-person-photo:empty,
.ely-branch-logo:empty,
.ely-partner-logo:empty { display: none !important; }

.card-img-top:not(:has(img)),
figure.figure:not(:has(img)):not(:has(figcaption)),
.ely-person-photo:not(:has(img)),
.ely-branch-logo:not(:has(img)),
.ely-partner-logo:not(:has(img)) { display: none !important; }

/* ---- navbar brand fallback text (shown when the org has no logo) ---- */
.navbar-brand-logo .navbar-brand-text {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: .04em;
  color: inherit;
}

/* ---- footer organisation identity block (§2f) ---- */
.nav-footer .ely-footer-org {
  text-align: center;
  font-size: .85rem;
  line-height: 1.5;
  padding: .25rem 0;
}
.nav-footer .ely-footer-org .ely-footer-org-name {
  font-weight: 700;
  margin: 0 0 .25rem;
}
.nav-footer .ely-footer-org ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-footer .ely-footer-org li { margin: 0; }
.nav-footer .ely-footer-org .ely-label {
  opacity: .7;
  margin-right: .35rem;
}
.nav-footer .ely-footer-org a { color: inherit; }

/* ---- organisation sections on the Tentang / About page (§2c) ---- */
.ely-section { margin: 2.5rem 0; }
.ely-section-title {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid currentColor;
  border-color: color-mix(in srgb, currentColor 25%, transparent);
}
.ely-org-name { font-size: 1.1rem; font-weight: 600; }
.ely-org-abbr { font-weight: 400; opacity: .75; }

.ely-contact-list { list-style: none; margin: 0; padding: 0; }
.ely-contact-list .ely-line { display: flex; flex-wrap: wrap; gap: .5rem; padding: .25rem 0; }
.ely-contact-list .ely-label { min-width: 7.5rem; opacity: .7; }
.ely-contact-list .ely-value { flex: 1 1 16rem; }

.ely-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.ely-card {
  border: 1px solid currentColor;
  border-color: color-mix(in srgb, currentColor 18%, transparent);
  border-radius: .4rem;
  padding: .85rem 1rem;
}
.ely-card p { margin: 0 0 .25rem; }
.ely-card p:last-child { margin-bottom: 0; }

.ely-person-position { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; opacity: .7; }
.ely-person-name { font-weight: 600; }
.ely-person-photo img, .ely-branch-logo img, .ely-partner-logo img {
  max-width: 100%; max-height: 72px; object-fit: contain; margin-bottom: .5rem;
}

.ely-branch-name { font-weight: 600; }
.ely-branch-type { font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; opacity: .6; }
.ely-branch-address, .ely-branch-contact { font-size: .85rem; }

.ely-partner-link { display: block; text-decoration: none; color: inherit; }
.ely-partner-link:hover .ely-partner-name { text-decoration: underline; }
.ely-partner-name { font-weight: 600; }
.ely-partner-relation { font-size: .8rem; opacity: .75; margin-top: .35rem; }

/* ---- article references block (§1) ---- */
.ely-references { margin-top: 2.5rem; }
.ely-references-title { font-size: 1.1rem; margin-bottom: .5rem; }
.ely-references-list { padding-left: 1.25rem; font-size: .9rem; }

@media (max-width: 767px) {
  .ely-grid { grid-template-columns: 1fr; }
  .ely-contact-list .ely-line { flex-direction: column; gap: 0; }
  .ely-contact-list .ely-label { min-width: 0; }
}
