/*
Theme Name: Rebstock
Theme URI:
Author: Andy Rudorfer
Author URI:
Description: Custom Theme
Version: 1.4.8
Text Domain: rebstock
*/

/* CSS Reset
---------------------------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: inherit;
}

html {
    box-sizing: border-box;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
}

b,
strong {
    font-weight: var(--wp--custom--font-weight--semi-bold);
}

ol,
ul {
    padding: 0;
}

ol:where(:not([class*="wp-block"])),
ol:where(.wp-block-list),
ul:where(:not([class*="wp-block"])),
ul:where(.wp-block-list) {
    padding-inline-start: var(--wp--preset--spacing--medium);
}

div[class*="wp-block-"] figcaption {
    color: var(--wp--preset--color--secondary);
    font-size: var(--wp--preset--font-size--x-small);
    margin-bottom: 0;
    margin-top: 20px;
    text-align: center;
}

img,
figure {
    max-width: 100%;
    height: auto;
}

/* Temporary fix for text-decoration-thickness in Firefox */
@-moz-document url-prefix() {
    a {
        text-decoration-thickness: 0.1rem !important;
    }
}

/* Standardize form styling
--------------------------------------------- */

input,
button,
textarea,
select {
    font: inherit;
}

input[type="button"],
input[type="email"],
input[type="search"],
input[type="submit"],
input[type="text"],
textarea {
    -webkit-appearance: none;
    appearance: none;
}

input:not([type="submit"]),
select,
textarea,
.wp-block-post-comments-form input:not([type="submit"]):not([type="checkbox"]),
.wp-block-post-comments-form textarea {
    color: var(--wp--preset--color--main);
    border-radius: 5px;
    border: solid 1px var(--wp--preset--color--border-light);
    padding: 0.5em 1em;
    font-size: var(--wp--preset--font-size--small);
    background-color: #fff;
}

input:focus-visible,
textarea:focus-visible {
    outline-color: var(--wp--preset--color--primary);
}

input[type="checkbox"],
input[type="image"],
input[type="radio"] {
    width: auto;
}

label {
    width: 100%;
    display: block;
}

::placeholder {
    color: var(--wp--preset--color--secondary);
    font-size: var(--wp--preset--font-size--small);
    opacity: 0.75;
}

/* Helper styles
---------------------------------------------------------------------------- */

a {
    text-decoration: none;
    transition: all 0.35s ease-in-out;
}

.site-content a:link,
.site-content a:focus,
.site-content a:visited {
    color: var(--wp--preset--color--primary);
}

.site-content a:hover {
    text-decoration: underline;
}

a.more-link {
    display: block;
}

.wp-block-categories {
    position: relative;
}

/* Adjust terms at bottom of posts */
.single .wp-block-group .wp-block-post-terms,
.blog .wp-block-group .wp-block-post-terms {
    margin-bottom: -8px !important;
}

/* Remove margin on term description on archive pages */
.wp-block-term-description p:last-child {
    margin-bottom: 0;
}

/* Remove last separator on post list */
.remove-border-and-padding
    .wp-block-post-template
    li:last-child
    .wp-block-separator {
    display: none;
}

/* Hide post meta div if no tags assigned */
.single .wp-block-group:has(> .post-meta:empty) {
    display: none;
}

.wp-block-group:empty:has(+ .comment-respond) {
    display: none;
}

.row-logos > figure {
    flex-shrink: 1 !important;
}

@media (max-width: 781px) {
    .rebstock-hide-on-mobile {
        display: none;
    }

    .rebstock-unstick-mobile {
        position: static;
    }
}

.fifty-bottom-parent {
    position: relative;
}

.fifty-bottom-child {
    position: absolute;
    bottom: 0; /* an der unteren Kante des Parents */
    left: 50%; /* optional: horizontal zentriert */
    transform: translate(-50%, calc(50% + -8px));
    min-width: max-content; /* 50% seiner eigenen Höhe nach unten */
}

.image-border {
    border: 2px solid transparent;
    border-radius: 50%;
    transition: all 0.35s ease-in-out;
    filter: grayscale(100%);

    img {
        padding: 4px;
    }

    &:hover {
        border: 2px solid var(--wp--preset--color--primary);
        filter: grayscale(0%);
    }
}

/* Sticky header */
header:has(> .is-position-sticky) {
    position: sticky;
    top: calc(0px + var(--wp-admin--admin-bar--height, 0px));
    z-index: 100;
    transition: transform 0.35s ease-in-out;
}

.site-header.hide-on-scroll {
    transform: translateY(-100%);
}

@media (min-width: 880px) {
    .wp-block-navigation__submenu-icon {
        display: none !important;
    }
}

.site-footer a {
    position: relative;
    display: inline-block;
    text-decoration: none;
}

.site-footer a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 0.5px;
    width: 0;
    background-color: var(--wp--preset--color--tertiary);
    transition: all 0.35s ease-in-out;
}

.site-footer a:hover::after {
    width: 100%;
}

.wp-block-heading {
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

@media (max-width: 600px) {
    .ar-content {
        padding-left: var(--wp--preset--spacing--medium) !important;
        padding-right: var(--wp--preset--spacing--medium) !important;
    }

    /* .ar-hero-image img {
        min-height: 13.75rem;
        object-fit: cover;
    } */
}

@media (max-width: 781px) {
    .footer-hours-title {
        text-align: left;
    }

    .footer-hours {
        justify-content: flex-start;
    }
}

/* body[class*="parent-pageid-"] .ar-nav-leistungen a {
    text-decoration: none;
    background: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--base) !important;
} */

@media (max-width: 385px) {
    .contact-hours .wp-block-group {
        gap: 0;
    }

    .contact-hours > .wp-block-group:not(:last-child) {
        margin-bottom: 10px !important;
    }
}
