/*
Theme Name: Pacific Dragon
Theme URI: https://github.com/openmindculture/pacific-dragon-films
Text Domain: twentytwentyfive-child
Template: twentytwentyfive
Author: @openmindculture
Author URI: https://www.ingo-steinke.de/
Description: Minimalist WordPress theme with cute cartoon animations
Requires at least: 6.1
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.1.1
License: proprietary
*/

:root {
    --wp--preset--font-size--small: 1.375rem;
    --wp--preset--font-size--subline: 1.8594rem;
    --wp--preset--font-size--large: 2.625rem;
    /* adaptive header sizes see below */
    --wp--style--global--content-size: 784px;
    --wp--style--global--wide-size: 3592px;
}

@media (max-width: 767px) {
    :root {
        --wp--preset--font-size--small: 1.25rem;
    }
}

@media (max-width: 499px) {
    :root {
        --wp--preset--font-size--small: 1.125rem;
    }
}

html {
    /* iOS Safari font size workaround */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    font-size: 16px;
}

body, p {
    background-color: var(--wp--preset--color--base);
    color: var(--wp--preset--color--primary);
    font-family: var(--wp--preset--font-family--lato);
    font-size: var(--wp--preset--font-size--small);
    font-weight: 400; /* 400 regular normal */
    line-height: 1.2;
}

.block-editor-rich-text__editable.wp-block-paragraph:not(.has-text-align-left):not(.has-text-align-right),
.site-main p:not(.has-text-align-left):not(.has-text-align-right) {
    text-align: center;
}

b, strong {
    font-weight: 700; /* bold, Lato has no semibold */
}

/* font style "Display" in the block editor sidebar */
.is-style-text-subtitle {
    letter-spacing: 4px;
    line-height: 1.25;
}

body {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    overflow-x: hidden;
    /* keep footer visible at the bottom (adjust to heights and spacing) */
    min-height: calc(100vh - 3rem);
}

a, a:link, a:visited, a:active {
    color: var(--wp--preset--color--primary);
    text-decoration: none;
}

a:hover, a:focus {
    color: var(--wp--preset--color--secondary);
    text-decoration: none;
}

main {
    flex: 1;
    padding-bottom: 4rem;
}

main,
.site-header-inner,
.site-footer-inner,
.alignwide {
    max-width: unset;
    margin-left: auto;
    margin-right: auto;
}

main,
main .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)),
.editor-styles-wrapper > .is-root-container.is-layout-constrained.block-editor-block-list__layout {
    min-width: min(calc(100vw - 3rem), 3592px);
    max-width: 100vw;
}

body.film-template-default.single main {
    margin: 0 auto;
    min-width: unset;
}

body.film-template-default.single main p {
    margin: 0 auto;
    min-width: unset;
    max-width: 1024px;
}

body.film-template-default.single main .custom-film-teaser {
    margin-bottom: 2rem;
    margin-left: -2rem;
}

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

@media (max-width: 3592px) {
    img {
        max-width: 100%;
    }

    .wp-block-image img {
        width: 100%;
    }

    body {
        max-width: 100%;
        overflow-x: hidden;
        overflow-wrap: break-word;
    }

    main {
        max-width: calc(100% - 3rem);
        padding-left: 1rem;
        padding-right: 1rem;
    }

}

.wp-block-image.size-full:where(:not(.alignleft):not(.alignright)) {
    text-align: center;
}

.alignfull .wp-block-columns.is-style-section-1,
.alignfull > .wp-block-image.size-full:where(:not(.alignleft):not(.alignright)) img {
    margin-left: -1rem !important;
    margin-right: -1rem !important;
    width: 100vw !important;
    max-width: unset !important;
}

main .is-layout-constrained > .custom-film-teasers {
    margin-left: -1rem !important;
    margin-right: -1rem !important;
}

@media (max-width: 767px) {
    .alignfull .wp-block-columns.is-style-section-1,
    .alignfull .wp-block-columns.is-style-section-2,
    .alignfull > .wp-block-image.size-full:where(:not(.alignleft):not(.alignright)) img,
    main .is-layout-constrained > .custom-film-teasers {
        margin-left: -1.5rem !important;
        margin-right: -1.5rem !important;
    }
    /* less vertical spacing on mobile for pixel-perfect inline-style spacer blocks */
    .wp-block-spacer {
        zoom: 0.5;
        width: auto !important;
        min-height: 1rem;
    }
}

