/* Add the Adobe Fonts kit used by nthistory.com above this line for exact Citrus Gothic rendering. */
@import url("https://fonts.googleapis.com/css2?family=League+Gothic&display=swap");

:root {
  color: #222;
  background: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

a {
  color: #336699;
}

a:hover,
a:focus-visible {
  color: #ff8000;
}

/* Standard North Tonawanda History app masthead */
.site-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: min(960px, calc(100% - 48px));
  margin: 0 auto;
  padding: 36px 0;
}

.site-logo-link {
  display: block;
  line-height: 0;
}

.site-logo {
  display: block;
  width: 70px;
  height: auto;
  margin-right: 0;
}

/* Citrus Gothic is the preferred masthead face. League Gothic is the web fallback. */
.site-title,
.app-name {
  font-family: "citrus-gothic", "Citrus Gothic", "League Gothic", Impact, sans-serif;
  font-weight: 400;
}

.site-title {
  color: #b60000;
  font-size: clamp(20px, 2.8vw, 30px);
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.site-title:hover,
.site-title:focus-visible {
  color: #333;
}

.app-name {
  color: #333;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.1;
  text-align: right;
  white-space: nowrap;
}

.page-shell {
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto;
  padding-bottom: 40px;
}

.intro {
  margin: 0 0 20px;
  text-align: center;
}

.err {
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid #f5b5b5;
  border-radius: 10px;
  background: #ffecec;
}

.meta {
  margin: 12px 0 16px;
  color: #444;
}

/* Search form */
.search-form {
  display: grid;
  gap: 22px;
}

.card {
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid #d7d7d7;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.05);
}

.row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.search-field {
  display: grid;
  gap: 7px;
}

.field-label {
  color: #222;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.15;
}

.field-hint {
  min-height: 1.25em;
  color: #555;
  font-size: 13px;
  line-height: 1.25;
}

.search-form input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 11px 13px;
  border: 2px solid #aaa;
  border-radius: 10px;
  background: #fff;
  color: #111;
  font: inherit;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.2;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.search-form input::placeholder {
  color: #777;
  font-weight: 400;
  opacity: 1;
}

.search-form input:hover {
  border-color: #777;
}

.search-form input:focus {
  border-color: #b60000;
  outline: 3px solid rgba(182, 0, 0, 0.16);
  outline-offset: 1px;
}

/* Make active filters unmistakable after a search or page reload. */
.search-form input.has-value,
.search-form input:not(:placeholder-shown) {
  border-color: #b60000;
  background: #fff7f2;
  color: #111;
  font-weight: 750;
  box-shadow: inset 5px 0 0 #b60000;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid #ddd;
}

button,
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 18px;
  border: 1px solid #bbb;
  border-radius: 10px;
  background: #f7f7f7;
  color: #222;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

button:hover,
button:focus-visible,
a.btn:hover,
a.btn:focus-visible {
  background: #ececec;
  color: #111;
  text-decoration: none;
}

button:focus-visible,
a.btn:focus-visible {
  outline: 3px solid rgba(182, 0, 0, 0.22);
  outline-offset: 2px;
}

.search-button {
  min-width: 160px;
  border: 2px solid #b60000;
  background: #b60000;
  color: #fff;
  font-family: "citrus-gothic", "Citrus Gothic", "League Gothic", Impact, sans-serif;
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.search-button:hover,
.search-button:focus-visible {
  border-color: #8d0000;
  background: #8d0000;
  color: #fff;
  transform: translateY(-1px);
}

.clear-button {
  background: #fff;
}

.results-count {
  margin-top: 18px;
  font-size: 15px;
}

/* Results table and column sorting */
.results-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #d6d6d6;
  border-radius: 12px;
}

.results-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  background: #fff;
}

.results-table th,
.results-table td {
  padding: 10px 12px;
  border-right: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  font-size: 13px;
  vertical-align: top;
}

.results-table th:last-child,
.results-table td:last-child {
  border-right: 0;
}

.results-table tbody tr:last-child td {
  border-bottom: 0;
}

.results-table th {
  position: sticky;
  top: 0;
  padding: 0;
  background: #f7f7f7;
  text-align: left;
}

