/* APPN static site. */
:root {
  --primary: #86BC25; /* brand colours of the old WordPress theme */
  --secondary: #6DACDE;
  /* darker shades for text on white: the brand colours themselves are too light to read (contrast < 3:1) */
  --primary-text: #4E7A0E;
  --secondary-text: #2B5F8A;
  --header-gradient: linear-gradient(90deg, var(--primary), var(--secondary));
  --text: #222;
  --muted: #666;
  --border: #ddd;
  --bg-soft: #f5f5f5;
  --container: 1320px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
}

* { box-sizing: border-box; }
body { margin: 0; background: #fff; display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }
img { max-width: 100%; height: auto; }
a { color: var(--primary-text); }
a:hover { color: var(--secondary-text); }
h1, h2, h3, h4 { line-height: 1.25; color: var(--primary-text); }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; vertical-align: top; padding: 0.35em 0.5em; border-bottom: 1px solid var(--border); }
pre, .wp-block-preformatted { white-space: pre-wrap; font-family: inherit; }
.board-list { list-style: none; padding: 0; margin: 0 0 1.5em; line-height: 1.4; }
.board-list li { margin: 0 0 0.35em; }
hr, .wp-block-separator { clear: both; height: 3px; border: 0; border-radius: 3px; background: var(--header-gradient);
  margin: 2.5em 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }

/* ---- header / navigation ------------------------------------------------------------------------------------- */
site-header, site-footer { display: block; }
site-header { min-height: 70px; background: var(--header-gradient); }
.site-header { background: var(--header-gradient); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); position: relative; z-index: 10; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 70px; }
.site-header .logo img { height: 50px; display: block; }
.site-header nav > ul { display: flex; list-style: none; margin: 0; padding: 0; }
.site-header nav li { position: relative; }
.site-header nav a { display: block; padding: 0.6em 1em; color: #fff; text-decoration: none; text-transform: uppercase;
  font-size: 0.95rem; letter-spacing: 0.03em; }
