/* Piedmont Rotary theme layer.
   Loads after the template's bootstrap.min.css and style.css, so anything here
   wins. Keep club-specific styling in this file and leave the two template
   stylesheets untouched apart from the colour substitution, which makes it easy
   to drop in an updated copy of the template later. */

/* Matches brandcenter.rotary.org/en-us/our-brand/brand-elements/colors.
   --rotary-slate is official Slate (#657F99), which is lighter than it looks
   here — on white it's ~4.16:1, just under the 4.5:1 AA text minimum. Every
   current use is small uppercase label/hint text, never body copy, so treat
   that as a known tradeoff rather than a bug; don't reach for a darker
   custom shade to "fix" it without checking with whoever owns the design. */
:root {
  --rotary-royal-blue: #17458f;
  --rotary-azure: #0067c8;
  --rotary-sky-blue: #00a2e0;
  --rotary-gold: #f7a81b;
  --rotary-cranberry: #d41367;
  --rotary-slate: #657f99;
  --rotary-ink: #1c2b39;
  --rotary-paper: #f4f7fb;
}

/* --- Typography ------------------------------------------------------------
   The template ships a script face (Playball) that reads as wedding catering.
   Rotary's own brand typography is Open Sans, so the body face already matches;
   Sanchez is the slab companion Rotary uses for headings. */

body {
  font-family:
    "Open Sans",
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: var(--rotary-ink);
}

h1,
h2,
h3,
.h1,
.h2,
.h3,
h4,
h5,
h6,
.h4,
.h5,
.h6 {
  font-family: "Sanchez", Georgia, "Times New Roman", serif !important;
  font-weight: 400 !important;
  color: var(--rotary-royal-blue);
  letter-spacing: -0.01em;
}

.display-1,
.display-2,
.display-3,
.display-4,
.display-5,
.display-6 {
  font-family: "Sanchez", Georgia, serif !important;
  font-weight: 400 !important;
  line-height: 1.15;
}

.lead {
  font-size: 1.15rem;
  line-height: 1.75;
}

a {
  color: var(--rotary-azure);
}

a:hover {
  color: var(--rotary-royal-blue);
}

/* --- Skip link ------------------------------------------------------------ */

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2000;
  background: var(--rotary-royal-blue);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0.4rem;
}

/* --- Navbar --------------------------------------------------------------- */

.nav-bar {
  background: #fff;
  box-shadow: 0 1px 0 rgba(23, 69, 143, 0.12);
}

.navbar-brand .brand-logo {
  height: 100px;
  width: auto;
  align-self: center;
}

/* The text block is stretched to the logo's height and split into three
   rows — empty, "Rotary", the club name — with the outer two equal, so
   "Rotary" sits on the wheel's centre line and the club name hangs below
   it, as in Rotary's club logo. If the club name is taller than the space
   below "Rotary", the 1fr rows grow together, so the block gets taller
   evenly above and below and "Rotary" stays centred on the wheel. */
.navbar-brand .brand-text {
  line-height: 1.1;
  display: grid;
  grid-template-columns: max-content;
  grid-template-rows: 1fr auto 1fr;
}

.navbar-brand .brand-tail {
  grid-row: 2;
}

.navbar-brand .brand-sub {
  grid-row: 3;
  display: block;
  min-width: 0;
}

/* Matching the Brand Center club logo examples: "Rotary" in a heavy
   sans-serif and the club name in a light one, both Royal Blue, with only
   the wheel in gold. Rotary's logo face (Frutiger) isn't a web font; Open
   Sans is the brand's approved alternative and already loaded. The sizes
   keep roughly the examples' proportions — "Rotary" about half the wheel's
   height, the club name a little over half of "Rotary". */
.navbar-brand .brand-tail {
  font-family: "Open Sans", system-ui, sans-serif;
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--rotary-royal-blue);
}

.navbar-brand .brand-lead {
  font-family: "Open Sans", system-ui, sans-serif;
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 1.1;
  color: var(--rotary-royal-blue);
}

/* The official Brand Center logo, when one has been added (layout.jsx). */
.navbar-brand .brand-official-logo {
  height: 100px;
  width: auto;
  align-self: center;
}

.navbar .navbar-nav .nav-link {
  color: var(--rotary-ink);
  font-size: 0.95rem;
}

.navbar .navbar-nav .nav-link.active {
  color: var(--rotary-royal-blue);
  border-bottom: 3px solid var(--rotary-gold);
}

/* Below the lg breakpoint the brand block (logo + three-line wordmark) was
   wide enough that the toggler button wrapped onto its own row below it.
   Bootstrap's navbar already wraps the *expanded menu panel* onto its own
   row correctly (it forces that with flex-basis: 100%) — the bug was that
   the brand + toggler pair, which should share one row, didn't fit on it.
   So shrink the brand and cap the wordmark to a fixed width with ellipsis
   truncation (rather than just letting it shrink) so that pair reliably
   fits together; don't force nowrap on the whole navbar, or the expanded
   menu panel loses its own line and squeezes in beside the brand instead
   of dropping below it. The fixed width cap (vs. shrink-only) matters
   because the web font loads with font-display: swap — before it swaps in,
   the fallback font can render wider, and a shrink-only layout would let
   that momentary width push the toggler onto its own row again instead of
   just truncating the text. */