.sort-link,
.sort-link:link,
.sort-link:visited {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 10px 12px;
  color: #b60000;
  font-family: "citrus-gothic", "Citrus Gothic", "League Gothic", Impact, sans-serif;
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.sort-link:hover,
.sort-link:focus-visible {
  background: #fff0f0;
  color: #8d0000;
  text-decoration: none;
}

.sort-link:focus-visible {
  outline: 3px solid rgba(182, 0, 0, 0.22);
  outline-offset: -3px;
}

.sort-link.is-active {
  background: #fff0f0;
  box-shadow: inset 0 -4px 0 #b60000;
}

.sort-order {
  color: #b60000;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.results-table tbody tr:nth-child(even) {
  background: #fafafa;
}

.results-table tbody tr:hover {
  background: #fff8f3;
}

.muted {
  color: #666;
  font-size: 13px;
}

.no-results {
  padding: 18px 0;
}

.col-3 {
  grid-column: span 3;
}

.col-4 {
  grid-column: span 4;
}

.col-6 {
  grid-column: span 6;
}

@media (max-width: 760px) {
  .site-header {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 16px;
    padding: 24px 0;
  }

  .site-logo {
    width: 64px;
  }

  .site-title {
    font-size: clamp(20px, 6vw, 30px);
    letter-spacing: 0.1em;
  }

  .app-name {
    grid-column: 1 / -1;
    padding-top: 4px;
    text-align: left;
  }

  .col-3,
  .col-4,
  .col-6 {
    grid-column: span 12;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .search-button,
  .clear-button {
    width: 100%;
  }

  .results-table th {
    position: static;
  }

  .sort-link {
    min-width: 130px;
  }
}

/* =========================================================
   Apps landing page
   Append this block to nthistory-app.css in the /apps/ folder.
   ========================================================= */

.apps-intro {
  max-width: 720px;
  margin: 0 auto 32px;
  text-align: center;
}

.apps-intro h1 {
  margin: 0 0 10px;
  color: #333;
  font-family: citrus-gothic, sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-style: normal;
  font-weight: 400;
  line-height: 1.05;
}

.apps-intro p {
  margin: 0;
  color: #555;
  font-size: 1rem;
  line-height: 1.55;
}

.app-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

.app-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #ddd;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 3px 12px rgb(0 0 0 / 7%);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.app-card:hover {
  border-color: #b60000;
  box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
  transform: translateY(-3px);
}

.app-card-link,
.app-card-link:link,
.app-card-link:visited {
  display: flex;
  height: 100%;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.app-card-link:focus-visible {
  outline: 4px solid rgb(182 0 0 / 25%);
  outline-offset: -4px;
}

.app-card-icon {
  display: grid;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 200px;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid #ddd;
  background:
    linear-gradient(145deg, #f7f7f7, #ececec);
}

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

.app-card-icon-placeholder {
  display: grid;
  width: 116px;
  height: 116px;
  place-items: center;
  border: 3px solid #b60000;
  border-radius: 50%;
  color: #b60000;
  font-family: citrus-gothic, sans-serif;
  font-size: 1.75rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.app-card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px;
}

.app-card-title {
  margin: 0 0 10px;
  color: #b60000;
  font-family: citrus-gothic, sans-serif;
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  font-style: normal;
  font-weight: 400;
  line-height: 1.05;
}

.app-card-description {
  flex: 1;
  margin: 0;
  color: #444;
  font-size: 0.96rem;
  line-height: 1.55;
}

.app-card-action {
  display: block;
  margin-top: 20px;
  color: #b60000;
  font-family: citrus-gothic, sans-serif;
  font-size: 1.05rem;
  font-style: normal;
  font-weight: 400;
}

.app-card-link:hover .app-card-title,
.app-card-link:hover .app-card-action,
.app-card-link:focus-visible .app-card-title,
.app-card-link:focus-visible .app-card-action {
  color: #333;
}

@media (max-width: 900px) {
  .app-card-grid {
    grid-template-columns: 1fr;
    max-width: 640px;
    margin: 0 auto;
  }

  .app-card-link {
    display: grid;
    grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
  }

  .app-card-icon {
    height: 100%;
    max-height: none;
    border-right: 1px solid #ddd;
    border-bottom: 0;
  }
}

@media (max-width: 560px) {
  .app-card-link {
    display: flex;
  }

  .app-card-icon {
    max-height: 190px;
    border-right: 0;
    border-bottom: 1px solid #ddd;
  }

  .app-card-content {
    padding: 20px;
  }
}

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

  .app-card:hover {
    transform: none;
  }
}


/* =========================================================
   Obituary Search results
   Append these rules to the shared nthistory-app.css file.
   ========================================================= */

.obituary-results {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.obituary-record {
  padding: 22px 24px;
  border: 1px solid #ddd;
  border-left: 5px solid #333;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgb(0 0 0 / 5%);
}

.obituary-name {
  margin: 0 0 16px;
  color: #b60000;
  font-family: citrus-gothic, sans-serif;
  font-size: clamp(1.2rem, 1.7vw, 1.4rem);
  font-style: normal;
  font-weight: 400;
  line-height: 1.1;
}

.obituary-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px 28px;
  margin: 0;
}

.obituary-field {
  min-width: 0;
  padding-top: 12px;
  border-top: 1px solid #e4e4e4;
}

.obituary-field dt {
  margin: 0 0 5px;
  color: #555;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.obituary-field dd {
  margin: 0;
  color: #222;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.obituary-field.is-additional-information dd {
  font-weight: 400;
}

@media (max-width: 600px) {
  .obituary-record {
    padding: 18px;
  }

  .obituary-fields {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}


#donate-button {
	width: 100%;
	text-align:center;
}
#donate-button img {
	max-width:200px;
}