/*
Theme Name: Sorted Projects
Theme URI: https://www.sortedprojects.com.au/
Author: FCS
Author URI: https://www.fullcircle.net.au/
Description: Custom Theme Designed for Sorted Projects
Template:   twentytwentyfour
Tags: fcs, sp
Requires at least: 6.1
Tested up to: 6.1
Requires PHP: 7.2
Version: 1.1.3
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fcs-sp
*/

:root {
    --animate-duration: 2000ms;
    --animate-delay: 2s;
}

:where(.wp-site-blocks) > *,
.entry-content > * {
    margin-block-start: 0;
    margin-block-end: 0;
}

.post-template-page-cover header,
.page-template-page-cover header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2;
}

.post-template-page-cover.admin-bar header,
.page-template-page-cover.admin-bar header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .post-template-page-cover.admin-bar header,
    .page-template-page-cover.admin-bar header {
        top: 46px;
    }
}

.post-template-page-cover header .has-black-background-color,
.page-template-page-cover header .has-black-background-color {
    background-color: unset !important;
}

.post-template-page-cover .wp-site-blocks .wp-block-cover:first-of-type,
.page-template-page-cover .wp-site-blocks .wp-block-cover:first-of-type {
    margin: 0;
    position: relative;
}

footer .wp-block-navigation-item,
header .wp-block-navigation-item {
    text-transform: uppercase;
}

footer .wp-block-navigation-item li.current-menu-item>a,
footer .wp-block-navigation-item li.current-menu-item>.link-icon-wrapper>a
header .wp-block-navigation-item li.current-menu-item>a,
header .wp-block-navigation-item li.current-menu-item>.link-icon-wrapper>a {
    text-decoration: none;
    position: relative;
}

footer .wp-block-navigation-item a:hover,
header .wp-block-navigation-item a:hover {
    text-decoration: none;
}

footer .wp-block-navigation-item a::before,
header .wp-block-navigation-item a::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: #00a3e0;
    bottom: -2px;
    left: 0;
    transform-origin: left;
    transform: scaleX(0.5);
    transition: transform .3s ease-in-out;
}

footer .wp-block-navigation-item a:hover::before,
header .wp-block-navigation-item a:hover::before {
    transform-origin: left;
    transform: scaleX(1);
}

:where(.wp-site-blocks :focus) {
    outline-width: unset;
    outline-style: none;
}

.to-the-content-wrapper {
    position: absolute;
    left: 0;
    bottom: 0;
    text-align: center;
    color: white;
    padding-bottom: var(--wp--preset--spacing--20);
    max-width: 100% !important;
    width: 100%;
    margin-block-start: 0;
    margin-left: 0 !important;
}

.to-the-content-wrapper a {
    overflow: auto;
    position: relative;
}

.to-the-content-wrapper:hover a svg {
    transform: translateY(20%);
}

.to-the-content-wrapper a svg {
    padding: 0.5rem;
    transition: transform 0.15s linear;
}

.post-template-page-cover .wp-site-blocks .wp-block-cover:first-of-type+#wp--skip-link--target,
.page-template-page-cover .wp-site-blocks .wp-block-cover:first-of-type+#wp--skip-link--target {
    margin-top: 0;
}

.wp-block-post-template .wp-block-cover__inner-container {
    position: absolute;
    left: 0;
    bottom: 0;
    top: 0;
    bottom: 0;
}

.wp-block-post-template a {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    font-size: var(--wp--preset--font-size--normal);
    line-height: 2;
    text-indent: 0.5em;
    text-align: left;
    background-color: rgba(0, 0, 0, 0.1);
    padding-top: calc(((100% / 2) * 3) - 2em); 
}

.wp-block-post-template .wp-block-post-title a:hover {
    text-decoration: none !important;
    background-color: rgba(0, 0, 0, 0);
}

.wp-block-post-template a:before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2em;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: -1;
}

footer .wp-block-buttons > .wp-block-button.wp-block-button__width-50 {
    max-width: 280px;
}

@media (max-width: 600px) {
    footer .wp-block-social-links {
        display: none !important;
    }
}

/* fix uncentered middle div in footer... */

footer > div > .wp-block-group:first-of-type {
    display: block;
    text-align: center;
}

footer > div > .wp-block-group:first-of-type > div {
    float: left;
}

footer > div > .wp-block-group:first-of-type > ul {
    display: inline;
    float: none;
    position: absolute;
}

footer > div > .wp-block-group:first-of-type > nav {
    float: right;
}



/* Gallery */

#fullscreen-viewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 100000;
}

#fullscreen-viewer button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

#fullscreen-viewer img {
    max-width: 90%;
    max-height: 90%;
}