@media (max-width: 991.98px) {
  .navbar-brand {
    gap: 0.5rem !important;
    min-width: 0;
  }

  /* Width is capped here, but not overflow: each line truncates itself
     (below), and the club name needs to show past the logo's edge. */
  .navbar-brand .brand-text {
    min-width: 0;
    max-width: 150px;
    grid-template-columns: minmax(0, 1fr);
  }

  .navbar-brand .brand-tail,
  .navbar-brand .brand-lead {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .navbar-brand .brand-logo {
    height: 48px;
    flex-shrink: 0;
  }

  .navbar-brand .brand-tail {
    font-size: 1.4rem;
  }

  .navbar-brand .brand-lead {
    font-size: 0.85rem;
  }

  .navbar-brand .brand-official-logo {
    height: 52px;
  }

  .navbar-toggler {
    flex-shrink: 0;
  }
}

@media (max-width: 380px) {
  .navbar-brand .brand-text {
    max-width: 120px;
  }
}

/* --- Auction banner --------------------------------------------------------- */

.auction-banner {
  background: var(--rotary-royal-blue);
  color: #fff;
  font-size: 0.9rem;
}

.auction-banner i {
  color: var(--rotary-gold);
}

/* --- Page header ---------------------------------------------------------- */

.page-header {
  background:
    linear-gradient(rgba(23, 69, 143, 0.65), rgba(23, 69, 143, 0.92)),
    var(--page-header-image) var(--page-header-position, center center) / cover
      no-repeat,
    var(--rotary-royal-blue);
}

.page-header h1 {
  color: #fff;
}

.page-header-lead {
  max-width: 46rem;
}

/* --- Home hero ------------------------------------------------------------ */

.home-hero {
  background:
    linear-gradient(rgba(23, 69, 143, 0.65), rgba(23, 69, 143, 0.92)),
    url("/img/home/ozark-heritage-festival.jpg") center center / cover no-repeat,
    var(--rotary-royal-blue);
  min-height: 65vh;
  display: flex;
  align-items: center;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.home-hero .eyebrow {
  letter-spacing: 0.12em;
}

.stat-figure {
  font-family: "Sanchez", Georgia, serif;
  font-size: 2.6rem;
  color: var(--rotary-royal-blue);
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--rotary-slate);
}

/* Compact variant for the portal dashboard, where six stat cards need to fit
   on one line instead of the two the full-size homepage figures need. */
.portal-stat-figure {
  font-size: 1.5rem;
}

.portal-stat-label {
  font-size: 0.7rem;
}

/* --- Cards and sections --------------------------------------------------- */

.section-heading-narrow {
  max-width: 44rem;
}

.avenue-card {
  height: 100%;
  border: 1px solid rgba(23, 69, 143, 0.12);
  border-radius: 10px;
  border-top: 4px solid var(--rotary-gold);
  background: #fff;
  transition:
    box-shadow 0.3s ease,
    transform 0.3s ease;
}

.avenue-card:hover {
  box-shadow: 0 12px 40px rgba(23, 69, 143, 0.12);
  transform: translateY(-3px);
}

.avenue-card .avenue-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(247, 168, 27, 0.18);
  color: var(--rotary-royal-blue);
  font-size: 1.25rem;
}

/* Object of Rotary on About Us: four points, each with an icon. */

.object-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(23, 69, 143, 0.12);
  border-left: 4px solid var(--rotary-gold);
  border-radius: 10px;
  background: #fff;
}

.object-icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(247, 168, 27, 0.18);
  color: var(--rotary-royal-blue);
  font-size: 1.15rem;
}

.object-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rotary-azure);
}

.fact-strip {
  background: var(--rotary-royal-blue);
  color: #fff;
}

.fact-strip h2,
.fact-strip h3,
.fact-strip h4 {
  color: #fff;
}

.fact-strip .stat-figure {
  color: var(--rotary-gold);
}

.fact-strip .stat-label {
  color: rgba(255, 255, 255, 0.75);
}

/* --- Auction -------------------------------------------------------------- */

/* Search box above the lots on the public auction page (AuctionSearch.jsx). */
.auction-search {
  max-width: 560px;
}
.auction-search-input {
  padding-left: 2.75rem;
}
.auction-search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--rotary-slate);
  pointer-events: none;
}

.lot-card {
  height: 100%;
  border: 1px solid rgba(23, 69, 143, 0.12);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.lot-card .lot-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--rotary-paper);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* On a lot that has sold: the corner of its photo, and beside the title in
   its pop-up. */
.lot-sold-tag {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 1;
  background: var(--rotary-cranberry);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}
.lot-sold-tag-inline {
  position: static;
  vertical-align: middle;
}

.lot-card .lot-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lot-card .lot-media .lot-placeholder {
  color: rgba(23, 69, 143, 0.28);
  font-size: 2.5rem;
}

.lot-media-grid {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
}

.lot-media-grid-2 {
  grid-template-rows: 1fr;
}

.lot-media-grid-3 .lot-media-grid-item:first-child {
  grid-column: 1 / 3;
}

.lot-media-grid-item {
  position: relative;
  overflow: hidden;
}