header .site-navigation-menu-link {
    position: absolute;
    top: 3rem;
    right: 1rem;
}

header .site-header-row-title {
    display: flex;
    justify-content: center;
}

header .navigation-menu {
    display: none;
    background-color: var(--wp--preset--color--base);
    color: var(--wp--preset--color--primary);
    padding: 0;
}

@media (max-width: 698px) {
    header .navigation-menu {
        width: 100%;
        min-height: 360px;
    }
}

@media (min-width: 500px) {
    header .navigation-menu {
        box-shadow: none;
    }
    header .navigation-menu,
    header .site-navigation-menu-link {
        margin-right: 2rem;
    }
}

header .navigation-menu.active,
header .navigation-menu:target {
    display: block;
}

header .navigation-menu:target + .site-navigation-menu-link {
    display: none;
}

header nav {
    position: absolute;
    top: 1.4375rem;
    right: 0;
    padding: 1rem;
    background-color: var(--wp--preset--color--base);
    z-index: 1;
}

header .site-navigation-menu-close {
    color: var(--wp--preset--color--primary);
    font-size: 1rem;
    line-height: 1;
    text-decoration: none;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

header .site-navigation-menu-close svg {
    width: 2.5rem;
    height: 3rem;
    margin-right: 0.5rem;
    color: var(--wp--preset--color--primary);
}

body > .wp-site-blocks {
    padding-top: 0;
    padding-bottom: 0;
}

header,
.wp-site-blocks header {
    padding-top: var(--wp--style--root--padding-top);
    background-color: var(--wp--preset--color--base);
    color: var(--wp--preset--color--primary);
}

.site-title,
.wp-block-site-title {
    color: var(--wp--preset--color--primary);
}

.site-logo {
    height: 320px;
    width: auto;
    margin: 6rem auto 4rem auto;
}

header .site-header-row.is-layout-flex {
    flex-wrap: nowrap;
    position: relative; /* anchors absolute burger menu position */
}

header nav ul {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 0;
    list-style: none;
    margin: 5rem 0 1rem 0;
    padding: 0;
    background-color: var(--wp--preset--color--base);
    color: var(--wp--preset--color--primary);
}

nav ul li {
    position: relative;
    padding: 0.25rem 0.25rem 0.25rem 0;
    text-align: center;
}

header nav ul li a {
    display: block;
    padding: 0.75rem 4rem 0.75rem 4rem;
}

header nav ul li {
    background-color: var(--wp--preset--color--base);
    color: var(--wp--preset--color--primary);
    position: relative;
    text-transform: uppercase;
}

header nav ul li,
header nav ul li a,
header nav ul li a:link,
header nav ul li a:visited,
header nav ul li a:active {
    color: var(--wp--preset--color--primary);
    text-decoration: none;
    font-size: 1.375rem;
}

header nav > ul > li:hover,
header nav > ul > li:hover > a,
header nav > ul > li:focus,
header nav > ul > li:focus > a,
header nav ul li ul li:hover,
header nav ul li ul li:hover a,
header nav ul li ul li:focus,
header nav ul li ul li:focus a {
    background-color: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--base);
    text-decoration: none;
}

/* Dropdown styles */
nav ul ul {
    display: none;
    top: 100%;
    left: 0;
    flex-direction: column;
    background: var(--wp--preset--color--base);
    position: relative;
    min-width: 200px;
    z-index: 1000;
    padding: 0.5rem 0 0.5rem 0;
    gap: 0;
}

nav ul li:hover > ul,
nav ul li:focus-within > ul {
    display: flex;
}

nav ul ul li {
    width: 100%;
}

::selection {
    background-color: var(--wp--preset--color--secondary);
    color: var(--wp--preset--color--base);
}

.wp-block-list {
    padding-left: 0;
}

.wp-block-list li {
    list-style-type: none;
    display: flex;
    flex-direction: row;
}

.wp-block-list li::before {
    content: "·";
    padding-right: 1rem;
}

footer {
    padding-bottom: var(--wp--style--root--padding-bottom);
}

footer,
.footer-copyright,
.footer-imprint {
    font-size: 1rem;
}

.site-footer-inner {
    padding: 3rem 1rem 3rem 1rem;
}

.site-footer-inner .wp-block-group + .wp-block-group {
    margin-top: 1rem;
}

.footer-imprint {
    text-transform: none;
}

