/*
Theme Name: Raiffeisen 100 Jahre
Theme URI: https://raiffeisenbank-sennwald.ch
Author: migagentur
Description: 100 Jahre Jubiläum Landing Page
Version: 1.1.8
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
Text Domain: raiffeisen-100
*/

* {
    font-smoothing: antialiased;
}

/* Parallax Elements
---------------------------------------- */
.parallax-element {
    position: absolute;
    pointer-events: none;
    z-index: 10;
    display: none;
}

.parallax-scroll6 {
	display: none !important;
}

body.home .parallax-element:not(.parallax-scroll5-gallery) {
    display: block;
}

body.single-bildergalerie .parallax-scroll1,
body.single-bildergalerie .parallax-scroll5-gallery {
    display: block;
}

.parallax-scroll5-gallery {
    width: 20.6em;
    height: 20.6em;
    filter: blur(30px);
    z-index: 1;
}

body.single-bildergalerie .wp-block-columns + .wp-block-columns {
    margin-top: 0;
}

body.single-bildergalerie .wp-block-gallery {
    margin-top: 4em;
    margin-bottom: 5em;
    position: relative;
    z-index: 9;
}

body.single-bildergalerie .entry-content {
    position: relative;
}

body.single-bildergalerie .entry-content::after {
    content: '';
    position: absolute;
    bottom: 50%;
    left: 50%;
    width: 100%;
    max-width: 1200px;
    aspect-ratio: 3 / 2;
    background-image: url('assets/images/Hintergrundverlauf_03.jpg');
    background-size: cover;
    background-position: center;
    z-index: 1;
    mix-blend-mode: multiply;
    transform: scaleX(-1) translateY(-50%);
    pointer-events: none;
}

body.single-bildergalerie .wp-block-gallery figcaption {
    display: none;
}


body.single-bildergalerie .wp-block-group.has-background {
    padding-left: 60px !important;
    padding-right: 60px !important;
}

.parallax-scroll1 {
    top: 0;
    left: 0;
    width: 11.89em; /* 214px */
    height: 23.22em; /* 418px */
}

.parallax-scroll2 {
    top: 2.5em;
    right: 0;
    width: 20.61em; /* 371px */
    height: 42.11em; /* 758px */
}

.parallax-scroll3 {
    left: 50%;
    width: 0.81em; /* 15px */
    height: 9.07em; /* 163px */
    opacity: 0;
}

.parallax-scroll4 {
    width: 2.97em; /* 53px */
    height: 37.91em; /* 682px */
}

.parallax-scroll5 {
    width: 20.6em; /* 371px */
    height: 20.6em; /* 371px */
    filter: blur(30px);
    z-index: -1;
}

.parallax-scroll5-2 {
    width: 35.56em; /* 640px */
    height: 35.56em; /* 640px */
    filter: blur(30px);
    z-index: -1;
}

.parallax-scroll5-3 {
    width: 27.78em; /* 500px */
    height: 27.78em; /* 500px */
    filter: blur(30px);
    z-index: -1;
}

.parallax-scroll5-4 {
    width: 25em; /* 450px */
    height: 25em; /* 450px */
    filter: blur(30px);
    z-index: -1;
}

.parallax-scroll5-5 {
    width: 38.89em; /* 700px */
    height: 38.89em; /* 700px */
    filter: blur(30px);
    z-index: -1;
}

.parallax-scroll6 {
    width: 5.30em; /* 95px */
    height: 11.23em; /* 202px */
}

*:first-child {
    margin-top: 0;
}

*:last-child {
    margin-bottom: 0;
}

html, body {
    font-size: 18px;
    line-height: 1.25;
    overflow-x: hidden;
}

body {
    padding-top: 6.4em; /* header height ~115px */
    position: relative;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    transform: rotate(-5deg);
}

h1.editor-post-title {
    transform: none;
    font-family: Arial, sans-serif;
    font-size: 40px;
    line-height: 1.125;
    font-weight: 700;
    margin-bottom: 1em;
}


.wp-block-media-text .wp-block-media-text__content {
    padding-right: 0;
    padding-left: 5.7em;
}

