/*
 * Ekidooz public website: small additions on top of the old theme (theme/Ekidooz/css).
 * The look stays the old one; this file only carries what used to be inline styles in the old
 * templates, and the "refresh": keyboard focus, a lighter scrollbar instead of a script,
 * pictures that keep their shape, and fixes for small screens.
 */

/* ---- From the old templates' inline styles ---- */
.home-main { margin-bottom: -80px; }
.page-main { background: url(/theme/Ekidooz/images/dashboard_bg_top.jpg) no-repeat top center #92C02A; min-height: 620px; }
.page-sheet { background: #fff; width: 100%; min-height: 400px; padding: 1px; }
.page-content { margin: 20px; overflow-wrap: anywhere; }
.page-content img { max-width: 100%; height: auto; }
.page-attachment { margin: 30px 20px 20px; }
.page-attachment img { vertical-align: middle; margin-left: 8px; }

/* Windows (search, take a tour): the old footer's own rules */
.modal { display: none; position: fixed; z-index: 999; padding-top: 58px; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0, 0, 0, 0.4); }
.modal-content { position: relative; margin: auto; padding: 0; border: 1px solid #888; width: 45%; height: auto; background-color: #fff; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); animation: ek-drop 0.4s; }
.page-home .modal-content { background-color: #2E9AA5; }
@keyframes ek-drop { from { top: -300px; opacity: 0; } to { top: 0; opacity: 1; } }
.close { color: white; float: right; font-size: 28px; font-weight: bold; }
.close:hover, .close:focus { color: #B31931; text-decoration: none; cursor: pointer; }
.modal-header { padding: 2px 16px; color: white; }
.modal-body { padding: 2px 16px; }
.popedup12 iframe { width: 640px; max-width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; }
.tour-none { color: #fff; }
button { border: none; padding: 0.6em 1.2em; background: #183876; color: #fff; font-family: 'Lato', Calibri, Arial, sans-serif; font-size: 1em; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; display: inline-block; margin: 3px 2px; border-radius: 2px; }

/* Buttons that used to be plain elements keep their old look */
button.menu-toggle, button.search-open, button.close { background: none; border: 0; padding: 0; margin: 0; letter-spacing: normal; text-transform: none; border-radius: 0; font: inherit; color: inherit; }
button.close { font-size: 28px; font-weight: bold; color: white; line-height: 1; }
button.menu-toggle .line { display: block; }
button.search-open { cursor: pointer; }

/* Whole box / tile clickable, as before, but with a real link */
.home-box { position: relative; }
.stretched-link::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.image-overlay .cover-link { position: absolute; inset: 0; z-index: 1; }
.image-overlay h5 { z-index: 2; }
.grid figure figcaption, .grid figure figcaption > a { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.grid figure figcaption > a { z-index: 1000; text-indent: 200%; white-space: nowrap; font-size: 0; opacity: 0; overflow: hidden; }

/* Pictures keep the shape the old thumbnail script cut them to */
.grid figure.effect-goliath img { aspect-ratio: 294 / 300; object-fit: cover; height: auto; }
.front-portfolio .portfolio-thumb img { aspect-ratio: 1163 / 1010; object-fit: cover; width: 100%; height: auto; }
.entry-thumb .article-thumb { width: 444px; max-width: 100%; height: auto; aspect-ratio: 444 / 112; object-fit: cover; }
.widget_recent_entries img { max-width: 100%; height: auto; }

/* Newsletter answer */
.subscribe-msg { float: left; transition: opacity 0.4s; }
.subscribe-msg.is-ok { color: green; }
.subscribe-msg.is-error { color: red; }

/* ---- Refresh ---- */
html { scrollbar-width: thin; scrollbar-color: #424242 transparent; }
html::-webkit-scrollbar { width: 8px; }
html::-webkit-scrollbar-thumb { background: #424242; border-radius: 4px; }
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }
img { max-width: 100%; }
#layerslider_4 img.ls-bg { max-width: none; }

@media (max-width: 767px) {
    .modal-content { width: 92%; }
    .page-content { margin: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .modal-content { animation: none; }
    .hvr-float { transition: none !important; }
}