footer .site-footer-inner {
    background-color: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--base);
}

footer .social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

footer .social-links svg,
footer .social-links img {
    height: 2rem;
    width: auto;
}

footer .social-links svg.logo-youtube,
footer .social-links img.logo-youtube {
    height: 1.5rem;
}

footer .is-layout-flex {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
}

footer a,
footer a:link,
footer a:visited,
footer a:active {
    text-decoration: none;
    color: var(--wp--preset--color--base);
}

footer .wp-block-column.footer-links,
footer .wp-block-column.footer-copyright {
    text-align: center;
}

h1, body h1, :root :where(.is-layout-constrained) > h1 {
    font-size: var(--wp--preset--font-size--large);
    font-weight: 500; /* medium */
}

h2, body h2, :root :where(.is-layout-constrained) > h2 {
    font-size: var(--wp--preset--font-size--large);
    font-weight: 500; /* medium */
}

.has-font-family-lato {
    font-family: var(--wp--preset--font-family--lato);
}

.is-horizontal {
    flex-direction: row;
    flex-wrap: wrap;
}

.is-horizontal ul {
    flex-direction: row;
    display: flex;
    gap: 1rem;
}

.hidden,
.initially-hidden,
.visually-hidden,
.hidden-fields-container,
.wpcf7 .hidden-fields-container {
    display: none;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.initially-hidden:target,
.active .initially-hidden,
.active + .initially-hidden {
    display: block;
}

.wp-block-details-close {
    appearance: none;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    cursor: pointer;
}

.custom-film-teasers + .wp-block-spacer {
    height: 30px !important;
}

.custom-film-teaser + .custom-film-teaser {
    margin-top: 5rem;
}

.custom-film-teaser-info {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: calc(100% - 2rem);
    margin-top: 1rem;
    margin-left: 1rem;
}

.custom-film-teaser-info > :last-child {
    margin-left: auto;
}

@media (max-width: 500px) {
    .custom-film-teaser-info > :last-child {
        flex-basis: 100%;
    }
}

.custom-film-teaser-title {
    font-weight: bold;
    text-transform: uppercase;
    margin-right: 0.5ch;
}

.custom-film-teaser-img-wrap {
    position: relative;
}

.custom-film-teaser-img {
    display: block;
    width: 100%;
    width: min(100vw, 3592px) !important;
}

.custom-film-teaser-img--hover {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.25s ease;
    width: min(100vw, 3592px) !important;
}

.custom-film-teaser-img-wrap:hover .custom-film-teaser-img--hover {
    opacity: 1;
}

@media (max-width: 499px) {
    .custom-film-teaser-duration {
        display: block;
    }
    .custom-film-teaser-duration .comma {
        display: none;
    }
}

/* Use default columns block and select "style 1" */
.wp-block-columns.is-style-section-1,
.wp-block-column.is-style-section-1 {
    background-color: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--base);
    display: flex;
    align-items: center !important;
}

.wp-block-columns.is-style-section-1 p,
.wp-block-column.is-style-section-1 p {
    background-color: transparent;
    color: var(--wp--preset--color--base);
    text-wrap: pretty;
    position: relative;
}

.wp-block-columns.is-style-section-1 .wp-block-column,
.wp-block-column.is-style-section-1 {
    padding: 6rem 4rem 7rem 4rem;
}

@media (max-width: 781px) {
    .wp-block-columns.is-style-section-1 .wp-block-column,
    .wp-block-column.is-style-section-1 {
        padding: 2rem 4rem 2rem 4rem;
    }
    .wp-block-columns.is-style-section-1 .wp-block-column:first-child {
        padding-top: 4rem;
    }
    .wp-block-columns.is-style-section-1 .wp-block-column:last-child {
        padding-bottom: 4rem;
    }
}

.wp-block-columns.is-style-section-1 .wp-block-column,
.wp-block-columns.is-style-section-1 .wp-block-column p {
    background-color: transparent;
    color: var(--wp--preset--color--base);
}

.wp-block-columns.is-style-section-1 .wp-block-column p {
    max-width: 45rem;
    margin: 0 auto;
    text-align: center;
}

body.page-imprint .wp-block-columns:has(.is-style-section-1) {
    margin-bottom: 4rem;
}

