/*
Theme Name: Vilva Child
Theme URI: https://blossomthemes.com/wordpress-themes/vilva/
Template: vilva
Author: Blossom Themes
Author URI: https://blossomthemes.com/
Description: Vilva Child Theme for AMPERIA
Version: 1.3.1
*/

@import url('https://fonts.googleapis.com/css2?family=PT+Sans:wght@400;700&display=swap');

/* ==========================================================
   TYPOGRAFIA GLOBALNA – PT SANS
   ========================================================== */

:root {
    --primary-font: "PT Sans", Arial, Helvetica, sans-serif;
}

body,
button,
input,
select,
optgroup,
textarea {
    font-family: "PT Sans", Arial, Helvetica, sans-serif !important;
}


/* ==========================================================
   1. TREŚĆ STRON – TYPOGRAFIA
   ========================================================== */

/*
 * Typografia treści stron.
 * Font PT Sans jest ustawiony globalnie powyżej.
 */

.entry-content {
    color: #334155;

    font-size: 16px;
    line-height: 1.7;
}


/* Nagłówki wewnątrz treści */

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    font-family: inherit;

    color: #0f172a;

    font-weight: 700;
    line-height: 1.25;

    letter-spacing: -0.02em;
}


/* Rozmiary nagłówków treści */

.entry-content h1 {
    font-size: 30px;
}

.entry-content h2 {
    font-size: 25px;
}

.entry-content h3 {
    font-size: 21px;
}

.entry-content h4 {
    font-size: 18px;
}

.entry-content h5 {
    font-size: 16px;
}

.entry-content h6 {
    font-size: 14px;
}


/* Akapity */

.entry-content p {
    margin-bottom: 18px;
}


/* Linki w treści */

.entry-content a {
    color: #2563eb;

    text-decoration-thickness: 1px;
    text-underline-offset: 3px;

    transition:
        color 0.2s ease,
        opacity 0.2s ease;
}

.entry-content a:hover {
    color: #1d4ed8;
}


/* ==========================================================
   2. UKRYCIE AUTOMATYCZNEGO TYTUŁU STRONY
   ========================================================== */

.page .entry-title,
.page .page-title,
.page header.page-header,
.page .page-header .page-title {
    display: none !important;
}


/* ==========================================================
   3. UKRYCIE BREADCRUMBS / OKRUSZKÓW
   ========================================================== */

/*
 * Ukrywa m.in.:
 *
 * Strona główna > O firmie
 * Strona główna > Oferta
 */

.breadcrumb,
.breadcrumbs,
.breadcrumb-trail,
.breadcrumb-wrapper,
#crumbs,
.page-header .breadcrumb,
.page-header .breadcrumbs,
.site-main .breadcrumb,
.site-main .breadcrumbs,
.site-content .breadcrumb,
.site-content .breadcrumbs {
    display: none !important;
}


/* ==========================================================
   4. KARUZELA REALIZACJI
   ========================================================== */

/*
 * W Gutenbergu:
 *
 * zaznacz blok Galeria
 *
 * Zaawansowane ->
 * Dodatkowe klasy CSS:
 *
 * amperia-carousel
 */

.amperia-carousel-wrap {
    position: relative;

    width: 100%;

    margin: 28px 0 36px;
}


/* ==========================================================
   5. SAM BLOK GALERII
   ========================================================== */

.amperia-carousel {
    display: flex !important;
    flex-wrap: nowrap !important;

    gap: 14px !important;

    width: 100%;
    max-width: 100%;

    margin: 0 !important;

    padding:
        4px
        2px
        10px !important;

    overflow-x: auto;
    overflow-y: hidden;

    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;

    -webkit-overflow-scrolling: touch;

    scrollbar-width: none;
}


/* Ukrycie scrollbara w Chrome / Safari */

.amperia-carousel::-webkit-scrollbar {
    display: none;
}


