@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;800&family=Barlow:wght@400;500;600&display=swap');

:root {
  --pr-navy:      #2B3990;
  --pr-navy-dark: #1e2a6e;
  --pr-orange:    #E8451A;
  --pr-orange-dk: #c73510;
  --pr-white:     #FFFFFF;
  --pr-off-white: #F4F5F7;
  --pr-light:     #E8EAF0;
  --pr-mid-gray:  #8a8fa8;
  --pr-dark:      #1A1C2E;
  --pr-text:      #2c2f45;
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body:    'Barlow', sans-serif;
  --max-width:    1200px;
  --radius:       4px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; height: 100%; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--pr-text);
  background: var(--pr-white);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }

/* ---- Global link style: dark, not blue ---- */
a { color: var(--pr-text); text-decoration: underline; text-decoration-color: transparent; transition: color .2s, text-decoration-color .2s; }
a:hover { color: var(--pr-orange); text-decoration-color: var(--pr-orange); }
a:focus-visible { outline: 3px solid var(--pr-orange); outline-offset: 2px; border-radius: 2px; }

/* ---- Global form resets: kill browser blue everywhere ---- */
input, textarea, select, button {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--pr-text);
  background: var(--pr-white);
  border: 2px solid var(--pr-light);
  border-radius: var(--radius);
  outline: none;
  box-sizing: border-box;
  accent-color: var(--pr-dark);
}
input:focus, textarea:focus, select:focus { border-color: var(--pr-dark); box-shadow: none; }
button { background: var(--pr-dark); color: #fff; border-color: var(--pr-dark); cursor: pointer; padding: .5rem 1rem; transition: background .2s, border-color .2s; }
button:hover { background: var(--pr-text); border-color: var(--pr-text); }
label { color: var(--pr-text); }

h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; color: var(--pr-dark); letter-spacing: .01em; }
h1 { font-size: clamp(2rem,5vw,3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem,3vw,2.2rem); }
h3 { font-size: 1.5rem; } h4 { font-size: 1.25rem; } h5 { font-size: 1.1rem; }
p { margin-bottom: 1rem; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
blockquote { border-left: 4px solid var(--pr-orange); padding: .75rem 1.25rem; margin: 1.5rem 0; background: var(--pr-off-white); font-style: italic; }
hr { border: none; border-top: 2px solid var(--pr-light); margin: 2rem 0; }

/* ---- Skip link ---- */
.skip-link { position: absolute; top: -100%; left: 1rem; background: var(--pr-orange); color: #fff; padding: .5rem 1rem; font-family: var(--font-display); font-weight: 700; text-decoration: none; border-radius: 0 0 var(--radius) var(--radius); z-index: 9999; transition: top .2s; }
.skip-link:focus { top: 0; }

/* ---- Container ---- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

/* ---- Header ---- */
#header { background: var(--pr-dark); position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 12px rgba(27,35,90,.25); }
#header .container { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 1rem; }

#site-title { flex-shrink: 0; }
#site-title a { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: #fff; font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
#site-title img { height: 44px; width: auto; }

/* ---- Nav toggle ---- */
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; border-radius: var(--radius); }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; }
.nav-toggle:hover { background: none; }

/* ---- Primary nav ---- */
#primary-nav { flex: 1; display: flex; justify-content: flex-end; }
#primary-nav ul { list-style: none; padding: 0; margin: 0; display: flex; align-items: center; }
#primary-nav > ul > li { position: relative; }
#primary-nav > ul > li > a { display: flex; align-items: center; padding: 0 1.1rem; height: 72px; font-family: var(--font-display); font-size: 1rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.88); text-decoration: none; border-bottom: 3px solid transparent; transition: color .2s, border-color .2s, background .2s; }
#primary-nav > ul > li > a:hover,
#primary-nav > ul > li.active > a { color: #fff; border-bottom-color: var(--pr-orange); background: rgba(255,255,255,.06); }

