/*
 * Glue between WordPress markup and the original Artisteer template.css.
 */

html, body {
    margin: 0;
    background: #B2C503;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* The header is a background image; make the whole area link to home. */
.tp-home-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.art-header > .art-nostyle {
    position: relative;
    z-index: 2;
}

/* Menu: WordPress classes for the current item, keyboard access to submenus. */
ul.art-hmenu > li.current-menu-item > a,
ul.art-hmenu > li.current-menu-ancestor > a {
    color: inherit;
}
.desktop ul.art-hmenu li:focus-within > ul {
    visibility: visible;
    top: 100%;
}
.desktop ul.art-hmenu li li:focus-within > ul {
    top: 0;
    left: 100%;
}
.tp-menu-toggle {
    display: none;
}

/* Widget rows (Joomla position-16/17/18 and 9/10/11). */
.tp-widget-row .art-layout-cell {
    padding: 0 5px;
}
.art-blockcontent-title {
    margin-top: 0;
}

/* Content */
.art-postcontent img {
    max-width: 100%;
    height: auto;
}
.art-postcontent iframe {
    max-width: 100%;
}
.alignleft { float: left; margin: 0 1em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 12px; text-align: center; }
.tp-thumb { float: left; margin: 0 1em 1em 0; }
h1.art-postheader { margin: 0; }

/* Image rotator (js/rotator.js), replaces the Joomla mod_vsir module.
   Shows only the first image until the script takes over, so the page
   never flashes the full gallery. */
.wp-block-gallery.tp-rotator,
.wp-block-gallery.tp-rotator .blocks-gallery-grid {
    display: block;
    width: 450px;
    max-width: 100%;
    margin: 0;
    padding: 0;
}
.wp-block-gallery.tp-rotator .blocks-gallery-item,
.wp-block-gallery.tp-rotator .wp-block-image {
    display: none;
    width: 100% !important;
    margin: 0 !important;
}
.wp-block-gallery.tp-rotator:not(.tp-rotating) .blocks-gallery-item:first-child,
.wp-block-gallery.tp-rotator:not(.tp-rotating) .wp-block-image:first-of-type,
.wp-block-gallery.tp-rotator .tp-active {
    display: block;
}
.wp-block-gallery.tp-rotator figure,
.wp-block-gallery.tp-rotator img {
    width: 100% !important;
    height: auto !important;
    margin: 0;
    object-fit: contain !important;
}

/* Pagination: paginate_links() marks the current page with .current */
.art-pager .current {
    background: #B6BFC9;
    background: linear-gradient(to bottom, #E5E8EB 0, #8796A6 100%) no-repeat;
    border: 1px solid #D8D9D3;
    color: #FFFFFF;
}

/* Footer */
.art-footer-inner .art-block,
.art-footer-inner .art-blockcontent {
    color: inherit;
}

/* Small screens: the original template is a fixed 980px layout. */
@media (max-width: 1000px) {
    .art-header,
    .art-sheet,
    .desktop .art-nav,
    .art-footer {
        width: auto;
        max-width: 980px;
        box-sizing: border-box;
    }
    .art-header {
        margin-left: 10px;
        margin-right: 10px;
        background-image: url('../images/header.jpg');
        background-position: center center;
        background-size: cover;
    }
}

@media (max-width: 767px) {
    .art-header {
        height: 90px;
    }
    .art-content-layout,
    .art-content-layout-row,
    .art-layout-cell {
        display: block;
        width: 100% !important;
    }

    .tp-menu-toggle {
        display: block;
        width: 100%;
        padding: 10px;
        border: 0;
        background: none;
        font: 16px Cabin, Arial, sans-serif;
        text-align: left;
        cursor: pointer;
    }
    .tp-menu-toggle::before {
        content: "\2630  ";
    }
    ul.art-hmenu {
        display: none;
        width: 100%;
    }
    ul.art-hmenu.tp-open {
        display: block;
    }
    ul.art-hmenu li {
        float: none;
    }
    ul.art-hmenu > li:before {
        display: none;
    }
    .desktop ul.art-hmenu ul,
    ul.art-hmenu ul {
        visibility: visible;
        position: static;
        padding: 0 0 0 20px;
        margin: 0;
        background: none;
    }
    .art-hmenu ul a {
        white-space: normal;
        height: auto;
    }
    .tp-thumb,
    .alignleft,
    .alignright {
        float: none;
        margin: 0 0 1em;
    }
}