/* ==========================================================
   6. ELEMENT GALERII
   ========================================================== */

.amperia-carousel > figure,
.amperia-carousel > .wp-block-image {
    position: relative;

    flex:
        0 0
        calc((100% - 42px) / 4) !important;

    width:
        calc((100% - 42px) / 4) !important;

    max-width: none !important;

    margin: 0 !important;

    overflow: hidden;

    border-radius: 12px;

    scroll-snap-align: start;

    background: #f1f5f9;
}


/* Link zdjęcia */

.amperia-carousel figure > a {
    display: block;

    width: 100%;
    height: 100%;

    overflow: hidden;

    border-radius: 12px;
}


/* ==========================================================
   7. ZDJĘCIA
   ========================================================== */

.amperia-carousel img {
    display: block;

    width: 100% !important;

    height: 190px !important;

    max-width: none !important;

    object-fit: cover;

    border-radius: 12px;

    transition:
        transform 0.3s ease,
        filter 0.3s ease,
        opacity 0.3s ease;
}


/* Hover */

.amperia-carousel figure:hover img {
    transform: scale(1.04);
}


/* ==========================================================
   8. STRZAŁKI KARUZELI
   ========================================================== */

.amperia-carousel-arrow {
    position: absolute;

    top: 50%;

    z-index: 20;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    padding: 0;

    color: #0f172a;

    background:
        rgba(255, 255, 255, 0.96);

    border:
        1px solid #e2e8f0;

    border-radius: 50%;

    box-shadow:
        0 8px 25px
        rgba(15, 23, 42, 0.14);

    cursor: pointer;

    transform:
        translateY(-50%);

    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease,
        opacity 0.2s ease;
}


/* Lewa strzałka */

.amperia-carousel-prev {
    left: -20px;
}


/* Prawa strzałka */

.amperia-carousel-next {
    right: -20px;
}


/* Hover */

.amperia-carousel-arrow:hover {
    color: #ffffff;

    background: #2563eb;

    border-color: #2563eb;

    box-shadow:
        0 10px 28px
        rgba(37, 99, 235, 0.25);
}


/* Kliknięcie */

.amperia-carousel-arrow:active {
    transform:
        translateY(-50%)
        scale(0.94);
}


/* Nieaktywna */

.amperia-carousel-arrow:disabled {
    opacity: 0;

    visibility: hidden;

    pointer-events: none;
}


/* SVG */

.amperia-carousel-arrow svg {
    display: block;

    width: 18px;
    height: 18px;

    fill: none;

    stroke: currentColor;

    stroke-width: 2;

    stroke-linecap: round;
    stroke-linejoin: round;
}


/* Focus */

.amperia-carousel-arrow:focus-visible {
    outline:
        3px solid
        rgba(37, 99, 235, 0.25);

    outline-offset: 3px;
}


/* ==========================================================
   9. LISTY W TREŚCI
   ========================================================== */

.entry-content ul,
.entry-content ol {
    margin-bottom: 22px;
}

.entry-content li {
    margin-bottom: 6px;
}


/* ==========================================================
   10. CYTATY
   ========================================================== */

.entry-content blockquote {
    margin:
        28px
        0;

    padding:
        18px
        24px;

    color: #334155;

    background: #f8fafc;

    border-left:
        4px solid #2563eb;

    border-radius:
        0
        10px
        10px
        0;
}


/* ==========================================================
   11. SEPARATORY
   ========================================================== */

.entry-content hr {
    height: 1px;

    margin:
        42px
        0;

    border: 0;

    background: #e2e8f0;
}


/* ==========================================================
   12. OBRAZY W TREŚCI
   ========================================================== */

.entry-content img {
    max-width: 100%;

    height: auto;
}


/* Zwykłe zdjęcia Gutenberg poza karuzelą */

.entry-content
.wp-block-image:not(.amperia-carousel .wp-block-image)
img {
    border-radius: 8px;
}