.lot-media-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lot-media-grid-more {
  position: absolute;
  inset: 0;
  background: rgba(23, 69, 143, 0.65);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.lot-card .lot-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.lot-number {
  font-family: "Sanchez", Georgia, serif;
  color: var(--rotary-gold);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lot-donor {
  font-size: 0.9rem;
  color: var(--rotary-slate);
}

.bid-line {
  background: var(--rotary-gold);
  color: var(--rotary-ink);
  border-radius: 10px;
}

.bid-line .bid-number {
  font-family: "Sanchez", Georgia, serif;
  font-size: 2rem;
  color: var(--rotary-royal-blue);
}

.lot-card-clickable {
  appearance: none;
  padding: 0;
  width: 100%;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition:
    box-shadow 0.3s ease,
    transform 0.3s ease;
}

.lot-card-clickable:hover,
.lot-card-clickable:focus-visible {
  box-shadow: 0 12px 40px rgba(23, 69, 143, 0.15);
  transform: translateY(-3px);
}

.lot-modal-media {
  background: var(--rotary-paper);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lot-modal-media img {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  display: block;
}

.lot-modal-media-extra {
  width: 140px;
  height: 140px;
  flex: 0 0 140px;
}

.lot-modal-media-extra img {
  height: 100%;
  max-height: none;
  object-fit: cover;
}

/* --- Portal --------------------------------------------------------------- */

.portal-shell {
  background: var(--rotary-paper);
  min-height: 70vh;
}

.portal-card {
  background: #fff;
  border: 1px solid rgba(23, 69, 143, 0.12);
  border-radius: 10px;
}

/* Main portal nav bar (PortalHeader.jsx): a Royal Blue bar of sections,
   with a lighter row of sub-pages beneath it inside a section that has
   them. Both scroll sideways on a phone rather than wrapping. */
.portal-nav {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(23, 69, 143, 0.12);
  background: #fff;
}

.portal-nav ul {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  list-style: none;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
}

.portal-nav li {
  flex: 0 0 auto;
}

.portal-nav-primary {
  background: var(--rotary-royal-blue);
}

.portal-nav-primary a {
  display: block;
  padding: 0.9rem 1.25rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.portal-nav-primary a:hover,
.portal-nav-primary a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.portal-nav-primary a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-bottom-color: var(--rotary-gold);
}

.portal-nav-sub {
  gap: 0.25rem;
  padding: 0.5rem 0.75rem !important;
}

.portal-nav-sub a {
  display: block;
  padding: 0.4rem 1rem;
  border-radius: 50rem;
  color: var(--rotary-ink);
  text-decoration: none;
  white-space: nowrap;
}

.portal-nav-sub a:hover,
.portal-nav-sub a:focus-visible {
  background: var(--rotary-paper);
  color: var(--rotary-royal-blue);
}

.portal-nav-sub a.active {
  background: rgba(23, 69, 143, 0.1);
  color: var(--rotary-royal-blue);
  font-weight: 600;
}

/* Messages and Sign out, top right of the portal. */
.portal-utility-link {
  color: var(--rotary-ink);
  text-decoration: none;
  padding: 0;
  border: 0;
}

.portal-utility-link:hover,
.portal-utility-link.active {
  color: var(--rotary-royal-blue);
  text-decoration: underline;
}

.officer-row {
  padding: 0.25rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background-color 0.15s ease;
}

.officer-row-drop-target {
  background: rgba(23, 69, 143, 0.06);
  border-color: rgba(23, 69, 143, 0.25);
}

.officer-drag-handle {
  cursor: grab;
  color: var(--rotary-slate);
  padding: 0 0.5rem;
  flex: 0 0 auto;
}

.officer-drag-handle:active {
  cursor: grabbing;
}

.portal-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rotary-slate);
  font-family: "Open Sans", sans-serif !important;
  font-weight: 700 !important;
}

.status-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.status-draft {
  background: #e9edf3;
  color: #4c5b6b;
}
/* Same colours as the status icons in the items table: Active green, Sold
   azure, Draft slate, Withdrawn red. */
.status-active {
  background: rgba(25, 135, 84, 0.12);
  color: #14663f;
}
.status-sold {
  background: rgba(0, 103, 200, 0.12);
  color: var(--rotary-azure);
}
.status-withdrawn {
  background: rgba(212, 19, 103, 0.1);
  color: var(--rotary-cranberry);
}

/* --- Items report (portal/report) -------------------------------------
   Printed to PDF from the browser. On screen it sits on a white "page" in
   the portal; in print, everything around it is hidden. */
.print-report {
  background: #fff;
  border: 1px solid rgba(23, 69, 143, 0.12);
  border-radius: 10px;
  padding: 2rem;
  color: var(--rotary-ink);
  font-size: 0.85rem;
}
.report-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 0.9rem;
  margin-bottom: 1rem;
  border-bottom: 3px solid var(--rotary-gold);
}
.report-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
}
.report-club {
  margin: 0;
  font-weight: 700;
  color: var(--rotary-royal-blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}
.report-title {
  margin: 0.1rem 0;
  font-size: 1.45rem;
  color: var(--rotary-royal-blue);
}
.report-filters {
  margin: 0;
  color: var(--rotary-slate);
}
.report-meta {
  margin: 0;
  text-align: right;
  font-size: 0.75rem;
  color: var(--rotary-slate);
  white-space: nowrap;
}
.report-summary {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.report-tile {
  border: 1px solid rgba(23, 69, 143, 0.15);
  border-radius: 6px;
  padding: 0.45rem 0.5rem;
  text-align: center;
}
.report-tile-value {
  font-weight: 700;
  font-size: 1rem;
  color: var(--rotary-royal-blue);
}
.report-tile-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rotary-slate);
}
.report-tile-strong {
  background: var(--rotary-royal-blue);
  border-color: var(--rotary-royal-blue);
}
.report-tile-strong .report-tile-value,
.report-tile-strong .report-tile-label {
  color: #fff;
}
/* One line per item: fixed column widths, nothing wraps, and text too long
   for its column ends in "…". Item has no set width and takes what's left,
   so it gets narrower when the Year and Night columns show. */
.report-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.report-table th,
.report-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.report-col-lot {
  width: 6.5%;
}
.report-col-donor {
  width: 12%;
}
/* Narrow on purpose: the CSV has contacts in full, and the space goes to
   Item. */