.wp-block-media-text.has-media-on-the-right .wp-block-media-text__content {
    padding-right: 5.7em;
    padding-left: 0;
}

.wp-block-list {
    padding-left: 20px;
}

.wp-block-social-links {
    gap: 0.5em !important; /* 9px */
}

.wp-block-social-links .wp-block-social-link a {
    width: 1.5em !important;
    height: 1.5em !important;
}

.wp-block-social-links .wp-block-social-link svg {
    display: none !important;
}

.wp-block-social-links .wp-block-social-link a {
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    transition: filter 0.2s ease;
}

.wp-block-social-links .wp-social-link-facebook a {
    background-image: url('assets/images/fb.svg') !important;
}

.wp-block-social-links .wp-social-link-facebook a:hover {
    background-image: url('assets/images/fb-red.svg') !important;
}

.wp-block-social-links .wp-social-link-instagram a {
    background-image: url('assets/images/insta.svg') !important;
}

.wp-block-social-links .wp-social-link-instagram a:hover {
    background-image: url('assets/images/insta-red.svg') !important;
}

.wp-block-social-links .wp-social-link-linkedin a {
    background-image: url('assets/images/linkedin.svg') !important;
}

.wp-block-social-links .wp-social-link-linkedin a:hover {
    background-image: url('assets/images/linkedin-red.svg') !important;
}

/* Bildergalerie
---------------------------------------- */
.type-bildergalerie .wp-block-post-featured-image {
    position: relative;
}

.type-bildergalerie .galerie-button {
    position: absolute;
    bottom: 1em;
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff;
    color: var(--wp--preset--color--primary);
    font-size: 1em;
    font-weight: 700;
    padding: 0.6em 1.5em;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
    pointer-events: none;
}

.type-bildergalerie .galerie-date {
    color: var(--wp--preset--color--gray-800);
    font-size: 1.1em;
    margin-bottom: 0;
}

.type-bildergalerie h2,
.type-bildergalerie .wp-block-post-title {
    color: var(--wp--preset--color--primary);
    font-size: 1.67em; /* 30px */
    font-weight: 700;
    margin-top: 0.2em;
}

.bildergalerien,
.\31 00-jahre {
    position: relative;
}

.bildergalerien::after,
.\31 00-jahre::after {
    content: '';
    position: absolute;
    bottom: 50%;
    left: 50%;
    width: 100%;
    max-width: 1200px;
    aspect-ratio: 3 / 2;
    background-image: url('assets/images/Hintergrundverlauf_03.jpg');
    background-size: cover;
    background-position: center;
    z-index: -1;
    mix-blend-mode: multiply;
    transform: scaleX(-1);
}

.\31 00-jahre::after {
    bottom: auto;
    top: 0;
}

.gallery-query .wp-block-post-template {
    gap: 3em;
    margin-top: 3em;
}

/* Back Button Shortcode
---------------------------------------- */
.back-button-wrapper {
    max-width: var(--wp--style--global--content-size, 1000px);
    margin-left: auto;
    margin-right: auto;
}

.back-button {
    display: inline-block;
    padding: 0.6em 2em 0.4em;
    border: 2px solid var(--wp--preset--color--primary);
    border-radius: 999px;
    color: var(--wp--preset--color--primary);
    background-color: #fff;
    text-decoration: none;
    font-size: 1em;
    font-weight: 700;
    transition: all 0.2s ease;
}

.back-button:hover {
    background-color: var(--wp--preset--color--primary);
    color: #fff;
}

/* Event List Accordion
---------------------------------------- */
.event-list {
    padding: 1em 0;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
}

.event-list .wp-block-post > * {
    max-width: var(--wp--style--global--content-size, 1000px);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1em;
    padding-right: 1em;
    box-sizing: border-box;
}

.event-list .wp-block-post {
    background-color: var(--wp--preset--color--primary);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1.5em 2em 4.5em 2em;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid #fff;
    border-radius: 2.5em 2.5em 0 0;
    box-sizing: border-box;
    margin-block-start: -3.5em !important;
}

.event-list .wp-block-post:last-child {
    padding-bottom: 1.5em;
}

.event-list .wp-block-post:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.event-list .wp-block-post:not(.is-expanded) {
    cursor: pointer;
}

