/*
Theme Name: KS Aspen
Theme URI: https://github.com/KickstartDental/ks-aspen
Author: KickStart Dental Marketing
Author URI: https://kickstartdental.com
Description: A dental block theme by KickStart Dental Marketing.
Requires at least: 6.0
Tested up to: 6.2.2
Requires PHP: 5.7
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ksaspen
Tags: full-site-editing
*/

/* Custom
---------------------------------------------------------------------------- */

/* Media Queries
--------------------------------------------- */

/* Extend responsive layouts to 991px (default is max 781px) */
@media (max-width: 991px) {

    /* Extend responsive column layouts to 991px (default is max 781px) */
    .wp-block-columns {
        flex-wrap: wrap !important;
    }

    .wp-block-columns .wp-block-column {
        flex-basis: 100% !important;
    }

    /* Extend responsive query loop > post template grid layouts to 991px (default is max 599px) */
    .wp-block-post-template li {
        width: 100% !important;
    }
}

/* Let query loop > post template 4-column grids transform into 2 columns on tablets  */
@media (max-width: 1024px) {

    .wp-block-post-template.is-flex-container.is-flex-container.columns-4>li {
        width: calc(50% - .625em);
    }
}

/* Query Loop Grid
--------------------------------------------- */

/* Remove column & row gap from Post Template*/
.no-gap {
    gap: 0 !important;
}

/* Fill remain space between list items */
.no-gap li {
    flex-grow: 1;
}

.no-gap-cover {
    flex-grow: 1 !important;
}

.gap-30 {
    gap: var(--wp--preset--spacing--30) !important;
}

.gap-30 li {
    flex-grow: 0;
}

@media (min-width: 600px) {
    .wp-block-post-template.is-flex-container.gap-30.columns-3>li {
        width: calc(33.33333% - var(--wp--preset--spacing--30) / 1.5);
    }
}

/* Hover Card
--------------------------------------------- */

.hover-card {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    flex-grow: 1 !important;
}

.has-background-dim {
    transition: all 0.25s;
}

.hover-card-title {
    opacity: 1;
    transition: all 0.15s;
}

.hover-card-body {
    position: absolute;
    bottom: 0;
    margin-right: var(--wp--preset--spacing--30);
    transform: translateY(100%);
    transition: all 0.25s;
    visibility: hidden;
    opacity: 0;
}

.hover-card-body .read-more {
    transition: all 0.25s ease-out;
}

.hover-card:hover .has-background-dim {
    opacity: 1.0 !important;
}

.hover-card:hover .hover-card-title {
    opacity: 0;
    transform: translateY(-100%);
}

.hover-card:hover .hover-card-body {
    transform: translateY(calc(0% - var(--wp--preset--spacing--30)));
    visibility: visible;
    opacity: 1;
}

/* Primary Navigation
--------------------------------------------- */

/* Add padding to submenu dropdown container */
header .wp-block-navigation .wp-block-navigation__submenu-container {
    padding: var(--wp--preset--spacing--20);
    @media (min-width: 600px) {    
        box-shadow: var(--wp--preset--shadow--small);
    }    
}

/* Remove padding-right on navigations items with children */
header .wp-block-navigation .wp-block-navigation__container .has-child a {
    padding-right: 8px;
}

/* Fix submenu not fitting content */
.wp-block-navigation__submenu-container {
    width: max-content !important;
}

/* Homepage Here
--------------------------------------------- */

.hero {
    min-height: calc(100vh - 145.59px) !important;
}


/* Read More Link
--------------------------------------------- */

.wp-block-read-more {
    transition: all 0.25s ease-out;
    &:hover {
        border-color: var(--wp--preset--color--contrast);
    }
}


/* Template Parts
--------------------------------------------- */

/* Remove margin-top from template part containers */
.wp-block-template-part {
    margin-top: 0 !important;
}