/*
Theme Name:   Waldhof (CarShire Child)
Theme URI:    https://serwiswieszowa.pl
Description:  Child theme dla CarShire for Waldhof Service
Author:       Paweł Penkala
Author URI:   https://sparro.pl
Template:     carshire
Version:      1.0.2
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  carshire-child
*/

/* Child theme styles */

.page-banner {
    background-position: center bottom;
}

.header-top-infos {
    margin-top: 5px;
}

.header-top-infos a {
    color: #36404B;
}

.skew-lines:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 22px;
    height: 29px;
    background-image: url('/wp-content/uploads/2026/02/waldhof_ico.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #FFFFFF;
    transform: none;
    -webkit-transform: none;
    -moz-transform: none;
    -ms-transform: none;
    -o-transform: none;
}

.skew-lines:after {
    display: none;
}

h3.elementor-heading-title {
    padding-left: 30px;
}

footer .footer-col-1,
footer .footer-col-4 {
    color: #FFFFFF;
    font-size: 14px;
    line-height: 1.7;
}

footer .footer-col-4  .footer_logo_bosch {
    max-width: 73px;
    float: right;
    margin-left: 10px;
}

footer .footer-widget__column ul li {
    margin-bottom: 5px;
}

.main-footer .footer-upper {
    padding: 40px 0 30px;
}

.blog-post-comment {
    display: none;
}

.post-image .caption {
    display: none;
}

.sidebar-page .post .post-title {
    font-size: 24px;
    color: #000;
}

.sidebar-page .post .post-info .elementor-element,
.sidebar-page .post .post-text .elementor-element {
    padding: 0;
}

.sidebar-page .post .post-text ol li {
    list-style: unset;
}

.tp-blog-area ol,
.tp-blog-area ul {
    margin-bottom: 10px !important;
}

.postbox__details ol li {
    padding-top: 0;
    padding-left: 5px;
    margin-left: 10px;
}

.postbox__details ul li {
    list-style: disc;
    padding-top: 0;
    padding-left: 5px;
    margin-left: 10px;
}

.tp-blog-area dl,
.tp-blog-area ol,
.tp-blog-area ul {
    margin-bottom: 0;
}

.sidebar-page .post-detail h2 {
    color: #000000;
    font-size: 22px;
    margin: 10px 0 5px;
}

.postbox__details p {
    line-height: 1.6;
}

.home-blog .post-content .date {
     display: none;
}

body.page .tp-page-area .tp-page-post ul li {
    list-style: disc;
}

body.page .tp-page-area a {
    color: #7A7A7A;
    text-decoration: underline;

}

body.page .tp-page-area a:focus,
body.page .tp-page-area a:hover {
    color: var(--thm-base);
}

.tp-page-content .tp-page-post {
    padding-top: 50px;
    padding-bottom: 50px;
}

.tp-page-content .tp-page-post h3 {
    padding-left: 0;
    color: #000000;
}

.tp-page-content ol,
.tp-page-content ul {
    margin-top: 10px;
    margin-bottom: 15px;
}

.tp-page-content p {
    line-height: 1.6;
}

.tp-page-content p a {
    text-decoration: underline;
    color: inherit;
}

.tp-page-content ol li,
.tp-page-content ul li {
    margin-bottom: 0;
    line-height: 1.6;
}

.page-banner .page-title h1 {
    padding: 15px 25px;
    color: #FFF;
    background: rgba(0, 0, 0, 0.60);
}

.offer-contact .elementor-button,
.home-call .elementor-button {
    padding: 15px 30px !important;
}

.offer-contact h3 {
    padding-left: 0;
}

.home-offer-service h3.skew-lines {
    padding-left: 35px;
}

.car-service-list .offer-icon {
    width: 70px;
}

.car-service-list .offer-icon .elementor-icon-wrapper {
    width: 70px;
    text-align: left;
}

.car-service-list h3,
.offer-info h3,
.offer-gallery h3,
.home-header-1 h3 {
    padding-left: 0;
}

.blog-slider .column-box .post-content h3 {
    font-size: 19px;
    line-height: 1.4;
    text-transform: unset;
}

.blog-slider .column-box .text {
    font-size: 15px;
    line-height: 1.4;
}

.main-footer a {
    color: var(--thm-base);
}

/* Blog Grid - 2 kolumny na desktop, 1 na mobile */
.tp-blog-area .blog-post-items .post {
    margin-bottom: 30px;
}

.e-con.home-reviews,
.e-con-full.home-slider,
.e-con.about-blog,
.offer-gallery,
.home-gallery,
.home-news {
    overflow-x: auto;
}

.home-slider .banner-carousel .content-box h2 {
    font-size: 40px !important;
    line-height: 52px !important;
}

.home-slider .banner_slider_desc {
    font-size: 38px !important;
    line-height: 40px !important;
}

.content-box.blog-category h2.post-title {
    margin-top: 5px;
    margin-bottom: 5px;
    font-size: 25px;
}