.event-list .wp-block-post-template {
    padding: 0;
    margin: 0;
    max-width: 100%;
    width: 100%;
    margin: 0 !important;
}

.event-list .event-item__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    cursor: pointer;
    gap: 1em;
}

.event-list .event-item__info {
    flex: 1;
}

.event-list .event-item__toggle {
    width: 3.1em; /* 56px */
    height: 3.1em;
    flex-shrink: 0;
}

.event-list .event-item__toggle svg {
    width: 100%;
    height: 100%;
    display: block;
    transition: transform 0.3s ease;
}

.event-list .wp-block-post.is-expanded .event-item__toggle svg {
    transform: rotate(180deg);
}

.event-list .event-item__header .event-date {
    font-size: 1.67em; /* 30px */
    line-height: 1.4;
    font-weight: 400;
    margin-bottom: 0;
    color: #fff;
}

.event-list .event-item__header h2,
.event-list .event-item__header .wp-block-post-title {
    margin-top: 0;
    font-weight: 900;
    font-size: 1.94em; /* 35px */
    color: #fff;
    line-height: 1.2;
}

.event-list .event-item__header .wp-block-post-title + .event-ort {
    margin-top: -1em;
    font-weight: 900;
    font-size: 1.67em;
    color: #000;
}

.event-list .event-item__content {
    overflow: hidden;
    max-height: 0;
    padding-top: 0;
    transition: max-height 0.4s ease, padding-top 0.4s ease;
}

.event-list .wp-block-post.is-expanded .event-item__content {
    max-height: 1000px;
    padding-top: 1.5em;
}

.event-list .event-item__content p {
    color: #fff;
    font-size: 1em;
    line-height: 1.5;
}

.event-list .event-item__content strong {
    font-weight: 700;
}

.event-list .event-item__content img {
    width: 100%;
    height: auto;
    display: block;
}

.event-list .wp-block-columns {
    gap: 5.6em; /* 100px */
}

/* Button Styles
---------------------------------------- */
.wp-block-button.is-style-anmelden .wp-block-button__link {
    font-size: 1.67em; /* 30px */
    font-weight: 700;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    transform: translateY(-5%);
}

.wp-block-button.is-style-anmelden .wp-block-button__link::before {
    content: '';
    display: block;
    width: 1.87em; /* 56px / 30px */
    height: 1.87em;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='11' fill='%23fff'/%3E%3Cpath d='M12.5 7.172l3.763 4.608.737-.679-5-6.101-5 6.112.753.666 3.747-4.604v11.826h1V7.172z' fill='%23e82025' transform='rotate(90 12 12)'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* History Slider
---------------------------------------- */
.history-slider {
    position: relative;
    overflow: visible;
}

.history-slider .flickity-viewport {
    overflow: visible;
}

.history-slider h2 {
    font-size: 3.89em; /* 70px / 18px */
    transform: rotate(-4deg);
}

.history-slider .wp-block-media-text__content {
    padding-left: 1.9em; /* 35px */
    padding-right: 9.7em; /* 175px */
}

.history-slider .wp-block-media-text {
    position: relative;
    grid-template-columns: 40% 1fr !important;
}

.history-slider .wp-block-media-text__media img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center;
    cursor: pointer;
}

.history-slider .wp-block-media-text:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 0;
    right: 6.4em; /* 115px */
    width: 1px;
    height: 100%;
    background-color: #000;
}

.history-slider .wp-block-media-text {
    width: 100%;
    flex-shrink: 0;
}

.history-slider:after {
    content: 'flickity';
    display: none;
}

/* History Timeline Navigation
---------------------------------------- */
.history-timeline {
    position: relative;
    margin-top: 3em;
    padding: 0 2em;
    overflow: visible;
}

.history-timeline__nav {
    position: relative;
    overflow: visible;
}

.history-timeline__nav .flickity-viewport {
    overflow: visible;
}

.history-timeline__nav::before {
    content: '';
    position: absolute;
    top: 9px;
    left: -100vw;
    right: -100vw;
    height: 1px;
    background-color: #1a1a1a;
    z-index: 0;
}

