/*
Theme Name: Platán Tata
Theme URI: 
Author: ZKDesign
Author URI: 
Description: 
Requires at least: 7.1
Tested up to: 7.1
Requires PHP: 5.7
Version: 0.1.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: twentytwentyfive
Text Domain: platan-tata
Tags: 
*/

:root {
    --transition-time: 200ms;
}

html {
    scroll-behavior: smooth;
}

.wp-site-blocks :focus {
    outline-width: 0;
}

header.wp-block-template-part {
    position: fixed;
    inset-inline: 0;
    top: var(--wp-admin--admin-bar--height, 0px);
    z-index: 15;
}
header.wp-block-template-part > *,
header.wp-block-template-part .wp-block-site-logo img {
    transition-duration: var(--transition-time);
    transition-property: color, background-color, filter, -webkit-filter;
}
header.wp-block-template-part.scrolled > .has-white-color,
header.wp-block-template-part.scrolled .wp-block-navigation:not(.is-style-button-like) .wp-block-navigation__container .has-child .wp-block-navigation__submenu-container .wp-block-navigation-item {
    color: var(--wp--preset--color--text-body) !important;
}
header.wp-block-template-part.scrolled > .has-background {
    background-image: none !important;
    background-color: var(--wp--preset--color--white);
}
header.wp-block-template-part.scrolled .wp-block-site-logo img,
.wp-block-site-logo.inverted img {
    -webkit-filter: invert(1);
    filter: invert(1);
}
header.wp-block-template-part.scrolled .wp-block-navigation:not(.is-style-button-like) .wp-block-navigation__container .has-child .wp-block-navigation__submenu-container {
    background-color: var(--wp--preset--color--white) !important;
}

.wp-block-epico-dynamic-year-block p {
    margin-block: 0;
}

.relative {
    position: relative;
}

:where(ul) {
    list-style-type: disc;
}

:where(figcaption) {
    text-align: center;
}

[id] {
    scroll-margin-top: var(--platan-heading-height, 70px);
}

.pswp {
    --pswp-bg: rgba(0,0,0,0.75);
}

@media screen and (max-width: 781px) {
    h2.wp-block-heading:not(.no-center-on-mobile) {
        text-align: center;
    }
}

/* Dot separated, dont show it in editor */
body:not(.editor-styles-wrapper, .block-editor-page) .wp-block-group.is-layout-flex.is-style-dot-separator > *:not(:last-child) {
    display: flex;
    gap: inherit;
}
body:not(.editor-styles-wrapper, .block-editor-page) .wp-block-group.is-layout-flex.is-style-dot-separator > *:not(:last-child)::after {
    content: '·';
}

/* Pipe separated navigation styling */
.wp-block-navigation.is-style-pipe-separated .wp-block-navigation-link:not(:last-child) {
    gap: inherit;
}
.wp-block-navigation.is-style-pipe-separated .wp-block-navigation-link:not(:last-child)::after {
    content: '|';
}

/* Button like navigation styling */
.wp-block-navigation.is-style-button-like {
    line-height: 1.3;
}
.wp-block-navigation.is-style-button-like li.wp-block-navigation-submenu {
    padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
}
.wp-block-navigation.is-style-button-like button {
    padding-block: 0;
}

/* Navigation overlay: submenus open inline (accordion) instead of as absolute dropdowns */
.wp-block-navigation__overlay-container .wp-block-navigation .has-child {
    flex-wrap: wrap;
    justify-content: var(--navigation-layout-justification-setting, flex-start);
}
.wp-block-navigation__overlay-container .wp-block-navigation .has-child .wp-block-navigation__submenu-container {
    position: static;
    flex-basis: 100%;
    min-width: 0;
    border: none;
    background-color: transparent;
    align-items: var(--navigation-layout-justification-setting, flex-start);
}
/* Navigation overlay: main menu items a bit more bold to make them more distinct when submenus open */
.wp-block-navigation__overlay-container .wp-block-navigation > ul > li > .wp-block-navigation-item__content > .wp-block-navigation-item__label {
    font-weight: 600;
}

/* Social icon stylings */
.wp-block-social-links.is-style-logos-only .wp-social-link {
    color: inherit;
}
.social-smaller-gap .wp-block-social-links {
    gap: var(--wp--preset--spacing--20);
}

/* Offer badge */
.offer-badge {
    position: absolute;
    left: 0;
    top: var(--wp--preset--spacing--50, 32px);
    z-index: 2;
}
.offer-badge:empty {
    display: none;
}