.content-box.blog-category h2.post-title a {
    color: #000;
}

.content-box.blog-category .post-text p {
    line-height: 1.6;
}

.widget_theme_sidebar_blog_posts .sidebar-post__img {
    width: 20%;
    height: 70px;
    overflow: hidden;
}

.widget_theme_sidebar_blog_posts .sidebar__post-content-box {
    width: 80%;
}

@media (min-width: 992px) {
    .header-top-infos {
        width: 60%;
    }
}

@media (max-width: 768px) {
    .offer-info {
        padding: 0 40px;
    }

    .tp-blog-area .blog-post-items [class*="col-"] {
        margin-bottom: 30px;
    }

    .e-con.e-flex>.e-con-inner {
        padding: 40px 25px;
    }

    .page-banner .bread-crumb a,
    .page-banner .bread-crumb span {
        font-size: 9px;
    }

    .page-banner .bread-crumb a:after {
        width: 20px;
        height: 20px;
        line-height: 12px;
        font-size: 12px;
    }

    .main-header .logo img {
        position: relative;
        display: inline-block;
        max-width: 280px;
    }

    .main-footer .footer-upper h3 {
        margin-bottom: 5px;
        margin-top: 20px;
    }

    .main-footer .footer-upper {
        padding: 10px 0 30px;
    }

    .main-footer .social-links {
        text-align: left;
        padding-bottom: 13px;
    }

    .car-service-list .offer-icon-header {
        max-width: 76% !important;
    }

    .offer-contact .e-con-inner h3.elementor-heading-title {
        padding-left: 0;
    }
}


/* Wyrównanie wysokości postów w gridzie */
.tp-blog-area .blog-post-items .row {
    display: flex;
    flex-wrap: wrap;
}

.tp-blog-area .blog-post-items .row > [class*="col-"] {
    display: flex;
    flex-direction: column;
}

.tp-blog-area .blog-post-items .post {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tp-blog-area .blog-post-items .post .content-box {
    flex-grow: 1;
}

/* --- Slider na stronie głównej: powolny ruch zdjęcia --- */

/*
 * Zdjęcie siedzi w inline `style` na .slide-item, a motyw nakłada na nie `background-size: cover`.
 * Animowanie `background-position` nic by nie dało: cover skaluje te kadry do szerokości
 * kontenera i nadmiar ucieka w pionie, więc poziomo nie ma luzu do przesuwania. Dlatego
 * warstwa ::before przejmuje to samo zdjęcie przez `inherit`, dostaje 4% zapasu z każdej
 * strony i jedzie na transformie — kompozyt na GPU zamiast repaintu przy każdej klatce.
 */
.home-slider .banner-carousel .slide-item {
    position: relative;
    overflow: hidden;
}

.home-slider .banner-carousel .slide-item::before {
    content: "";
    position: absolute;
    top: -4%;
    right: -4%;
    bottom: -4%;
    left: -4%;
    background-image: inherit;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    will-change: transform;
    z-index: 0;
}

/* Nagłówki muszą zostać nad warstwą ze zdjęciem. */
.home-slider .banner-carousel .slide-item > .auto-container {
    position: relative;
    z-index: 1;
}

/*
 * Ruch rusza dopiero na aktywnym slajdzie — tym samym hookiem, którym motyw wprowadza tekst.
 * 16 s przy autoplay co 6 s oznacza, że animacja nigdy nie dobiega końca, więc nie widać
 * momentu zatrzymania. `linear`, bo stałe tempo czyta się spokojniej niż przyspieszanie.
 */
.home-slider .banner-carousel .owl-item.active .slide-item::before {
    animation: waldhof-pan-left 16s linear forwards;
}

.home-slider .banner-carousel .owl-item:nth-child(even).active .slide-item::before {
    animation-name: waldhof-pan-right;
}

@keyframes waldhof-pan-left {
    from { transform: translate3d(1.25%, 0, 0); }
    to   { transform: translate3d(-1.25%, 0, 0); }
}

@keyframes waldhof-pan-right {
    from { transform: translate3d(-1.25%, 0, 0); }
    to   { transform: translate3d(1.25%, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .home-slider .banner-carousel .owl-item.active .slide-item::before {
        animation: none;
    }
}

/*
 * Pionowy pasek przewijania przy sliderze.
 * Widget .main-slider ma sztywne `height: 620px` z Elementora, ale jego pseudo-elementy
 * ::before/::after zajmują po 5 px, więc ::after ląduje 5 px poniżej dna. Kontener
 * .home-slider ma `overflow-x: auto` (reguła wyżej), a wtedy przeglądarka wymusza
 * `overflow-y: auto` — jedna oś nie może zostać `visible`, gdy druga nią nie jest.
 * Efekt: pasek przewijania dla 5 px pustki. Zerujemy te 5 px zamiast chować pasek
 * przez `overflow: hidden`, bo to usuwa przyczynę, a nie objaw.
 */
.home-slider .main-slider::before,
.home-slider .main-slider::after {
    height: 0;
}