.history-timeline__item {
    width: 6em;
    margin: 0 0.5em;
    flex-shrink: 0;
}

.history-timeline__btn {
    all: unset;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    position: relative;
    box-sizing: border-box;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0;
}

.history-timeline__dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #1a1a1a;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.history-timeline__item.is-active .history-timeline__dot {
    width: 22px;
    height: 22px;
    background-color: var(--wp--preset--color--primary);
    margin-top: -2px;
}

.history-timeline__year {
    font-family: var(--wp--preset--font-family--amithen);
    font-weight: 400;
    font-size: 2em;
    color: #1a1a1a;
    margin-top: 0.4em;
    transition: color 0.2s ease;
    line-height: 1;
    transform: rotate(-4deg);
}

.history-timeline__item.is-active .history-timeline__year {
    color: var(--wp--preset--color--primary);
}

.history-timeline__btn:hover .history-timeline__dot {
    background-color: var(--wp--preset--color--primary);
}

.history-timeline__btn:hover .history-timeline__year {
    color: var(--wp--preset--color--primary);
}

.history-timeline__next {
    all: unset;
    position: absolute;
    right: 2em;
    top: 50%;
    transform: translateY(-50%);
    width: 3em;
    height: 3em;
    cursor: pointer;
    color: #000;
    transition: color 0.2s ease;
    z-index: 10;
}

.history-timeline__next svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.history-timeline__next:hover {
    color: var(--wp--preset--color--primary);
}

.history-timeline__prev {
    all: unset;
    position: absolute;
    left: 2em;
    top: 50%;
    transform: translateY(-50%);
    width: 3em;
    height: 3em;
    cursor: pointer;
    color: #000;
    transition: color 0.2s ease;
    z-index: 10;
}

.history-timeline__prev svg {
    width: 100%;
    height: 100%;
    transform: rotate(90deg);
}

.history-timeline__prev:hover {
    color: var(--wp--preset--color--primary);
}

@media (min-width: 1201px) {
    .history-timeline__prev {
        left: -4em;
    }
}

.galerie-date {
    color: var(--wp--preset--color--primary) !important;
}

.img-100years img {
    width: 12em;
    height: auto;
}


.entry-content {
    margin-top: 0 !important;
}

.entry-content > .wp-block-group + .wp-block-group,
.entry-content > .wp-block-cover + .wp-block-group {
    margin-top: 0 !important;
}

.entry-content > .wp-block-cover {
    height: 37em;
    position: relative;
}

.entry-content > .wp-block-group.has-white-background-color {
    background-color: transparent !important;
}

/* Logo
---------------------------------------- */
.site-logo img {
    width: 17.8em !important; /* 320px */
    height: auto;
    aspect-ratio: 5 / 1;
}

header nav {
    font-size: 1em !important;
    font-weight: 700 !important;
}

header nav ul {
    font-weight: 700 !important;
    gap: 1.25em !important;
    font-size: 1em !important;
}

header nav li {
    font-size: 1em !important;
    font-weight: 700 !important;
}

.header-inner {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-top: 1.4em !important; /* 25px */
    padding-bottom: 1.4em !important;
}

header + .wp-block-post-featured-image {
    margin-top: 0;
}

.wp-block-cover h1 {
    font-size: 7.78em; /* 140px */
}

.wp-block-cover h1 + p {
    font-size: 1.67em; /* 30px */
    font-weight: 700;
}

footer h3 {
    font-family: var(--wp--preset--font-family--amithen);
    font-weight: 400;
    font-size: 2.5em; /* 45px */
    line-height: 1;
    color: var(--wp--preset--color--primary);
}

footer .custom-logo {
    width: 17.8em !important; /* 320px */
    height: auto;
    aspect-ratio: 5 / 1;
}

footer a {
    text-decoration: none;
    color: var(--wp--preset--color--gray-800);
}

footer a:hover {
    color: var(--wp--preset--color--primary);
    text-decoration: underline;
}

footer .is-layout-flex {
    width: 100%;
}

footer .is-layout-flex > .wp-block-group {
    flex: 1;
}

footer .has-white-background-color {
    background-color: transparent !important;
}

footer {
    position: relative;
}