/* Dropdown */
#primary-nav ul ul { position: absolute; top: 100%; left: 0; background: var(--pr-navy-dark); min-width: 220px; border-top: 3px solid var(--pr-orange); box-shadow: 0 4px 20px rgba(27,35,90,.2); list-style: none; padding: .5rem 0; margin: 0; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s, transform .2s, visibility .2s; z-index: 100; }
#primary-nav ul li:hover > ul,
#primary-nav ul li:focus-within > ul { opacity: 1; visibility: visible; transform: translateY(0); }
#primary-nav ul ul li a { display: block; padding: .6rem 1.25rem; font-family: var(--font-display); font-size: .9rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: rgba(255,255,255,.8); text-decoration: none; transition: background .2s, padding-left .2s; }
#primary-nav ul ul li a:hover { background: var(--pr-orange); color: #fff; padding-left: 1.5rem; }

/* ---- Banner ---- */
#banner img { width: 100%; max-height: 320px; object-fit: cover; object-position: center; }

/* ---- Main content ---- */
#content { padding: 3rem 0 4rem; flex: 1 0 auto; }

/* ---- Page title ---- */
.page-title { margin-bottom: 2rem; padding-bottom: 1.25rem; border-bottom: 3px solid var(--pr-light); position: relative; }
.page-title::after { content: ''; position: absolute; bottom: -3px; left: 0; width: 60px; height: 3px; background: var(--pr-orange); }
.page-title h1 { font-size: clamp(1.75rem,4vw,2.75rem); color: var(--pr-dark); text-transform: uppercase; }

/* ---- Resource browse cards ---- */
.resource-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 1.5rem; list-style: none; padding: 0; margin: 0; }
.resource-list li { margin: 0; }
.resource { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 8px rgba(27,35,90,.1); border: 1px solid var(--pr-light); text-decoration: none; color: var(--pr-text); transition: transform .2s, box-shadow .2s, border-color .2s; }
.resource:hover { transform: translateY(-4px); box-shadow: 0 4px 20px rgba(27,35,90,.14); border-color: var(--pr-mid-gray); }
.resource .thumbnail { aspect-ratio: 4/3; overflow: hidden; background: var(--pr-light); }
.resource .thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.resource:hover .thumbnail img { transform: scale(1.04); }
.resource .body { padding: 1.1rem 1.25rem; flex: 1; display: flex; flex-direction: column; }
.resource h4, .resource .title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--pr-dark); margin-bottom: .4rem; line-height: 1.25; }
.resource:hover h4, .resource:hover .title { color: var(--pr-orange); }
.resource .description { font-size: .9rem; color: var(--pr-mid-gray); line-height: 1.5; flex: 1; }

/* ---- Item browse list (Omeka default li.item.resource layout) ---- */
ul.resource-list { list-style: none; padding: 0; margin: 0 0 2rem; display: flex; flex-direction: column; gap: 1rem; }
ul.resource-list li.item.resource {
  display: flex;
  flex-direction: column;
  background: var(--pr-white);
  border: 1px solid var(--pr-light);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 4px rgba(27,35,90,.06);
  transition: box-shadow .2s, border-color .2s;
  list-style: none;
}
ul.resource-list li.item.resource:hover { box-shadow: 0 3px 12px rgba(27,35,90,.11); border-color: var(--pr-mid-gray); }
ul.resource-list li.item.resource a.resource-link {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--pr-dark);
  text-decoration: none;
  margin-bottom: .35rem;
  display: block;
}
ul.resource-list li.item.resource a.resource-link:hover { color: var(--pr-orange); }
ul.resource-list li.item.resource .description {
  font-size: .875rem;
  color: var(--pr-mid-gray);
  line-height: 1.55;
  white-space: pre-line;
}

/* ---- Properties (item show) ---- */
.property { margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--pr-light); }
.property:last-child { border-bottom: none; }
.property h4 { font-family: var(--font-display); font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--pr-orange); margin-bottom: .35rem; }

