/*
Theme Name: DPS Group
Author: CroCoder
Requires at least: 7.1
Tested up to: 7.1
Requires PHP: 5.7
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dps-group
*/

html {
    --dps-scroll-offset-extra: 30px;
    scroll-padding-top: calc(var(--dps-header-height) + var(--wp-admin--admin-bar--height, 0px) + var(--dps-scroll-offset-extra));
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

@media (max-width: 959px) {
    :root body {
        --wp--style--root--padding-left: max(var(--wp--preset--spacing--5), (100vw - 760px) / 2);
        --wp--style--root--padding-right: max(var(--wp--preset--spacing--5), (100vw - 760px) / 2);
    }
}

/*
 * Kolumny: odwrócona kolejność na mobilu – klasa is-reversed-on-mobile
 * (Zaawansowane → Dodatkowe klasy CSS).
 */
@media (max-width: 781px) {
    .wp-block-columns.is-reversed-on-mobile:not(.is-not-stacked-on-mobile) {
        flex-wrap: wrap-reverse !important;
    }
}

/*
 * Nawigacja w stopce: po najechaniu (i fokusie z klawiatury) link płynnie jaśnieje do białego.
 * Stopka ma ciemne tło (dark-blue) i szare linki.
 */
.wp-site-blocks > footer.wp-block-template-part .wp-block-navigation-item__content {
    transition: color 0.2s ease;
}

.wp-site-blocks > footer.wp-block-template-part .wp-block-navigation-item__content:is(:hover, :focus-visible) {
    color: var(--wp--preset--color--white);
}

@media (prefers-reduced-motion: reduce) {
    .wp-site-blocks > footer.wp-block-template-part .wp-block-navigation-item__content {
        transition: none;
    }
}

/*
 * Nagłówki w treści wpisu/strony (bezpośrednio w bloku Treść)
 */
.wp-block-post-content > :is(h1, h2, h3, h4, h5, h6) {
    margin-block-start: 60px;
    /* margin-block-end: 30px; */
}

.wp-block-post-content > :is(h1, h2, h3, h4, h5, h6):first-child {
    margin-block-start: 0;
}

.wp-block-post-content > h2 {
    font-size: var(--wp--preset--font-size--32);
}

.wp-block-post-content > h3 {
    font-size: var(--wp--preset--font-size--24);
}

.wp-block-post-content > :is(h4, h5, h6) {
    font-size: var(--wp--preset--font-size--20);
}

/*
 * Strona 404
 */

.error404 .wp-site-blocks {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    min-height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px));
}

.error404 .wp-site-blocks > main {
    flex-grow: 1;
}

/* Native Blocks */

/* Button */

.wp-element-button {
    min-height: 53px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: translate 0.2s ease;
}

.wp-element-button:is(:hover, :focus-visible) {
    translate: 0 -3px;
}

.wp-block-button.is-style-text-icon .wp-block-button__link:is(:hover, :focus-visible) {
    translate: none;
}

@media (prefers-reduced-motion: reduce) {
    .wp-element-button {
        transition: none;
    }

    .wp-element-button:is(:hover, :focus-visible) {
        translate: none;
    }
}

@media (max-width: 781.9999px) {
    .wp-block-buttons > .wp-block-button:not(.has-custom-width, .is-style-text-icon) {
        flex-basis: 100%;
        width: 100%;
    }

    .wp-block-buttons > .wp-block-button:not(.has-custom-width, .is-style-text-icon) > .wp-block-button__link {
        width: 100%;
    }
}

/*
 * Image – styl "Logo w kafelku":
 */

.wp-block-image.is-style-logo-tile {
    --logo-tile-padding: 32px;

    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    aspect-ratio: 317 / 211;
    margin: 0;
    padding: var(--logo-tile-padding);
    border: 1px solid var(--wp--preset--color--light-silver);
}


.is-style-dark .wp-block-image.is-style-logo-tile {
    border-color: var(--wp--preset--color--white-20);
}

.wp-block-image.is-style-logo-tile img {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 100%;
    max-height: 60px;
    object-fit: contain;
    margin: auto;
}

@media (max-width: 781.9999px) {
    .wp-block-image.is-style-logo-tile {
        --logo-tile-padding: 24px;
    }

    .wp-block-image.is-style-logo-tile img {
        max-height: 30px;
    }
}

/* Icon */

.wp-block-icon.is-style-square {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    padding: 0;
    background-color: var(--wp--preset--color--light-blue);
    color: var(--wp--preset--color--dark-blue);
}

.wp-block-icon.is-style-square svg {
    width: 32px;
    height: auto;
}


/* Fonts */
.has-54-font-size{
    line-height: normal;
}