footer::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    aspect-ratio: 3 / 2;
    background-image: url('assets/images/Hintergrundverlauf_Footer_02.jpg');
    background-size: cover;
    background-position: center;
    z-index: -1;
    mix-blend-mode: multiply;
}

/* Intro Section
---------------------------------------- */
.intro-section {
    position: relative;
}

.intro-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    aspect-ratio: 3 / 2;
    background-image: url('assets/images/Hintergrundverlauf_01.jpg');
    background-size: cover;
    background-position: center;
    z-index: -1;
    mix-blend-mode: multiply;
}

.frontend .intro-section h1 {
    color: #fff !important;
}

/* Burger Menu
---------------------------------------- */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.burger-menu__line {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--wp--preset--color--primary, #e82025);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Burger menu animation when open */
body.nav-open .burger-menu__line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

body.nav-open .burger-menu__line:nth-child(2) {
    opacity: 0;
}

body.nav-open .burger-menu__line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 850px) {
    .burger-menu {
        display: flex;
    }

    header nav {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        padding: 1.5em;
    }

    header nav ul {
        flex-direction: column !important;
        align-items: center !important;
        gap: 1em !important;
    }

    body.nav-open header nav {
        display: flex !important;
    }
}

/* Responsive
---------------------------------------- */
@media (max-width: 999px) {
    html, body {
        font-size: 16px;
    }

    .site-logo img {
        width: 15em !important;
    }
}

@media (max-width: 1100px) {
    .history-slider {
        padding-left: 2em;
        padding-right: 2em;
    }

    footer > .wp-block-group {
        padding-left: 2em;
        padding-right: 2em;
    }
}

@media (max-width: 781px) {
    body.single-bildergalerie .wp-block-columns {
        gap: 1em !important;
    }

    body.single-bildergalerie .wp-block-column:empty {
        display: none;
    }
}

@media (max-width: 800px) {
    .entry-content > .wp-block-group {
        padding: 3em 1.5em !important;
    }

    body.single-bildergalerie .wp-block-group.has-background {
        padding-left: 1.5em !important;
        padding-right: 1.5em !important;
    }

    .header-inner {
        padding: 1.5em !important;
        gap: 1em;
    }

    .header-inner .site-logo,
    .header-inner .main-nav {
        justify-content: center !important;
    }

    header nav {
        position: absolute !important;
        box-sizing: border-box;
    }

    h1 {
        font-size: 4em;
    }

    h2 {
        font-size: 2em;
    }

    .wp-block-cover h1 {
        font-size: 5em;
    }

    .history-slider {
        padding-left: 0;
        padding-right: 0;
    }

    .wp-block-media-text .wp-block-media-text__content {
        padding-left: 3em;
    }

    .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content {
        padding-left: 0;
        padding-right: 3em;
    }

    .history-slider .wp-block-media-text {
        grid-template-columns: 30% 1fr;
    }

    footer .is-layout-flex {
        flex-wrap: wrap !important;
    }

    footer .is-layout-flex .wp-block-group:last-child {
        flex: 0 0 100%;
        margin-top: 3em;
    }
}

@media (max-width: 600px) {
    .intro-section::after {
        aspect-ratio: 1 / 2;
    }

    .wp-block-media-text__content {
        padding: 2em 0 0 0 !important;
    }

    .history-timeline__next,
    .history-timeline__prev {
        display: none;
    }

    .history-slider .wp-block-media-text::after {
        display: none;
    }

    .history-slider .wp-block-media-text {
        margin-right: 2em;
        grid-template-columns: 100% !important;
    }

    .event-list .event-item__header {
        position: relative;
        padding-right: 2.5em;
    }

    .event-list .event-item__toggle {
        position: absolute;
        top: -0.5em;
        right: -1em;
        width: 2em;
        height: 2em;
    }
}

@media (max-width: 500px) {
    h1 {
        font-size: 3em;
    }

    header nav li {
        width: 100% !important;
    }

    header nav li a {
        font-size: 1.4em;
    }

    .parallax-element,
    body.home .parallax-element,
    body.single-bildergalerie .parallax-scroll1,
    body.single-bildergalerie .parallax-scroll5-gallery {
        display: none !important;
    }
}