/* ---- Pagination ---- */
.pagination { display: flex; align-items: center; justify-content: center; gap: .4rem; margin: 2.5rem 0; flex-wrap: wrap; list-style: none; padding: 0; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 2.5rem; height: 2.5rem; padding: 0 .75rem; font-family: var(--font-display); font-size: .9rem; font-weight: 700; border: 2px solid var(--pr-light); border-radius: var(--radius); color: var(--pr-text); text-decoration: none; transition: all .2s; background: var(--pr-white); }
.pagination a:hover { background: var(--pr-dark); border-color: var(--pr-dark); color: #fff; }
.pagination .active, .pagination .current { background: var(--pr-orange); border-color: var(--pr-orange); color: #fff; }

/* ---- Browse controls bar ---- */
.browse-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--pr-light);
}
.browse-controls .pagination { display: flex; align-items: center; gap: .5rem; margin: 0; flex-wrap: wrap; }
.browse-controls .pagination input[type="text"] {
  width: 3.5rem;
  padding: .4rem .5rem;
  border: 2px solid var(--pr-light);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: .9rem;
  font-weight: 700;
  color: var(--pr-text);
  text-align: center;
}
.browse-controls .pagination .page-count,
.browse-controls .pagination .row-count { font-family: var(--font-display); font-size: .9rem; color: var(--pr-mid-gray); }
.browse-controls .pagination-buttons { display: flex; gap: .4rem; }
.browse-controls .pagination-buttons a,
.browse-controls .pagination-buttons span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.25rem; height: 2.25rem; padding: 0 .6rem;
  border: 2px solid var(--pr-light); border-radius: var(--radius);
  font-family: var(--font-display); font-size: .85rem; font-weight: 700;
  color: var(--pr-text); text-decoration: none; background: var(--pr-white);
  transition: all .2s;
}
.browse-controls .pagination-buttons a:hover { background: var(--pr-dark); border-color: var(--pr-dark); color: #fff; }
.browse-controls .pagination-buttons span.inactive { color: var(--pr-light); border-color: var(--pr-light); cursor: default; pointer-events: none; }

.browse-controls .advanced-search {
  font-family: var(--font-display); font-size: .85rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--pr-text); text-decoration: none;
  border: 2px solid var(--pr-light); border-radius: var(--radius);
  padding: .4rem .85rem; background: var(--pr-white);
  transition: all .2s; white-space: nowrap; display: inline-block;
}
.browse-controls .advanced-search:hover { background: var(--pr-dark); border-color: var(--pr-dark); color: #fff; }

.browse-controls .sorting { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.browse-controls .sorting select { padding: .45rem .75rem; }
.browse-controls .sorting button[type="submit"] {
  padding: .45rem 1rem;
  font-family: var(--font-display); font-size: .85rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
}

/* ---- Search ---- */
.search-form { display: flex; max-width: 600px; margin-bottom: 2rem; }
.search-form input[type="text"], .search-form input[type="search"] { flex: 1; padding: .75rem 1rem; border: 2px solid var(--pr-light); border-right: none; border-radius: var(--radius) 0 0 var(--radius); }
.search-form button, .search-form input[type="submit"] { background: var(--pr-orange); color: #fff; border: none; padding: .75rem 1.5rem; border-radius: 0 var(--radius) var(--radius) 0; font-family: var(--font-display); font-size: 1rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; transition: background .2s; }
.search-form button:hover, .search-form input[type="submit"]:hover { background: var(--pr-orange-dk); }

/* ---- Buttons ---- */
.button, .btn { display: inline-flex; align-items: center; gap: .4rem; padding: .65rem 1.5rem; background: var(--pr-dark); color: #fff; font-family: var(--font-display); font-size: .9rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; text-decoration: none; border: 2px solid var(--pr-dark); border-radius: var(--radius); cursor: pointer; transition: all .2s; }
.button:hover { background: var(--pr-text); border-color: var(--pr-text); color: #fff; }

/* ---- Flash messages ---- */
.messages { margin-bottom: 1.5rem; }
.messages li { padding: .85rem 1.25rem; border-radius: var(--radius); margin-bottom: .5rem; font-family: var(--font-display); font-size: .9rem; font-weight: 600; border-left: 4px solid var(--pr-dark); background: var(--pr-off-white); list-style: none; color: var(--pr-text); }

/* ---- Tables ---- */
table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; font-size: .9rem; }
thead tr { background: var(--pr-dark); color: #fff; }
thead th { padding: .75rem 1rem; font-family: var(--font-display); font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-align: left; }
tbody tr { border-bottom: 1px solid var(--pr-light); }
tbody tr:hover { background: var(--pr-off-white); }
td { padding: .7rem 1rem; vertical-align: top; }

/* ---- Footer ---- */
#footer { background: var(--pr-dark); color: rgba(255,255,255,.7); padding: 2rem 0; flex-shrink: 0; }
#footer .footer-content { font-size: .875rem; }
#footer .footer-content p { margin: 0; }
#footer .footer-content a { color: var(--pr-orange); text-decoration: none; }
#footer .footer-content a:hover { text-decoration: underline; }

/* ---- Shared field styles (login, contact, advanced search) ---- */
.field { margin-bottom: 1.25rem; }
.field-meta { margin-bottom: .4rem; }
.field-meta label,
.field-meta .label {
  display: block;
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--pr-mid-gray);
}
.inputs input[type="email"],
.inputs input[type="password"],
.inputs input[type="text"],
.inputs textarea,
.inputs select {
  display: block;
  width: 100%;
  padding: .65rem 1rem;
  border: 2px solid var(--pr-light);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--pr-text);
  background: var(--pr-white);
  outline: none;
  box-sizing: border-box;
  transition: border-color .2s;
}
.inputs input:focus,
.inputs textarea:focus,
.inputs select:focus { border-color: var(--pr-dark); box-shadow: none; }
.inputs textarea { resize: vertical; }

/* ---- Login form ---- */
.site-login { max-width: 480px; }
.site-login h1 { color: var(--pr-dark); margin-bottom: 1.5rem; }
.site-login input[type="submit"] {
  display: inline-flex; align-items: center;
  padding: .65rem 1.5rem;
  background: var(--pr-dark); color: #fff;
  font-family: var(--font-display); font-size: .9rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  border: 2px solid var(--pr-dark); border-radius: var(--radius);
  cursor: pointer; transition: all .2s; margin-top: .5rem;
}
.site-login input[type="submit"]:hover { background: var(--pr-text); border-color: var(--pr-text); }

/* ---- Hide forgot password ---- */
p.forgot-password { display: none; }

/* ---- Contact form ---- */
.contact-form input[type="submit"] {
  display: inline-flex; align-items: center;
  padding: .65rem 1.5rem;
  background: var(--pr-orange); color: #fff;
  font-family: var(--font-display); font-size: .9rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  border: 2px solid var(--pr-orange); border-radius: var(--radius);
  cursor: pointer; transition: all .2s; margin-top: .5rem;
}
.contact-form input[type="submit"]:hover { background: var(--pr-orange-dk); border-color: var(--pr-orange-dk); }

/* ---- Advanced search ---- */
#advanced-search { max-width: 860px; }
#advanced-search h2 { margin-bottom: 1.5rem; color: var(--pr-dark); }
.advanced-search-content { display: flex; flex-direction: column; gap: .25rem; margin-bottom: 1.5rem; }
#advanced-search .field { background: var(--pr-off-white); border: 1px solid var(--pr-light); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: .75rem; }
#advanced-search .field-meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .65rem; }
#advanced-search .field-meta label,
#advanced-search .field-meta .label { margin-bottom: 0; flex: 1; }
#advanced-search .inputs { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-start; }
#advanced-search .inputs select,
#advanced-search .inputs input[type="text"] { width: auto; flex: 1 1 140px; padding: .5rem .75rem; }
#advanced-search .inputs textarea { width: 100%; }

/* Multi-value row (property query, class query) */
#advanced-search .value {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
  width: 100%; padding: .5rem 0;
  border-top: 1px solid var(--pr-light);
}
#advanced-search .value:first-child { border-top: none; padding-top: 0; }
#advanced-search .value select,
#advanced-search .value input[type="text"] { flex: 1 1 120px; width: auto; padding: .45rem .65rem; }

/* Add/remove value buttons inside advanced search */
#advanced-search .add-value,
#advanced-search .remove-value {
  background: var(--pr-off-white);
  border: 2px solid var(--pr-light);
  color: var(--pr-text);
  border-radius: var(--radius);
  padding: .3rem .6rem;
  font-size: .8rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .2s;
  flex-shrink: 0;
}
#advanced-search .add-value:hover { background: var(--pr-dark); border-color: var(--pr-dark); color: #fff; }
#advanced-search .remove-value:hover { background: var(--pr-orange); border-color: var(--pr-orange); color: #fff; }

/* Expand/collapse link in advanced search */
#advanced-search .expand { font-family: var(--font-display); font-size: .75rem; color: var(--pr-mid-gray); text-decoration: none; }
#advanced-search .expand:hover { color: var(--pr-orange); }
#advanced-search .collapsible { width: 100%; }
#advanced-search .field-description { font-size: .8rem; color: var(--pr-mid-gray); margin-top: .25rem; font-style: italic; }

/* Search submit button */
#page-actions { margin-top: 1rem; }
#page-actions input[type="submit"] {
  display: inline-flex; align-items: center;
  padding: .7rem 2rem;
  background: var(--pr-orange); color: #fff;
  font-family: var(--font-display); font-size: 1rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  border: 2px solid var(--pr-orange); border-radius: var(--radius);
  cursor: pointer; transition: all .2s;
}
#page-actions input[type="submit"]:hover { background: var(--pr-orange-dk); border-color: var(--pr-orange-dk); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  #primary-nav { position: absolute; top: 72px; left: 0; right: 0; background: var(--pr-navy-dark); padding: 1rem 0; display: none; flex-direction: column; border-top: 3px solid var(--pr-orange); box-shadow: 0 4px 20px rgba(27,35,90,.2); }
  #primary-nav.open { display: flex; }
  #primary-nav ul { flex-direction: column; align-items: stretch; width: 100%; }
  #primary-nav > ul > li > a { height: auto; padding: .85rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,.08); border-left: 3px solid transparent; }
  #primary-nav > ul > li > a:hover { border-left-color: var(--pr-orange); }
  #primary-nav ul ul { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border-top: none; display: none; }
  .resource-list { grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); }
  #advanced-search .inputs { flex-direction: column; }
  #advanced-search .value { flex-direction: column; align-items: stretch; }
  .browse-controls { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .resource-list { grid-template-columns: 1fr; }
}