/* Carousel customizations */
.wp-block-cb-carousel-v2 {
    --wp--custom--carousel-block--navigation-size: clamp(30px, 30px + ((1vw - 3.2px) * 1.905), 46px);
    --wp--custom--carousel-block--pagination-bottom: var(--wp--preset--spacing--40);
    --wp--custom--carousel-block--pagination-bullet-inactive-opacity: 1;
    --wp--custom--carousel-block--pagination-bullet-size: 10px;
    --wp--custom--carousel-block--pagination-bullet-color: transparent;
    --wp--custom--carousel-block--pagination-bullet-active-color: currentColor;
    --wp--custom--carousel-block--navigation-alignfull-color: currentColor;
}
.wp-block-cb-carousel-v2 :is(.cb-button-next, .cb-button-prev) {
    font-weight: 900;
    color: currentColor;
}
.wp-block-cb-carousel-v2[data-cb-pagination=true] .swiper-horizontal {
    margin-bottom: 0;
}
.wp-block-cb-carousel-v2 .cb-pagination .cb-pagination-bullet {
    border: 2px solid currentColor;
}
@media screen and (max-width: 1300px) {
    .wp-block-cb-carousel-v2 {
        --wp--custom--carousel-block--navigation-size: var(--wp--preset--spacing--50);
        --wp--custom--carousel-block--navigation-sides-offset: 6px;
    }
}

/* Hide read more link in listing */
a.more-link {
    display: none;
}

/* Layout stuff for blog items */
.blog-list-item .wp-block-post-excerpt {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
}
@media screen and (max-width: 687px) {
    .blog-list-item .wp-block-group.is-vertical {
        min-height: auto !important;
    }
    .blog-list-item .wp-block-group.is-vertical:not(.has-background) {
        padding-inline: 0 !important;
    }
}
:is(.max-2-lines .max-3-lines, .max-4-lines) .wp-block-post-excerpt__excerpt {
    --line-height: 1.4em;
    --line-count: 2;

    display: block; /* Fallback for non-webkit */
    display: -webkit-box;
    line-height: var(--line-height);
    height: calc(var(--line-count) * var(--line-height));
    -webkit-line-clamp: var(--line-count);
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.max-3-lines .wp-block-post-excerpt__excerpt {
    --line-count: 3;
}
.max-4-lines .wp-block-post-excerpt__excerpt {
    --line-count: 4;
}


/* Taxonomy filters styling */
.wp-block-query-filter__radio-group input[type=radio] {
    visibility: hidden;
    position: absolute;
}
.wp-block-query-filter__radio-group label {
    border-bottom: 1px solid transparent;
}
.wp-block-query-filter__radio-group label:has(input[type=radio]:checked) {
    border-bottom-color: var(--wp--preset--color--text-body);
}

/* Quote */
.is-style-quote::before {
    content: "“";
}
.is-style-quote::after {
    content: "“";
}

/* ---------------------------------------------------------------------------
   Contact Form 7
   --------------------------------------------------------------------------- */
.wpcf7 {
    --platan-form--field-bg: var(--wp--preset--color--beige);
    --platan-form--field-color: var(--wp--preset--color--text-body);
    --platan-form--field-padding-block: var(--wp--preset--spacing--20);
    --platan-form--field-padding-inline: var(--wp--preset--spacing--30);
    --platan-form--field-gap: var(--wp--preset--spacing--40);
    --platan-form--label-gap: var(--wp--preset--spacing--20);
    --platan-form--accent: var(--wp--preset--color--drab);
    --platan-form--error-bg: #ff5757;
    --platan-form--error-color: var(--wp--preset--color--white);
}
.wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: var(--platan-form--field-gap);
}
.wpcf7-form > p {
    margin-block: 0;
}
.wpcf7-form label br {
    display: none;
}

/* CF7 Separator */
.wpcf7-form hr {
    width: 180px;
    max-width: 100%;
    margin: var(--wp--preset--spacing--20) auto;
    border: 0;
    border-top: 1px solid currentColor;
}

/* CF7 Label */
.wpcf7-form label {
    display: block;
    font-family: var(--wp--preset--font-family--libre-baskerville);
    font-size: var(--wp--preset--font-size--medium);
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}
.wpcf7-form-control-wrap {
    display: block;
    position: relative;
    margin-top: var(--platan-form--label-gap);
}
.wpcf7-form > p > .wpcf7-form-control-wrap:first-child {
    margin-top: 0;
}

/* CF7 Fields */
.wpcf7-form :is(
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="url"],
    input[type="number"],
    input[type="date"],
    input[type="time"],
    input[type="search"],
    textarea,
    select
) {
    box-sizing: border-box;
    width: 100%;
    padding: var(--platan-form--field-padding-block) var(--platan-form--field-padding-inline);
    border: 0;
    border-radius: 0;
    background-color: var(--platan-form--field-bg);
    color: var(--platan-form--field-color);
    font-family: var(--wp--preset--font-family--open-sans);
    font-size: 18px;
    font-weight: 400;
    line-height: 1.4;
    text-align: center;
}
.wpcf7-form :is(input, textarea, select):focus-visible {
    outline: 2px solid var(--platan-form--accent);
    outline-offset: 2px;
}
.wpcf7-form ::placeholder {
    color: inherit;
    opacity: 0.6;
    text-align: center;
}
.wpcf7-form textarea {
    min-height: 140px;
    resize: vertical;
    text-align: left;
}
.wpcf7-form textarea::placeholder {
    text-align: left;
}