.report-col-contact {
  width: 8%;
}
.report-col-city {
  width: 7%;
}
.report-col-year,
.report-col-night {
  width: 4%;
}
.report-col-solicited,
.report-col-bidder {
  width: 9%;
}
.report-col-status {
  width: 6.5%;
}
.report-col-money {
  width: 6%;
}
.report-col-done {
  width: 3.5%;
}
.report-table th {
  background: var(--rotary-royal-blue);
  color: #fff;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.4rem 0.45rem;
  text-align: left;
}
.report-table td {
  padding: 0.35rem 0.45rem;
  border-bottom: 1px solid #e3e8ef;
  vertical-align: middle;
}
.report-table tbody tr:nth-child(even) td {
  background: #f6f8fb;
}
.report-table th.text-end,
.report-table td.text-end {
  text-align: right;
}
.report-table th.text-center,
.report-table td.text-center {
  text-align: center;
}
.report-table tfoot td {
  font-weight: 700;
  border-top: 2px solid var(--rotary-royal-blue);
  border-bottom: 0;
  background: none;
}
.report-lot {
  white-space: nowrap;
  font-weight: 600;
}
.report-item-title {
  font-weight: 600;
}
/* The category after the item name, and the phone after the contact, on
   the same line rather than beneath. */
.report-item-category,
.report-contact-phone {
  color: var(--rotary-slate);
}
.report-status {
  display: inline-block;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}
.report-muted {
  color: #b0bac6;
}
.report-empty {
  text-align: center;
  color: var(--rotary-slate);
  padding: 2rem 0;
}

@page {
  size: letter landscape;
  margin: 0.45in 0.4in;
  @bottom-right {
    content: "Page " counter(page) " of " counter(pages);
    font-family: "Open Sans", sans-serif;
    font-size: 8pt;
    color: #657f99;
  }
}

@media print {
  /* Only the report: no site header, footer, banners, portal nav or
     toolbar around it. */
  body:has(.print-report) > :not(main),
  body:has(.print-report) .portal-header,
  .no-print {
    display: none !important;
  }
  body:has(.print-report),
  body:has(.print-report) .portal-shell {
    background: #fff !important;
    padding: 0 !important;
    min-height: 0 !important;
  }
  body:has(.print-report) .portal-shell > .container {
    max-width: none;
    padding: 0;
  }
  /* Sized to fit landscape Letter: smaller type, tighter cells, and the
     summary tiles in a single row. */
  .print-report {
    border: 0;
    border-radius: 0;
    padding: 0;
    font-size: 7.5pt;
  }
  .report-header {
    gap: 0.6rem;
    padding-bottom: 0.5rem;
    margin-bottom: 0.6rem;
  }
  .report-logo {
    width: 40px;
    height: 40px;
  }
  .report-title {
    font-size: 14pt;
  }
  .report-meta {
    font-size: 7pt;
  }
  .report-summary {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 0.3rem;
    margin-bottom: 0.7rem;
  }
  .report-tile {
    padding: 0.25rem 0.35rem;
  }
  .report-tile-value {
    font-size: 9.5pt;
  }
  .report-tile-label {
    font-size: 6pt;
  }
  .report-table th {
    font-size: 6.5pt;
    padding: 0.25rem 0.3rem;
  }
  .report-table td {
    padding: 0.2rem 0.3rem;
  }
  .report-status {
    font-size: 6.5pt;
    padding: 0 0.35rem;
  }
  /* Keep the colours (status pills, header row) rather than letting the
     browser strip backgrounds to save ink. */
  .print-report,
  .print-report * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .report-table thead {
    display: table-header-group;
  }
  .report-table tfoot {
    display: table-row-group;
  }
  .report-table tr {
    break-inside: avoid;
  }
}

/* Item thumbnails on the auction admin page, which open a photo preview
   (PhotoPreview.jsx). A small badge shows how many photos there are. */
.photo-thumb-btn {
  position: relative;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 6px;
  cursor: zoom-in;
  line-height: 0;
}
.photo-thumb-btn:hover img,
.photo-thumb-btn:focus-visible img {
  outline: 2px solid var(--rotary-azure);
  outline-offset: 1px;
}
.photo-thumb-count {
  position: absolute;
  right: -5px;
  bottom: -5px;
  min-width: 1.05rem;
  padding: 0.1rem 0.25rem;
  border-radius: 999px;
  background: var(--rotary-royal-blue);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1;
}
.photo-preview .modal-body {
  background: #11161c;
  text-align: center;
}
.photo-preview-image {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
.photo-preview-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--rotary-royal-blue);
}
.photo-preview-nav:hover {
  background: #fff;
}
.photo-preview-nav.is-prev {
  left: 0.75rem;
}
.photo-preview-nav.is-next {
  right: 0.75rem;
}
.photo-preview-strip {
  display: flex;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  overflow-x: auto;
}
.photo-preview-strip button {
  flex: 0 0 auto;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  background: none;
  line-height: 0;
}
.photo-preview-strip button.is-current {
  border-color: var(--rotary-azure);
}
.photo-preview-strip img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 4px;
}

/* Full-window cover while a save-all runs (PendingEdits.jsx). */
.saving-overlay {
  position: fixed;
  inset: 0;
  z-index: 1060;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 22, 28, 0.45);
  cursor: progress;
}
.saving-overlay-card {
  width: min(20rem, calc(100vw - 2rem));
  padding: 1.75rem 1.5rem 1.5rem;
  border-radius: 12px;
  background: #fff;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.saving-overlay-text {
  font-weight: 600;
  color: var(--rotary-royal-blue);
}
.saving-overlay-progress {
  height: 0.5rem;
  border-radius: 999px;
  background: var(--rotary-paper);
}
.saving-overlay-progress .progress-bar {
  background: var(--rotary-royal-blue);
  transition: width 0.25s ease;
}