/* ---- Pagination arrow icons (replaces missing o-icon font) ---- */
.o-icon-prev::before { content: '←'; font-style: normal; }
.o-icon-next::after  { content: '→'; font-style: normal; }

/* Bottom browse pagination (outside .browse-controls) */
nav.pagination {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
  list-style: none;
  padding: 0;
}
nav.pagination form { display: flex; align-items: center; gap: .4rem; }
nav.pagination .page-count,
nav.pagination .row-count {
  font-family: var(--font-display);
  font-size: .9rem;
  color: var(--pr-mid-gray);
}
nav.pagination .pagination-buttons { display: flex; gap: .4rem; }
nav.pagination .pagination-buttons a,
nav.pagination .pagination-buttons span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.25rem; height: 2.25rem; padding: 0 .6rem;
  border: 2px solid var(--pr-light); border-radius: var(--radius);
  font-family: var(--font-display); font-size: 1rem; font-weight: 700;
  color: var(--pr-text); text-decoration: none; background: var(--pr-white);
  transition: all .2s;
}
nav.pagination .pagination-buttons a:hover { background: var(--pr-dark); border-color: var(--pr-dark); color: #fff; }
nav.pagination .pagination-buttons span.inactive { color: var(--pr-light); border-color: var(--pr-light); cursor: default; pointer-events: none; }

.language { display: none; }