/* CF7 Select – custom chevron */
.wpcf7-form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 14' fill='none' stroke='%23191919' stroke-width='1.5'%3E%3Cpath d='M1 1 12 12 23 1'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--platan-form--field-padding-inline) center;
    background-size: 22px 12px;
    cursor: pointer;
}
.wpcf7-form select[multiple] {
    background-image: none;
}

/* CF7 Date field */
.wpcf7-form input[type="date"] {
    appearance: none;
}
.wpcf7-form input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.7;
}

/* CF7 Checkbox / radio / acceptance */
.cf7-accepts {
    margin-left: 2em;
}
.wpcf7-form .wpcf7-list-item {
    margin: 0;
}
.wpcf7-form :is(.wpcf7-checkbox, .wpcf7-radio, .wpcf7-acceptance) {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
}
.wpcf7-form .cf7-accepts :is(.wpcf7-checkbox, .wpcf7-radio, .wpcf7-acceptance) {
    justify-content: start;
}
.wpcf7-form .wpcf7-list-item label {
    display: flex;
    align-items: center;
    gap: var(--wp--preset--spacing--20);
    font-family: inherit;
    font-size: var(--wp--preset--font-size--small);
    font-weight: 400;
    text-align: left;
    cursor: pointer;
}
.wpcf7-form :is(input[type="checkbox"], input[type="radio"]) {
    flex: none;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--platan-form--accent);
    cursor: pointer;
}
.wpcf7-form .wpcf7-list-item-label {
    line-height: 1.4;
}

/* CF7 Submit button – based on core/button from theme.json */
.wpcf7-form :is(input[type="submit"], button[type="submit"], .wpcf7-submit) {
    display: block;
    width: fit-content;
    margin-inline: auto;
    padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
    border: 0;
    border-radius: 0;
    background-color: var(--platan-form--accent);
    color: var(--wp--preset--color--white);
    font-family: inherit;
    font-size: var(--wp--preset--font-size--small);
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    cursor: pointer;
    transition: opacity 0.2s ease;
}
.wpcf7-form :is(input[type="submit"], button[type="submit"]):hover {
    opacity: 0.85;
}
.wpcf7-form :is(input[type="submit"], button[type="submit"]):disabled {
    cursor: not-allowed;
    opacity: 0.5;
}
.wpcf7-spinner {
    margin-inline: var(--wp--preset--spacing--20) 0;
}

/* CF7 Error Message – displays over the field, fades on focus */
.wpcf7-not-valid-tip {
    padding: var(--platan-form--field-padding-block) var(--platan-form--field-padding-inline);
    background-color: var(--platan-form--error-bg);
    color: var(--platan-form--error-color);
    font-size: var(--wp--preset--font-size--medium);
    line-height: 1.4;
    text-align: center;
}
.wpcf7-form-control-wrap:not(:has(.wpcf7-list-item)) .wpcf7-not-valid-tip {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.wpcf7-form-control-wrap:focus-within .wpcf7-not-valid-tip {
    opacity: 0;
}
.wpcf7-form-control-wrap:has(.wpcf7-list-item) .wpcf7-not-valid-tip {
    margin-top: var(--wp--preset--spacing--20);
}

/* CF7 Response messages */
.wpcf7 form .wpcf7-response-output {
    margin: 0;
    padding: var(--platan-form--field-padding-block) var(--platan-form--field-padding-inline);
    border: 0;
    font-size: var(--wp--preset--font-size--small);
    text-align: center;
}
.wpcf7 form.sent .wpcf7-response-output {
    background-color: var(--platan-form--accent);
    color: var(--wp--preset--color--white);
}
.wpcf7 form:is(.invalid, .unaccepted, .payment-required, .failed, .aborted) .wpcf7-response-output {
    background-color: var(--platan-form--error-bg);
    color: var(--platan-form--error-color);
}
.wpcf7 .screen-reader-response {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Polylang language switcher */
.wp-block-polylang-language-switcher :is(
    select.pll-switcher-select,
    select.pll-switcher-select option,
    .lang-item a
) {
    text-transform: uppercase;
    color: inherit;
}
.wp-block-polylang-language-switcher select.pll-switcher-select {
    background: transparent;
    font-size: inherit;
    border: none;
    outline-color: inherit;
}
.wp-block-polylang-language-switcher select.pll-switcher-select option {
    background-color: #1a1a1a73;
}
header.wp-block-template-part.scrolled .wp-block-polylang-language-switcher select.pll-switcher-select option {
    background-color: var(--wp--preset--color--white);
}