/* Pinned bottom-centre "Save all" once 2+ rows have unsaved edits
   (PendingEdits.jsx). */
.floating-save-all {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 1030;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.5rem 0.5rem 0.5rem 1.1rem;
  border-radius: 999px;
  background: var(--rotary-royal-blue);
  box-shadow: 0 6px 24px rgba(23, 69, 143, 0.35);
  animation: floating-save-in 0.18s ease-out;
}
.floating-save-all-count {
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}
@keyframes floating-save-in {
  from {
    opacity: 0;
    transform: translate(-50%, 0.75rem);
  }
}

/* "N rows have unsaved changes — Save all" above the items table. */
.pending-edits-bar {
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  background: rgba(247, 168, 27, 0.12);
  border-left: 4px solid var(--rotary-gold);
  font-size: 0.9rem;
}
.pending-edits-bar.has-problem {
  background: rgba(212, 19, 103, 0.08);
  border-left-color: var(--rotary-cranberry);
  color: var(--rotary-cranberry);
}

/* Filter row above the items (PortalItemFilters.jsx). */
.portal-filter {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.portal-filter-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--rotary-slate);
}
.portal-filter .form-select {
  width: auto;
  min-width: 8rem;
}
.portal-filter-search {
  flex: 1 1 14rem;
  max-width: 22rem;
}
.portal-filter-search .form-control {
  padding-left: 1.9rem;
}
.portal-search-icon {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  color: var(--rotary-slate);
  pointer-events: none;
}
.portal-filter .form-control.is-filtering {
  border-color: var(--rotary-royal-blue);
  background-color: rgba(23, 69, 143, 0.06);
}
/* A filter that's narrowing the list. */
.portal-filter .form-select.is-filtering {
  border-color: var(--rotary-royal-blue);
  background-color: rgba(23, 69, 143, 0.06);
  font-weight: 600;
}

/* --- Editable items table (ItemsTable.jsx) --------------------------------
   Every column is an input, sized in `ch` to the characters it needs to show
   (plus its padding), so the whole row fits without scrolling sideways on a
   typical desktop. The item name and winning bidder wrap onto more lines
   instead of widening the table. */
.items-edit-table {
  font-size: 0.875rem;
}
.items-edit-table th,
.items-edit-table td {
  padding-left: 0.2rem;
  padding-right: 0.2rem;
}
.items-edit-table th {
  white-space: nowrap;
}
/* The header row stays in view below the sticky site nav while the table
   scrolls (offset measured in ItemsTable.jsx). Border-collapse drops a
   sticky cell's border, so the rule under it is a shadow instead. */
.items-edit-table thead th {
  position: sticky;
  top: var(--items-sticky-top, 0px);
  z-index: 3;
  background-color: #fff;
  box-shadow: inset 0 -2px 0 rgba(23, 69, 143, 0.18);
}
.items-edit-table .form-control-sm,
.items-edit-table .form-select-sm {
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}
/* Selects need room for their arrow on the right; a smaller, tighter arrow
   lets the short ones stay narrow. */
.items-edit-table .form-select-sm {
  padding-right: 1.1rem;
  background-position: right 0.3rem center;
  background-size: 9px 7px;
}
/* No spinner arrows on the number inputs — they'd take more room than the
   digits. */
.items-edit-table input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.items-edit-table input[type="number"]::-webkit-inner-spin-button,
.items-edit-table input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
/* Room for a full "2026-018". */
.items-input-lot {
  width: calc(8ch + 0.8rem);
}
.items-input-title,
.items-input-bidder {
  resize: none;
  line-height: 1.3;
  /* Grows a line at a time to fit what's typed, where supported. */
  field-sizing: content;
  min-height: calc(1.3em + 0.6rem);
}
/* Most item names are short; longer ones wrap onto another line rather
   than widening the column. */
.items-input-title {
  width: 8.5rem;
}
.items-input-category {
  width: 8.5rem;
}
/* Fixed widths, with "…" where the text runs past the box (until it's
   clicked into). The full value is in each input's tooltip. */
.items-input-donor,
.items-input-city,
.items-input-solicited {
  text-overflow: ellipsis;
}
.items-input-donor {
  width: 7.5rem;
}
.items-input-city {
  width: 6rem;
}
.items-input-solicited {
  width: 6.5rem;
}
.items-input-year {
  width: calc(4ch + 0.8rem);
}
/* No dropdown arrow — a single digit reads fine without it, and the column
   stays narrow. Still opens the list on click. */
.items-edit-table .items-input-night {
  width: calc(1ch + 1rem);
  background-image: none;
  padding-right: 0.35rem;
  text-align: center;
  text-align-last: center;
}
.items-status-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  font-size: 1.05rem;
  border-radius: 6px;
}
.items-status-picker:hover,
.items-status-picker:focus-within {
  background: var(--rotary-paper);
}
.items-status-picker:focus-within {
  outline: 2px solid var(--rotary-azure);
  outline-offset: 1px;
}
.items-status-picker select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 1rem;
}
.items-status-active {
  color: #198754;
}
.items-status-sold {
  color: var(--rotary-azure);
}
.items-status-draft {
  color: var(--rotary-slate);
}
.items-status-withdrawn {
  color: #dc3545;
}
.items-input-money {
  flex-wrap: nowrap;
}
.items-input-money .input-group-text {
  padding-left: 0.3rem;
  padding-right: 0.3rem;
}
.items-input-money .form-control {
  width: calc(4ch + 0.8rem);
  flex: 0 0 auto;
}
.items-input-bidder {
  min-width: 7rem;
}
.items-input-complete {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  cursor: pointer;
}
.items-save-btn {
  min-width: 4.5rem;
}

