/*
Theme Name: Eleda Hats Restored
Version: 1.1.0
*/
body { margin: 0; color: #333; background: #f6f7f9 url(assets/page-bg.png) repeat-x; font: 14px/18px Arial, Helvetica, sans-serif; }
a { color: #000; }
a:focus-visible, #hp-slider:focus-visible { outline: 2px solid #68447e; outline-offset: 2px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#wrapper { max-width: 960px; margin: 0 auto; }
#header { position: relative; height: 321px; background: url(assets/header-bg.jpg) no-repeat center top; }
#head-logo img, #head-portrait img { vertical-align: top; }
#access { position: absolute; bottom: 0; inset-inline: 0; }
#access ul { display: flex; list-style: none; margin: 0 0 0 32px; padding: 0; }
#access a { overflow: hidden; white-space: nowrap; }
#head-search input { vertical-align: middle; }
#colophon .foot-bu { box-sizing: content-box; }
#content { display: flow-root; margin: 0 10px; padding: 16px; background: #f9f9f9; box-shadow: 0 0 10px #999; }
#content h1, #content h2 { margin: 0 0 .65em; font-weight: bold; line-height: 1.3; }
#content h1 { font-size: 22px; }
#content h2 { font-size: 18px; }
#content img { max-width: 100%; }
#hp-slider { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-top: -10px; }
#hp-slider img { width: 100%; height: auto; flex: 0 0 100%; scroll-snap-align: start; }
.home-columns { display: grid; grid-template-columns: minmax(0, 600px) minmax(0, 292px); gap: 16px; align-items: start; }
#hp-container, #hp-race-dates .cont, #hp-blog { border-radius: 15px; box-shadow: 0 0 5px #999; background: #f9f9f9; }
#hp-container, #hp-race-dates .cont { padding: 16px; }
#hp-container { margin-top: 16px; }
#hp-race-dates { margin-top: 32px; }
#content #hp-race-dates h2 { margin: 0; padding: 3px 10px; min-height: 30px; background: url(assets/race-icon2.png) no-repeat 90% 50%; font-size: 22px; }
#hp-race-dates .gallery-link { text-align: center; }
#content .cont-box-head h2 { margin: 0; }
#hp-blog { clear: both; margin-top: 16px; padding: 10px; font-size: 12px; }
#hp-blog img, #hp-race-dates img { height: auto; }
.wp-block-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 1rem; }
.wp-block-gallery figure { margin: 0; }
.wp-block-gallery img { width: 100%; height: auto; }
@media (max-width: 959px) {
    #access { overflow-x: auto; }
    #access ul { width: max-content; margin-left: 0; }
}
@media (max-width: 720px) {
    #header { height: auto; min-height: 172px; padding-bottom: 0; background-size: auto 225px; }
    #masthead { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 6px; }
    #head-logo img, #head-portrait img { width: auto; height: 80px; margin: 0; }
    #masthead > a, #head-search { position: static; }
    #head-basket { padding-right: 5px; }
    #access { position: static; width: 100%; background: #e7deeb; }
    #access ul { width: auto; flex-wrap: wrap; }
    #wrapper #access a { width: auto; height: auto; padding: 5px 8px; text-indent: 0; background: none; color: #33283b; }
    .home-columns { grid-template-columns: 1fr; }
    #hp-race-dates { margin-top: 0; }
    #colophon { height: auto; padding: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 7px; background: #554b63; }
    #colophon .foot-bu, #colophon .foot-social, #colophon #foot-contact, #colophon #signoff { position: static; }
    #colophon .foot-bu { background: none; width: auto; padding: 3px; height: auto; }
    #colophon #signoff { width: 100%; text-align: left; }
    #colophon #madeby { float: none; }
}

.eleda-gallery-index, .eleda-gallery-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 165px), 1fr));
    gap: 14px;
    margin: 16px 0;
    padding: 0;
    list-style: none;
}
.eleda-gallery-index a, .eleda-gallery-photos a { display: block; }
.eleda-gallery-index img, .eleda-gallery-photos img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}
.eleda-gallery-index span { display: block; margin-top: 4px; }
.eleda-gallery-pagination { display: flex; flex-wrap: wrap; gap: 6px; }
.eleda-gallery-pagination a { padding: 5px 9px; border: 1px solid #cfc6d6; }
.eleda-gallery-pagination [aria-current] { font-weight: bold; background: #e7deeb; }
.eleda-blog-entry { padding: 8px 0; border-bottom: 1px solid #cfc6d6; }
