/**
 * Theme Name:        Capareto
 * Theme URI:         https://capareto.de/
 * Description:       The main theme for the Capareto product home page
 * Version:           0.0.1
 * Author:            David Franke
 * Tags:              block-patterns, full-site-editing
 * Text Domain:       capareto
 * Domain Path:       /assets/lang
 * Tested up to:      6.8.1
 * Requires at least: 6.7
 * Requires PHP:      7.4
 * License:           Proprietary
 * License URI:       https://www.cappelino.de
 */

/* custom banner for different screens sizes, corresponds to custom block style 'Banner 80/20': */
.wp-block-group.is-style-banner-80-20 {
    background-color: #37773c;
    background-position: 100% 50%;
    background-repeat: no-repeat;
    background-size: contain;
    background-attachment: scroll;
    padding-top: var(--wp--preset--spacing--30);
    padding-bottom: var(--wp--preset--spacing--30);
    padding-left: var(--wp--preset--spacing--60);
    padding-right: var(--wp--preset--spacing--60);
    margin-left: var(--wp--preset--spacing--n-50);
    margin-right: var(--wp--preset--spacing--n-50);
}
@media (min-width:750px) {
    .wp-block-group.is-style-banner-80-20 {
        background-image: url('/wp-content/themes/capareto-theme/assets/images/banner_header_capareto_desktop.png');
        aspect-ratio: 3.38;
        align-items: center;
    }
}
@media (max-width:749px) {
    .wp-block-group.is-style-banner-80-20 {
        background-image: url('/wp-content/themes/capareto-theme/assets/images/banner_header_capareto_mobile.png');
        padding-top: 15%;
        aspect-ratio: 0.69;
        align-items: flex-start;
    }
}

/* default navigation links */
.wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content {
    color: var(--wp--preset--color--contrast);
}
.wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content:hover {
    color: var(--wp--preset--color--spring-green-100);
}

/* highlight elements that are selected by an anchor link */
.highlight {
    background-color: transparent;
    animation: highlight-anim 1s ease-in-out;
    animation-iteration-count: 2;
    animation-delay: 0.5s;
}

@keyframes highlight-anim {
    0% {
        background-color: transparent;
    }
    50% {
        background-color: var(--wp--preset--color--tea-green-70);
    }
    100% {
        background-color: transparent;
    }
}

.wp-block-group.has-content-centered {
    align-content: center;
}

/* alternative style for button hover does not work in custom style */
:root :where(.wp-block-button.is-style-alternative .wp-block-button__link:hover) {
    background-color: #006229;
}
:root :where(.wp-block-button.is-style-monochrome .wp-block-button__link:hover) {
    background-color: #5c5c5c;
}

/* override height for slider */
.swiper-slide {
    height: auto !important;
}

/* Settings for header and navigation */
@media (max-width:919px) {
    /* navigation contact button: */
    .wp-block-buttons.is-style-main-nav .wp-block-button__link {
        font-size: var(--wp--preset--font-size--small);
        padding: 4px 8px;
        margin-top: 8px;
        max-width: 4.6em;
        max-height: 1.9em;
        white-space: nowrap;
        text-align: left;
        overflow: hidden; /* show only part of the text */
        text-overflow: clip;
        word-spacing: 0.5em;
    }
}
/* override the default wordpress mobile settings: */
@media ( min-width: 775px ) {
    .wp-block-navigation__responsive-container-open:not(.always-shown) {
        display: none !important;
    }
    .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
        display: block !important;
    }
}
@media ( min-width: 600px ) {
    .wp-block-navigation__responsive-container-open:not(.always-shown) {
        display: flex;
    }
    .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
        display: none;
    }
}

/* poor man's tabbed panel implementation: */
.wp-block-group.is-style-tab {
    display: block;
}
.wp-block-group.is-style-tab.tab-hidden {
    display: none;
}

/* rounded highlight background */
mark.has-inline-color {
    border-radius: 0.7em;
    display: inline-block;
    padding: 0 0.4em;
}

/* styles for 08-table-feature-list */
.wp-block-table.is-style-feature-list table {
    border: none;
    border-collapse: separate;
    border-spacing: 0 1rem;
}

.wp-block-table.is-style-feature-list thead {
    border: none;
}

.wp-block-table.is-style-feature-list td, .wp-block-table.is-style-feature-list th {
    border: none;
    padding: 1rem 0 1rem 1rem;
}

.wp-block-table.is-style-feature-list td:first-child {
    border-radius: 8px 0 0 8px;
}

.wp-block-table.is-style-feature-list td:last-child {
    border-radius: 0 8px 8px 0;
    padding-right: 1rem;
}

.wp-block-table.is-style-feature-list tr:nth-child(2n+1) > td {
    background-color: var(--wp--preset--color--jade-20);
}

.wp-block-table.is-style-feature-list tr:nth-child(2n) > td {
    background-color: var(--wp--preset--color--white-smoke);
}