/* Sortable column headers. */
.items-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  white-space: nowrap;
}
.items-sort-btn:hover,
.items-sort-btn.is-active {
  color: var(--rotary-royal-blue);
}
.items-sort-icon {
  font-size: 0.8em;
  opacity: 0.4;
}
.items-sort-btn:hover .items-sort-icon,
.items-sort-btn.is-active .items-sort-icon {
  opacity: 1;
}

/* A row with unsaved edits. */
.items-row-dirty > td {
  background-color: rgba(247, 168, 27, 0.1);
}
.items-row-dirty > td:first-child {
  box-shadow: inset 3px 0 0 var(--rotary-gold);
}

.items-row-error > td {
  color: var(--rotary-cranberry);
  font-size: 0.85rem;
  border-top: 0;
  padding-top: 0;
}

/* --- Analysis bars ----------------------------------------------------------
   Plain divs rather than a charting library, in keeping with the "no runtime
   dependencies beyond next/react/react-dom" rule. Azure and cranberry are the
   only brand hues that pass validate_palette.js as a categorical pair against
   the site's light background (royal blue and gold both fail lightness/
   contrast as fills — they stay reserved for buttons and text). */

.chart-row + .chart-row {
  margin-top: 0.6rem;
}

.chart-row-label {
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.2rem;
}

.chart-track {
  position: relative;
  height: 10px;
  background: var(--rotary-paper);
  border-radius: 999px;
  overflow: hidden;
}

.chart-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--rotary-azure);
}

.diverging-track {
  position: relative;
  height: 10px;
  background: var(--rotary-paper);
  border-radius: 999px;
}

.diverging-fill {
  position: absolute;
  top: 0;
  height: 100%;
}

.diverging-fill-positive {
  left: 50%;
  border-radius: 0 999px 999px 0;
  background: var(--rotary-azure);
}

.diverging-fill-negative {
  right: 50%;
  border-radius: 999px 0 0 999px;
  background: var(--rotary-cranberry);
}

.diverging-zero {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: var(--rotary-slate);
}

.form-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--rotary-ink);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--rotary-azure);
  box-shadow: 0 0 0 0.2rem rgba(0, 103, 200, 0.15);
}

.field-hint {
  font-size: 0.82rem;
  color: var(--rotary-slate);
}

.alert-soft {
  border: 1px solid rgba(212, 19, 103, 0.35);
  background: rgba(212, 19, 103, 0.06);
  color: #8d0b45;
  border-radius: 8px;
}

/* --- Footer --------------------------------------------------------------- */

.footer {
  background: var(--rotary-paper) !important;
}

.copyright {
  background: var(--rotary-royal-blue);
}

.copyright .text-body {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* --- Scroll reveal --------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.reveal-visible {
  opacity: 1;
  transform: none;
}

/* --- Utilities the template relies on ------------------------------------- */

.mt-6 {
  margin-top: 6rem;
}
.mb-6 {
  margin-bottom: 6rem;
}

@media (max-width: 991.98px) {
  .py-6 {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }
  .my-6 {
    margin-top: 3.5rem;
    margin-bottom: 3.5rem;
  }
  .mt-6 {
    margin-top: 3.5rem;
  }
  .navbar .navbar-nav .nav-link.active {
    border-bottom: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* --- Photographs ---------------------------------------------------------- */

.photo {
  overflow: hidden;
  border-radius: 10px;
  background: var(--rotary-paper);
  margin: 0;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-card {
  background: #fff;
  border: 1px solid rgba(23, 69, 143, 0.12);
  border-radius: 10px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.photo-card .photo {
  border-radius: 0;
}

.photo-card .photo img {
  transition: transform 0.4s ease;
}

.photo-card .photo:hover img {
  transform: scale(1.08);
}

.photo-card figcaption {
  padding: 1rem 1.15rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--rotary-ink);
}

.highlight-strip .photo {
  border-radius: 10px;
}

.highlight-strip .photo img {
  transition: transform 0.4s ease;
}

.highlight-strip .photo:hover img {
  transform: scale(1.08);
}

.highlight-strip figcaption {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rotary-slate);
}

.news-photo {
  border-radius: 10px 10px 0 0;
}

.event-thumb {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--rotary-paper);
}

.event-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sidebar-sticky {
  position: sticky;
  top: 160px;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
}

@media (max-width: 991.98px) {
  .sidebar-sticky {
    position: static;
    max-height: none;
    overflow-y: visible;
  }
}

/* --- Home page slideshow ---------------------------------------------------
   The alternative to the photo panel under the stat bar (set in the portal).
   Slides are stacked and cross-faded rather than slid, so every photo keeps
   the same frame no matter its original shape. */

.slideshow-frame {
  position: relative;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  border-radius: 10px;
  background: var(--rotary-paper);
}

.slideshow-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.8s ease,
    visibility 0.8s;
}

.slideshow-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.slideshow-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slideshow .slideshow-slide figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 2.5rem 1.5rem 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: #fff;
  font-size: 0.95rem;
}

.slideshow-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--rotary-royal-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
}

.slideshow-arrow:hover,
.slideshow-arrow:focus-visible {
  background: #fff;
}

.slideshow-prev {
  left: 1rem;
}

.slideshow-next {
  right: 1rem;
}