body.page-imprint .is-style-section-1 ~ p,
body.page-imprint .wp-block-columns:has(.is-style-section-1) ~ p {
    padding-left: 4rem;
    max-width: calc(100vw - 5rem);
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

@media (min-width: 782px) {
    .wp-block-columns.is-style-section-1 p .shape-left,
    .wp-block-columns.is-style-section-1 p .shape-right {
        display: block;
        height: 100%;
        min-height: 220px;
        shape-margin: 0;
    }

    .wp-block-columns.is-style-section-1 p .shape-left {
        float: left;
        width: 18%;
        shape-outside: polygon(0% 0%, 100% 0%, 10% 50%, 100% 100%, 0% 100%);
    }

    .wp-block-columns.is-style-section-1 p .shape-right {
        float: right;
        width: 9%;
        shape-outside: polygon(100% 0%, 0% 0%, 90% 50%, 0% 100%, 100% 100%);
    }

    .wp-block-columns.is-style-section-1 .wp-block-column:last-child p {
        margin-right: -7rem;
    }
    .wp-block-columns.is-style-section-1 + .wp-block-columns.is-style-section-1 .wp-block-column:last-child p,
    .wp-block-columns.is-style-section-1 ~ .wp-block-columns.is-style-section-1 .wp-block-column:last-child p {
        margin-right: auto;
    }
    .wp-block-columns.is-style-section-1 + .wp-block-columns.is-style-section-1 .wp-block-column:first-child p,
    .wp-block-columns.is-style-section-1 ~ .wp-block-columns.is-style-section-1 .wp-block-column:first-child p {
        margin-left: -7rem;
    }

    .wp-block-columns.is-style-section-1 .wp-block-column:last-child p .shape,
    .wp-block-columns.is-style-section-1 ~ .wp-block-columns.is-style-section-1 .wp-block-column:first-child p .shape {
        display: none;
    }


    .wp-block-columns.is-style-section-1 ~ .wp-block-columns.is-style-section-1 .wp-block-column:last-child p {
        max-width: 39rem;
    }
}

/* Pure CSS slide show with cropped partial preview to indicate more content to discover */

.wp-block-columns.is-style-section-2 {
    display: flex;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 0;
    max-width: unset;
    width: 100vw;
    margin-left: -1rem !important;
}

.wp-block-columns.is-style-section-2:not(.is-not-stacked-on-mobile)>.wp-block-column,
.wp-block-columns.is-style-section-2 > * {
    flex: 0 0 24% !important;
    width: 24%;
    scroll-snap-align: start;
}

.wp-block-columns.is-style-section-2 img {
    object-fit: cover;
    aspect-ratio: 1.65;
}

.wp-block-columns.js-drag-scroll.is-style-section-2 {
    scrollbar-width: none;
    cursor: grab;
}

 .wp-block-columns.js-drag-scroll.is-style-section-2::-webkit-scrollbar {
    display: none;
}

/* While actively dragging */
.wp-block-columns.is-style-section-2.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    scroll-behavior: auto;
    user-select: none;
}

.wp-block-columns.is-style-section-2.is-dragging img {
    pointer-events: none;
    user-select: none;
}

@media (max-width: 1024px) {
    .wp-block-columns.is-style-section-2:not(.is-not-stacked-on-mobile)>.wp-block-column,
    .wp-block-columns.is-style-section-2 > * {
        flex: 0 0 30% !important;
        width: 30%;
        scroll-snap-align: start;
    }
}

@media (max-width: 999px) {
    .wp-block-columns.is-style-section-2:not(.is-not-stacked-on-mobile)>.wp-block-column,
    .wp-block-columns.is-style-section-2 > * {
        flex: 0 0 45% !important;
        width: 45%;
        scroll-snap-align: start;
    }
}

@media (max-width: 599px) {
    .wp-block-columns.is-style-section-2:not(.is-not-stacked-on-mobile)>.wp-block-column,
    .wp-block-columns.is-style-section-2 > * {
        flex: 0 0 85% !important;
        width: 85%;
        scroll-snap-align: start;
    }
}

/* TODO add editor preview styles to prevent disappearing thumbnail images */

/* hide misleading full-site editing option ("Website bearbeiten") in admin bar */

#wp-admin-bar-site-editor {
    display: none;
}

/* facilitate preview and testing */

#wpadminbar {
    opacity: 0.25;
    z-index: -1;
    transition: opacity 0.5s ease;
}

#wpadminbar:hover {
    opacity: 1;
    z-index: 100;
}