.site-header nav > ul > li > a { border-bottom: 3px solid transparent; }
.site-header nav > ul > li > a:hover, .site-header nav > ul > li > a[aria-current] { color: #fff; border-bottom-color: #fff; }
.site-header nav ul ul { display: none; position: absolute; left: 0; top: 100%; min-width: 260px; list-style: none;
  margin: 0; padding: 0.4em 0; background: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
.site-header nav ul ul a { color: var(--text); text-transform: none; padding: 0.4em 1em; }
.site-header nav ul ul a:hover, .site-header nav ul ul a[aria-current] { color: var(--primary-text); background: var(--bg-soft); }
.site-header nav li:hover > ul, .site-header nav li:focus-within > ul { display: block; }
.menu-toggle { display: none; background: none; border: 0; padding: 12px; cursor: pointer; }
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after { display: block; width: 24px; height: 2px;
  background: #fff; position: relative; content: ""; }
.menu-toggle span::before { position: absolute; top: -7px; }
.menu-toggle span::after { position: absolute; top: 7px; }

@media (max-width: 900px) {
  .site-header .container { flex-wrap: wrap; }
  .menu-toggle { display: block; }
  .site-header nav { display: none; width: 100%; padding-bottom: 1em; }
  .menu-toggle[aria-expanded="true"] + nav { display: block; }
  .site-header nav > ul { flex-direction: column; }
  .site-header nav ul ul { display: block; position: static; box-shadow: none; background: none; padding: 0 0 0 1em; }
  .site-header nav ul ul a { color: #fff; }
}

/* ---- page structure ------------------------------------------------------------------------------------------ */
.banner { height: 400px; background-size: cover; background-position: center; }
.breadcrumbs { font-size: 0.9rem; color: var(--muted); padding: 1em 0; border-bottom: 1px solid var(--border);
  margin-bottom: 1em; }
.breadcrumbs a { color: var(--muted); }
.content { padding-bottom: 3em; min-width: 0; }
@media (max-width: 900px) {
  .banner { height: 220px; }
}
.post-date { color: var(--muted); margin-top: -0.5em; }

.news-item { border-bottom: 1px solid var(--border); padding: 1em 0; }
.news-item time { color: var(--muted); font-size: 0.9rem; }
.news-item h2 { margin: 0.2em 0 0.4em; font-size: 1.3rem; }
.news-item p { margin: 0; }

/* ---- footer -------------------------------------------------------------------------------------------------- */
.site-footer { background: #333; color: #fff; padding: 2em 0; margin-top: 2em; }
.footer-sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1em 3em;
  padding-bottom: 1.5em; margin-bottom: 1.5em; border-bottom: 1px solid #555; }
.footer-sections h3 { color: var(--primary); font-size: 1.1rem; margin: 0 0 0.5em; }
.footer-sections ul { list-style: none; margin: 0; padding: 0; line-height: 1.4; }
.footer-sections li { margin-bottom: 0.4em; }
.footer-sections a { color: #ddd; text-decoration: none; }
.footer-sections a:hover { color: var(--secondary); text-decoration: underline; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 1em; flex-wrap: wrap; }
.footer-links a { color: #fff; margin-right: 1.5em; text-decoration: none; }
.footer-links a:hover { color: var(--secondary); }
.footer-logo { height: 50px; display: block; }

/* ---- WordPress block content --------------------------------------------------------------------------------- */
.wp-block-columns { display: flex; flex-wrap: wrap; gap: 2em; margin: 1.5em 0; }
.wp-block-columns.are-vertically-aligned-center { align-items: center; }
.wp-block-column { flex: 1 1 0; min-width: 0; }
.wp-block-column.is-vertically-aligned-center { align-self: center; }
.wp-block-column.is-vertically-aligned-top { align-self: flex-start; }
@media (max-width: 781px) {
  .wp-block-columns:not(.is-not-stacked-on-mobile) { flex-direction: column; }
  .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column { flex-basis: 100%; }
}
.wp-block-image, figure { margin: 0 0 1em; }
.wp-block-image img { vertical-align: bottom; }
.wp-block-image figcaption { font-size: 0.9rem; color: var(--muted); }
.aligncenter, .has-text-align-center { text-align: center; }
.wp-block-image.aligncenter, img.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.has-text-align-left { text-align: left; }
.has-text-align-right { text-align: right; }
.alignleft { float: left; margin: 0.3em 1.5em 1em 0; }
.alignright { float: right; margin: 0.3em 0 1em 1.5em; }
.content::after { content: ""; display: table; clear: both; }
.has-medium-font-size { font-size: 1.25rem; }
.has-large-font-size { font-size: 1.6rem; }
.has-black-color { color: #000; }
.has-very-dark-gray-background-color { background-color: #313131; }
.wp-block-spacer { clear: both; }
.wp-block-cover { position: relative; min-height: 320px; display: flex; align-items: center; justify-content: center;
  background-size: cover; background-position: center; overflow: hidden; margin: 1em 0; color: #fff; padding: 1em; }
.wp-block-cover__image-background { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-width: none; }
.wp-block-cover__background { position: absolute; inset: 0; opacity: 0.4; }
.wp-block-cover__inner-container { position: relative; z-index: 1; width: 100%; }
.wp-block-cover__inner-container h2, .wp-block-cover__inner-container p { color: inherit; }
.wp-block-media-text { display: grid; grid-template-columns: 1fr 1fr; gap: 2em; align-items: center; margin: 1.5em 0; }
.wp-block-media-text.has-media-on-the-right .wp-block-media-text__media { order: 2; }
@media (max-width: 600px) { .wp-block-media-text { grid-template-columns: 1fr; } }
.gallery { display: grid; gap: 10px; margin: 1em 0; grid-template-columns: repeat(3, 1fr); }
.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }
.gallery-item, .gallery-icon { margin: 0; }
.gallery img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
@media (max-width: 600px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* Partner logos: wrap onto several rows on small screens; every logo fits a fixed box and keeps its proportions. */
.partner-logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1.5em 2.5em; margin: 1.5em 0; }
.partner-logos a { flex: 0 1 160px; display: flex; justify-content: center; }
.partner-logos img { max-width: 100%; max-height: 80px; width: auto; height: auto; display: block; }
@media (max-width: 600px) {
  .partner-logos { gap: 1.5em; }
  .partner-logos a { flex-basis: calc(50% - 0.75em); }
  .partner-logos img { max-height: 60px; }
}

/* ---- resources / instruments--------------------------------------------------------------------------------- */
.instrument-search { display: flex; align-items: center; gap: 1em; margin: 1.5em 0; }
.instrument-search input { flex: 1; max-width: 480px; padding: 0.6em 0.8em; font: inherit; border: 1px solid #bbb;
  border-radius: 4px; }
.instrument-search input:focus { outline: 2px solid var(--secondary); border-color: var(--secondary-text); }
.instrument-count { color: var(--muted); font-size: 0.9rem; }
.instrument-cards { display: grid; gap: 1em; }
.instrument-card { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 1.5em; padding: 1em 1.2em;
  border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: 4px; color: var(--text);
  text-decoration: none; transition: box-shadow 0.15s; }
.instrument-card:hover { color: var(--text); border-left-color: var(--secondary); box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12); }
.instrument-card[hidden] { display: none; }
.instrument-card h3 { margin: 0 0 0.3em; }
.instrument-card p { margin: 0.2em 0; }
.instrument-card img { width: 150px; height: 150px; object-fit: cover; border-radius: 4px; }
.instrument-location { font-weight: 600; }
@media (max-width: 600px) {
  .instrument-card { grid-template-columns: 1fr; }
  .instrument-card img { order: -1; width: 100%; height: 180px; }
}
.instrument-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1em 2.5em; }
.instrument-grid h3 { margin-bottom: 0.5em; }
@media (max-width: 781px) { .instrument-grid { grid-template-columns: 1fr; } }
.instrument-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.5rem; }
.instrument-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; border-radius: 3px; }
.contact-card { border: 1px solid var(--border); }
.contact-name { background: var(--bg-soft); padding: 0.8em 1em; font-weight: 600; border-bottom: 1px solid var(--border); }
.contact-body { padding: 0 1em; overflow-wrap: anywhere; }
.facts th { width: 30%; color: var(--muted); font-weight: 600; }
.facts td { overflow-wrap: anywhere; }

/* ---- lightbox ------------------------------------------------------------------------------------------------ */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, 0.85); display: flex;
  align-items: center; justify-content: center; padding: 2em; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; box-shadow: 0 0 30px rgba(0, 0, 0, 0.5); cursor: pointer; }
.lightbox-close { position: absolute; top: 0.3em; right: 0.5em; font-size: 2.5rem; color: #fff; background: none;
  border: 0; cursor: pointer; }