.slideshow-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.slideshow-pause {
  border: 0;
  background: none;
  color: var(--rotary-slate);
  padding: 0 0.5rem;
  font-size: 0.8rem;
}

.slideshow-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(23, 69, 143, 0.25);
  transition: background-color 0.2s ease;
}

.slideshow-dot.is-active {
  background: var(--rotary-royal-blue);
}

@media (max-width: 767.98px) {
  .slideshow-frame {
    aspect-ratio: 4 / 3;
  }

  .slideshow-arrow {
    width: 36px;
    height: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slideshow-slide {
    transition: none;
  }
}

/* Thumbnail beside each row of the portal's home photos form. */
.home-photo-thumb {
  position: relative;
  width: 96px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--rotary-paper);
  color: var(--rotary-slate);
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-photo-thumb-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.65);
  color: var(--rotary-royal-blue);
}

/* Optional short label (e.g. an avenue name) above a slideshow caption. */
.slideshow-label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rotary-gold);
}

/* "Join Us! / Request Assistance?" — light text links beside the main nav
   (quickLinks in src/content/site.js). Stacked on desktop; a single row in
   the collapsed mobile menu. */
.nav-quick-links {
  display: flex;
  gap: 1rem;
  padding: 0.5rem 0 0.75rem;
}

.nav-quick-links a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--rotary-azure);
  text-decoration: none;
  white-space: nowrap;
}

.nav-quick-links a:hover,
.nav-quick-links a:focus-visible {
  color: var(--rotary-royal-blue);
  text-decoration: underline;
}

/* Desktop nav items never wrap their own text ("About / Us"). From 1400px
   up the whole menu fits on one line beside the logo. From 992 to 1399px it
   doesn't (checked at 1000, 1200 and 1280px), so the menu splits onto two
   centred lines at .nav-line-break — first half of the links on top,
   the rest plus the quick links below — with Admin Login centred beside
   both. The header stays the logo's height either way. */
@media (min-width: 992px) {
  .navbar .navbar-nav .nav-link,
  .nav-bar .btn {
    white-space: nowrap;
  }

  .nav-bar .navbar-collapse {
    align-items: center;
  }

  .nav-quick-links {
    flex-direction: column;
    justify-content: center;
    gap: 0.1rem;
    padding: 0 0 0 1rem;
    margin-left: 1rem;
    border-left: 1px solid rgba(23, 69, 143, 0.15);
    line-height: 1.3;
  }

  .nav-quick-links a {
    font-size: 0.78rem;
  }
}

.nav-line-break {
  display: none;
}

@media (min-width: 992px) and (max-width: 1399.98px) {
  .nav-bar .navbar-nav {
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    row-gap: 0.15rem;
  }

  .nav-line-break {
    display: block;
    flex-basis: 100%;
    height: 0;
  }

  .nav-bar .navbar-nav .nav-link {
    padding-top: 6px;
    padding-bottom: 6px;
  }

  /* Side by side here, since they share a line with the other links. */
  .nav-quick-links {
    flex-direction: row;
    gap: 0.75rem;
  }
}

/* The narrowest desktop range (960px container) needs everything a little
   tighter for the second line to fit beside the logo (checked at 1000px). */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .nav-bar .navbar-nav .nav-link {
    padding-left: 8px;
    padding-right: 8px;
  }

  .nav-quick-links {
    gap: 0.5rem;
    margin-left: 0.5rem;
    padding-left: 0.5rem;
  }

  .nav-bar .btn.ms-lg-4 {
    margin-left: 0.75rem !important;
  }
}

/* In-page anchors (e.g. /about#join) land below the sticky header instead
   of underneath it. */
[id] {
  scroll-margin-top: 90px;
}

@media (min-width: 992px) {
  [id] {
    scroll-margin-top: 180px;
  }
}

/* --- Avenue galleries (What We Do) ----------------------------------------
   Up to four square thumbnails under each avenue's text, opening a
   full-screen viewer (AvenueGallery.jsx). */

.avenue-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 520px;
}

.avenue-gallery-thumb {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--rotary-paper);
  cursor: pointer;
}

.avenue-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.avenue-gallery-thumb:hover img,
.avenue-gallery-thumb:focus-visible img {
  transform: scale(1.08);
}

.avenue-gallery-thumb:focus-visible {
  outline: 3px solid var(--rotary-gold);
  outline-offset: 2px;
}

.gallery-play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  padding-left: 2px;
  pointer-events: none;
}

/* The same badge, on the portal form's row thumbnails. */
.gallery-play-badge-sm {
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
}

