/* St. Helen Museum Birkirkara – static site styles
   Visual identity carried over from the original WordPress "Dante" child theme:
   Playfair Display headings, Open Sans body, #333 nav bar, #7b0000 accent,
   #222 footer, image page banners. */

@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/playfair-display-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/playfair-display-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Playfair Display"; font-style: italic; font-weight: 400; font-display: swap;
  src: url(fonts/playfair-display-latin-400-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Playfair Display"; font-style: italic; font-weight: 400; font-display: swap;
  src: url(fonts/playfair-display-latin-ext-400-italic.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/open-sans-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/open-sans-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Open Sans"; font-style: italic; font-weight: 400; font-display: swap;
  src: url(fonts/open-sans-latin-400-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Open Sans"; font-style: italic; font-weight: 400; font-display: swap;
  src: url(fonts/open-sans-latin-ext-400-italic.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(fonts/open-sans-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(fonts/open-sans-latin-ext-600-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --text: #222;
  --muted: #666;
  --accent: #7b0000;
  --timeline: #b52320;
  --nav: #333;
  --footer: #222;
  --rule: #e4e4e4;
  --panel: #f3f3f3;
  --quote-outer: #efe3d0;
  --quote-inner: #ead5b3;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Open Sans", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1170px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body { margin: 0; background: #fff; color: var(--text); font: 400 17px/1.6 var(--sans); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: #a00; }
:focus-visible { outline: 3px solid #1a5fb4; outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.2; margin: 1.6em 0 .6em; color: var(--text); }
h1 { font-size: clamp(30px, 4vw, 40px); }
h2 { font-size: clamp(26px, 3vw, 32px); }
h3 { font-size: 22px; }
p, ul, ol, blockquote, table, figure { margin: 0 0 1.1em; }
sup { line-height: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; top: 0; background: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* The original child theme highlighted the targeted anchor. */
:target { background-color: #ffa; }

/* ---------- Header ---------- */
.site-header { background: #fff; position: relative; z-index: 20; }
.bar { display: flex; align-items: center; gap: 16px; min-height: 148px; }
.logo { margin-right: auto; display: block; padding: 30px 0 20px; }
.logo img { width: 300px; height: auto; }
.top-links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.top-links a { display: inline-block; font-size: 13.6px; line-height: 40px; padding: 0 16px; text-transform: uppercase;
  color: #555; text-decoration: none; border: 1px solid transparent; }
.top-links a:hover { color: var(--accent); }
.top-links a[aria-current="page"] { background: var(--accent); color: #fff; }
.top-links .sponsor { border-color: var(--accent); color: var(--accent); }
.top-links .sponsor:hover, .top-links .sponsor[aria-current="page"] { background: var(--accent); color: #fff; }
.top-links .search-link svg { width: 18px; height: 18px; vertical-align: -3px; }

.menu-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; color: #555; }
.menu-toggle svg { width: 30px; height: 30px; display: block; }

.main-nav { background: var(--nav); }
.main-nav > ul { list-style: none; display: flex; flex-wrap: wrap; margin: 0 auto; padding: 0 16px; max-width: var(--wrap); }
.main-nav li { position: relative; }
.main-nav a { display: block; color: #fff; text-decoration: none; font-family: var(--serif); font-size: 17px; line-height: 24px; padding: 15px 15px; }
.main-nav > ul > li > a:hover, .main-nav > ul > li:hover > a, .main-nav > ul > li.active > a { background: var(--accent); color: #fff; }
.main-nav .has-sub > a { padding-right: 6px; }
.sub-toggle { background: none; border: 0; color: #fff; padding: 0 12px 0 2px; cursor: pointer; height: 54px; vertical-align: top; }
.has-sub { display: flex; flex-wrap: wrap; align-items: stretch; }
.has-sub.active .sub-toggle, .has-sub:hover .sub-toggle { background: var(--accent); }
.sub-toggle svg { width: 12px; height: 12px; display: block; transition: transform .2s; }
.sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.main-nav .sub { list-style: none; margin: 0; padding: 6px 0; position: absolute; top: 100%; left: 0; min-width: 250px;
  background: #2a2a2a; box-shadow: 0 8px 20px rgba(0,0,0,.25); display: none; z-index: 30; }
.main-nav .sub a { font-family: var(--sans); font-size: 15px; padding: 9px 18px; color: #eee; }
.main-nav .sub a:hover, .main-nav .sub a[aria-current="page"] { background: var(--accent); color: #fff; }
@media (hover: hover) and (min-width: 992px) { .has-sub:hover > .sub { display: block; } }
.has-sub.open > .sub { display: block; }

/* ---------- Home header over slider ---------- */
.home .site-header { position: absolute; left: 0; right: 0; top: 0; background: linear-gradient(to bottom, rgba(0,0,0,.9), rgba(0,0,0,0)); }
.home .top-links a { color: #fff; border-color: rgba(255,255,255,.35); }
.home .top-links a[aria-current="page"] { background: var(--accent); border-color: var(--accent); }
.home .top-links .sponsor { color: #fff; border-color: #ccc; }
.home .main-nav { background: transparent; }
.home .menu-toggle { color: #fff; }
.home-hero { position: relative; height: 600px; max-height: 80vh; background: #111; overflow: hidden; }
.home-hero .slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); opacity: 0; animation: fade 16s infinite; }
.home-hero .slide.s0 { opacity: 1; animation-delay: -1s; }
.home-hero .slide.s1 { animation-delay: 7s; }
.home-hero::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.5); }
@keyframes fade { 0% { opacity: 0; } 6% { opacity: 1; } 50% { opacity: 1; } 56% { opacity: 0; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .home-hero .slide { animation: none; } .home-hero .slide.s1 { display: none; } }

/* ---------- Page headings ---------- */
.page-hero { position: relative; min-height: 285px; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; background: #333; }
.page-hero .hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.25); }
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; margin: 0; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.page-head h1 { margin: 40px 0 0; font-size: 32px; }
.page-head + .content { padding-top: 10px; }

/* ---------- Content ---------- */
.content { padding-top: 20px; padding-bottom: 60px; }
.block { margin: 30px 0; }
.block > h2:first-child, .block > .grid:first-child > .c:first-child > h2:first-child { margin-top: 0; }
.content h2 { display: flex; align-items: center; gap: 20px; }
.content h2::after { content: ""; flex: 1; border-top: 1px solid var(--rule); min-width: 20px; }
.content h3 { margin-top: 1em; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 30px; align-items: start; }
.c { grid-column: span 12; min-width: 0; }
@media (min-width: 768px) {
  .c2 { grid-column: span 2; } .c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c6 { grid-column: span 6; }
  .c8 { grid-column: span 8; } .c9 { grid-column: span 9; } .c10 { grid-column: span 10; }
}
@media (max-width: 767px) { .grid { display: block; } .spacer { display: none; } }
.photo { margin: 0 0 30px; }
.photo a { display: block; }
.photo img { width: auto; max-width: 100%; }
.photo.full img { width: 100%; }
.photo figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }
.zoom { cursor: zoom-in; }
blockquote, .titular-painting { border: 1px solid var(--quote-outer); padding: 10px; margin-left: 0; margin-right: 0; }
blockquote p, .titular-painting > div { font-size: 18px; line-height: 28px; font-style: italic; padding: 20px; border: 1px solid var(--quote-inner); margin: 0; }
blockquote p + p { border-top: 0; }
.titular-painting h2 { margin-top: 0; }
.titular-painting h2::after { display: none; }
.content ul { margin-left: 1em; padding-left: 1em; }
.content li { padding-left: .5em; margin-bottom: .3em; }
table.schedule { width: 100%; border-collapse: collapse; font-size: 15px; }
table.schedule th, table.schedule td { border: 1px solid #ddd; padding: 8px 10px; text-align: left; vertical-align: top; }
table.schedule th { background: var(--panel); font-weight: 600; }
table.schedule tbody tr:hover { background: #fafafa; }
.table-scroll { overflow-x: auto; }

/* Gallery (replaces the WordPress flexslider) */
.gallery-slider { margin: 0 0 30px; }
.gallery-main { display: block; position: relative; background: #f6f6f6; }
.gallery-main img { width: 100%; aspect-ratio: 3 / 2; object-fit: contain; }
.gallery-thumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 12px 0 0 !important; }
.gallery-thumbs li { padding: 0 !important; margin: 0 !important; }
.gallery-thumbs button { padding: 0; border: 2px solid transparent; background: none; cursor: pointer; display: block; }
.gallery-thumbs button[aria-current="true"] { border-color: var(--accent); }
.gallery-thumbs img { width: 84px; height: 64px; object-fit: cover; }
.gallery-caption { font-size: 14px; color: var(--muted); margin-top: 6px; min-height: 1.4em; }

/* Four Main Themes boxes */
.theme-box { display: block; text-align: center; padding: 20px 10px; text-decoration: none; color: var(--text); font-family: var(--serif); font-size: 20px; }
.theme-box .icon { display: block; margin: 0 auto 12px; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #fff;
  font-size: 26px; line-height: 56px; font-family: var(--sans); }
.theme-box:hover { color: var(--accent); }

/* Timeline (replaces the Timeline Express plugin) */
.timeline { list-style: none; position: relative; margin: 40px 0 !important; padding: 0 !important; }
.timeline::before { content: ""; position: absolute; top: 0; bottom: 0; left: 25px; width: 4px; background: #d7e4ed; }
.timeline > li { position: relative; padding: 0 0 0 70px !important; margin: 0 0 40px !important; }
.timeline .dot { position: absolute; left: 0; top: 0; width: 54px; height: 54px; border-radius: 50%; background: var(--timeline);
  box-shadow: 0 0 0 4px #fff, inset 0 2px 0 rgba(0,0,0,.08), 0 3px 0 4px rgba(0,0,0,.05); display: flex; align-items: center; justify-content: center; }
.timeline .dot::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 3px solid #fff; }
.timeline .card { background: var(--panel); padding: 1em 1.4em; border-radius: 3px; position: relative; }
.timeline h2 { margin: 0 0 .4em; font-size: 26px; }
.timeline h2::after { display: none; }
.timeline .card p { font-size: 16px; margin: 0 0 .4em; }
.timeline .more a { font-weight: 600; text-decoration: none; }
.timeline .more a:hover { text-decoration: underline; }
@media (min-width: 992px) {
  .timeline::before { left: 50%; margin-left: -2px; }
  .timeline > li { padding: 0 !important; width: 50%; }
  .timeline > li:nth-child(odd) { padding-right: 60px !important; }
  .timeline > li:nth-child(even) { margin-left: 50% !important; padding-left: 60px !important; }
  .timeline .dot { left: auto; right: -27px; }
  .timeline > li:nth-child(even) .dot { left: -27px; right: auto; }
}
.entry-nav { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--rule); margin-top: 40px; padding-top: 16px; }

/* Lists of posts */
.post-list { list-style: none; padding: 0 !important; margin: 0 !important; }
.post-list li { display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding: 24px 0 !important; border-bottom: 1px solid var(--rule); }
.post-list h2 { margin: 0 0 .3em; font-size: 26px; }
.post-list h2::after { display: none; }
.post-list .meta { margin: 0 0 .5em; }
@media (max-width: 600px) { .post-list li { grid-template-columns: 1fr; } }
.meta { color: var(--muted); font-size: 14px; }
.back { margin-top: 40px; }

.btn { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; padding: 10px 18px; border: 1px solid var(--accent);
  font: inherit; font-size: 15px; cursor: pointer; text-transform: uppercase; }
.btn:hover { background: #5c0000; color: #fff; }
.btn.ghost { background: transparent; color: var(--accent); }

/* Map facade: Google Maps loads only on request */
.map { background: var(--panel); padding: 24px; text-align: center; }
.map iframe { width: 100%; height: 300px; border: 0; display: block; }

/* Search */
.search-form { display: flex; gap: 8px; margin: 20px 0 30px; flex-wrap: wrap; }
.search-form input { flex: 1; min-width: 200px; font: inherit; padding: 9px 12px; border: 1px solid #bbb; }
.search-results { list-style: none; padding: 0 !important; margin: 0 !important; }
.search-results li { padding: 14px 0 !important; border-bottom: 1px solid var(--rule); }
.search-results a { font-family: var(--serif); font-size: 21px; }
.search-results p { margin: 4px 0 0; font-size: 15px; color: #444; }
.search-results mark { background: #ffe7a3; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer); color: #ccc; }
.funders { padding: 40px 16px; }
.funders img { margin: 0 auto; width: 100%; max-width: 900px; }
.legal { border-top: 1px solid #333; text-align: center; font-size: 12px; padding: 14px 16px; color: #999; }
.legal p { margin: 0; }
.legal a { color: #ddd; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 92vw; max-height: 88vh; text-align: center; }
.lightbox img { max-width: 92vw; max-height: 82vh; width: auto; height: auto; margin: 0 auto; }
.lightbox figcaption { color: #ddd; font-size: 14px; margin-top: 8px; }
.lightbox button { position: absolute; background: rgba(0,0,0,.4); color: #fff; border: 0; font-size: 40px; line-height: 1; width: 52px; height: 52px; cursor: pointer; }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
body.lb-open { overflow: hidden; }

/* ---------- Mobile ---------- */
@media (max-width: 991px) {
  .bar { min-height: 84px; flex-wrap: wrap; }
  .logo img { width: 200px; }
  .top-links { display: none; }
  .menu-toggle { display: block; }
  .main-nav { display: none; }
  .main-nav.open { display: block; }
  .home .main-nav.open { background: #222; }
  .main-nav > ul { flex-direction: column; padding: 0; }
  .main-nav a { padding: 12px 16px; }
  .has-sub > a { flex: 1; }
  .sub-toggle { height: auto; padding: 0 18px; }
  .main-nav .sub { position: static; box-shadow: none; width: 100%; background: #262626; }
  .main-nav .sub a { padding-left: 32px; }
  .main-nav .mobile-only { display: block; }
  .home-hero { height: 420px; }
}
@media (min-width: 992px) { .main-nav .mobile-only { display: none; } }
@media (max-width: 480px) {
  body { font-size: 16px; }
  .logo img { width: 180px; }
  .page-hero { min-height: 150px; }
}

@media print {
  .site-header, .main-nav, .site-footer .funders, .lightbox, .menu-toggle { display: none !important; }
  .page-hero { min-height: 0; background: none; } .page-hero .hero-img, .page-hero::after { display: none; }
  .page-hero h1 { color: #000; text-shadow: none; }
  a { color: #000; }
}

/* Related articles on news posts (as in the original theme) */
.related { border-top: 1px solid var(--rule); margin-top: 40px; }
.related ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px; padding: 0 !important; margin: 0 !important; }
.related li { padding: 0 !important; }
.related h3 { font-size: 17px; margin: 10px 0 0; }
.related img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.section-list { columns: 2 260px; }
.anchor { display: block; }
.gallery-main { cursor: zoom-in; }