/* ==========================================================
   13. TABELKI
   ========================================================== */

.entry-content table {
    width: 100%;

    margin:
        24px
        0;

    border-collapse: collapse;
}

.entry-content table th,
.entry-content table td {
    padding:
        10px
        12px;

    border:
        1px solid #e2e8f0;

    text-align: left;
}

.entry-content table th {
    color: #0f172a;

    background: #f8fafc;

    font-weight: 600;
}


/* ==========================================================
   14. RESPONSYWNOŚĆ – TABLET
   ========================================================== */

@media (max-width: 991px) {

    /*
     * Typografia
     */

    .entry-content h1 {
        font-size: 28px;
    }

    .entry-content h2 {
        font-size: 24px;
    }

    .entry-content h3 {
        font-size: 20px;
    }


    /*
     * Karuzela:
     * 3 zdjęcia
     */

    .amperia-carousel > figure,
    .amperia-carousel > .wp-block-image {
        flex-basis:
            calc((100% - 28px) / 3) !important;

        width:
            calc((100% - 28px) / 3) !important;
    }


    .amperia-carousel img {
        height: 175px !important;
    }


    .amperia-carousel-prev {
        left: -12px;
    }


    .amperia-carousel-next {
        right: -12px;
    }
}


/* ==========================================================
   15. RESPONSYWNOŚĆ – TELEFON
   ========================================================== */

@media (max-width: 720px) {

    /*
     * Treść
     */

    .entry-content {
        font-size: 15px;
    }


    /*
     * Nagłówki
     */

    .entry-content h1 {
        font-size: 26px;
    }

    .entry-content h2 {
        font-size: 22px;
    }

    .entry-content h3 {
        font-size: 19px;
    }

    .entry-content h4 {
        font-size: 17px;
    }


    /*
     * Karuzela
     */

    .amperia-carousel {
        gap: 10px !important;

        /*
         * Widać kawałek kolejnego zdjęcia,
         * dzięki czemu wiadomo,
         * że galerię można przesuwać.
         */

        padding-right:
            35px !important;
    }


    .amperia-carousel > figure,
    .amperia-carousel > .wp-block-image {
        flex:
            0 0
            78% !important;

        width:
            78% !important;
    }


    .amperia-carousel img {
        height:
            210px !important;
    }


    /*
     * Strzałki
     */

    .amperia-carousel-arrow {
        width: 38px;
        height: 38px;
    }


    .amperia-carousel-prev {
        left: 7px;
    }


    .amperia-carousel-next {
        right: 7px;
    }


    .amperia-carousel-arrow svg {
        width: 16px;
        height: 16px;
    }


    /*
     * Separator
     */

    .entry-content hr {
        margin:
            34px
            0;
    }
}


/* ==========================================================
   16. BARDZO MAŁE EKRANY
   ========================================================== */

@media (max-width: 420px) {

    .entry-content h1 {
        font-size: 24px;
    }

    .entry-content h2 {
        font-size: 21px;
    }

    .entry-content h3 {
        font-size: 18px;
    }


    .amperia-carousel > figure,
    .amperia-carousel > .wp-block-image {
        flex:
            0 0
            84% !important;

        width:
            84% !important;
    }


    .amperia-carousel img {
        height:
            195px !important;
    }
}


/* ==========================================================
   17. REDUCED MOTION
   ========================================================== */

@media (
    prefers-reduced-motion: reduce
) {

    .amperia-carousel {
        scroll-behavior: auto;
    }


    .amperia-carousel img,
    .amperia-carousel-arrow {
        transition: none;
    }
}
/* Vilva - sticky menu na desktopie */
@media screen and (min-width: 1025px) {

    .site-header .header-bottom {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 99999;
        background: #fff;
    }

    body {
        padding-top: 70px;
    }

    /* gdy jesteś zalogowany do WordPressa */
    body.admin-bar .site-header .header-bottom {
        top: 32px;
    }
}