.gallery-viewer {
  position: fixed;
  inset: 0;
  /* Above the cookie banner (2000), which would otherwise cover its foot. */
  z-index: 2100;
  background: rgba(10, 20, 35, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 4.5rem;
}

.gallery-viewer-stage {
  margin: 0;
  width: 100%;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-viewer-media {
  width: 100%;
  display: flex;
  justify-content: center;
}

.gallery-viewer-media img {
  max-width: 100%;
  max-height: calc(100vh - 11rem);
  object-fit: contain;
  border-radius: 6px;
}

.gallery-viewer-media .ratio {
  max-width: min(100%, calc((100vh - 11rem) * 16 / 9));
}

.gallery-viewer-stage figcaption {
  margin-top: 1rem;
  color: #fff;
  text-align: center;
  font-size: 0.95rem;
  max-width: 760px;
}

.gallery-viewer-count {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--rotary-gold);
}

.gallery-viewer-close,
.gallery-viewer-arrow {
  position: absolute;
  border: 0;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
}

.gallery-viewer-close:hover,
.gallery-viewer-arrow:hover,
.gallery-viewer-close:focus-visible,
.gallery-viewer-arrow:focus-visible {
  background: rgba(255, 255, 255, 0.3);
}

.gallery-viewer-close {
  top: 1rem;
  right: 1rem;
}

.gallery-viewer-arrow {
  top: 50%;
  transform: translateY(-50%);
}

.gallery-viewer-prev {
  left: 1rem;
}

.gallery-viewer-next {
  right: 1rem;
}

@media (max-width: 767.98px) {
  .avenue-gallery {
    gap: 0.5rem;
  }

  .gallery-viewer {
    padding: 3.5rem 0.75rem 4.5rem;
  }

  /* Arrows move below the photo on phones so they don't cover it. */
  .gallery-viewer-arrow {
    top: auto;
    bottom: 1rem;
    transform: none;
  }

  .gallery-viewer-prev {
    left: calc(50% - 54px);
  }

  .gallery-viewer-next {
    right: calc(50% - 54px);
  }
}

/* --- News order (portal) ---------------------------------------------------
   Drag-and-drop list on /portal/news (NewsOrderList.jsx); reuses the board
   member row styles (.officer-row) for the drag handle and drop target. */

.news-order-row {
  padding: 0.6rem 0.5rem;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(23, 69, 143, 0.12);
}

.news-order-featured {
  border-color: var(--rotary-gold);
  background: rgba(247, 168, 27, 0.08);
}

.news-order-badge {
  display: inline-block;
  margin-bottom: 0.15rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9a6400;
}

.news-order-noimage {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: var(--rotary-paper);
  color: var(--rotary-slate);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Area of Focus cards (Rotary Worldwide) --------------------------------
   An optional banner photo across the top of the card, set in Portal → Site
   settings; the card's padding moves inside so the photo runs edge to edge. */

.focus-card {
  overflow: hidden;
  padding: 0;
}

.focus-card-banner {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

/* The portal form's preview, at the same shape as the banner. */
.focus-banner-thumb {
  width: 160px;
  aspect-ratio: 16 / 7;
  border-radius: 6px;
  overflow: hidden;
  background: var(--rotary-paper);
  display: flex;
  align-items: center;
  justify-content: center;
}

.focus-banner-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.focus-banner-thumb img.focus-banner-thumb-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  opacity: 0.4;
}

/* --- Share buttons (ShareButtons.jsx) ---------------------------------------
   Plain links to each network's share page — no third-party widgets. */

.share-row-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rotary-slate);
  margin-right: 0.25rem;
}

.share-icon-button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(23, 69, 143, 0.25);
  color: var(--rotary-royal-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.share-icon-button:hover,
.share-icon-button:focus-visible {
  background: var(--rotary-royal-blue);
  color: #fff;
}

.share-compact {
  position: relative;
  flex-shrink: 0;
}

.share-compact-toggle {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--rotary-slate);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.share-compact-toggle:hover,
.share-compact-toggle:focus-visible,
.share-compact-toggle[aria-expanded="true"] {
  background: rgba(23, 69, 143, 0.08);
  color: var(--rotary-royal-blue);
}

.share-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  min-width: 170px;
  padding: 0.35rem;
  background: #fff;
  border: 1px solid rgba(23, 69, 143, 0.15);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(23, 69, 143, 0.15);
  display: flex;
  flex-direction: column;
}

.share-menu a,
.share-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.45rem 0.65rem;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--rotary-ink);
  font-size: 0.875rem;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
}

.share-menu a:hover,
.share-menu button:hover,
.share-menu a:focus-visible,
.share-menu button:focus-visible {
  background: var(--rotary-paper);
  color: var(--rotary-royal-blue);
}

.share-menu i {
  width: 1rem;
  text-align: center;
}

.news-title-link {
  color: inherit;
  text-decoration: none;
}

.news-title-link:hover,
.news-title-link:focus-visible {
  color: var(--rotary-royal-blue);
  text-decoration: underline;
}

/* --- Item editor pop-up: "more below" hint --------------------------------
   Sits stuck to the bottom of the scrolling modal body, taking no space of
   its own; the fade and button show only while there's more to scroll to. */
.modal-scroll-hint {
  position: sticky;
  bottom: -1.5rem; /* the modal body's p-4 bottom padding */
  height: 0;
  margin: 0 -1.5rem;
  pointer-events: none;
}
.modal-scroll-hint::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4.5rem;
  background: linear-gradient(rgba(255, 255, 255, 0), #fff 85%);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.modal-scroll-hint .btn {
  position: absolute;
  left: 50%;
  bottom: 0.75rem;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.modal-scroll-hint.is-visible::before,
.modal-scroll-hint.is-visible .btn {
  opacity: 1;
}
.modal-scroll-hint.is-visible .btn {
  pointer-events: auto;
}

/* --- Portal → Logs ---------------------------------------------------------- */

.logs-table {
  font-size: 0.875rem;
}
.logs-summary {
  min-width: 16rem;
  overflow-wrap: anywhere;
}
.logs-action {
  display: inline-block;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: rgba(101, 127, 153, 0.14);
  color: var(--rotary-ink);
}
.logs-area-auction {
  background: rgba(247, 168, 27, 0.2);
}
.logs-area-content {
  background: rgba(0, 162, 224, 0.15);
}
.logs-area-settings,
.logs-area-users {
  background: rgba(23, 69, 143, 0.12);
  color: var(--rotary-royal-blue);
}
.logs-action.logs-warn {
  background: rgba(212, 19, 103, 0.14);
  color: var(--rotary-cranberry);
}
