/**
* Theme Name:        avanam-magazinry
* Theme URI:         https://templatemela.com/
* Template:          avanam
* Author:            TemplateMela
* Author URI:        #
* Description:       This is a child theme of Avanam, generated by TemplateMela.
* Version:           1.0.0
* License:           GNU General Public License v3.0 (or later)
* License URI:       https://www.gnu.org/licenses/gpl-3.0.html
* Text Domain:       avanam-magazinry
* Requires at least: 6.2
* Tested up to:      6.6
* Requires PHP:      7.4
* Tags: translation-ready, two-columns, right-sidebar, left-sidebar, footer-widgets, blog, custom-logo, custom-background, custom-menu, rtl-language-support, editor-style, threaded-comments, custom-colors, featured-images, wide-blocks, full-width-template, theme-options, e-commerce

*/

/* Poprawa odstępów między aktualnościami na stronie głównej / w archiwum */
.column-item.post-style-2,
.column-item.post-style-4,
.elementor-widget-tmcore-blog .column-item {
    margin-bottom: 60px !important;
}

/* Przycięcie zdjęć do jednej wysokości w aktualnościach */
.column-item.post-style-2 .post-thumbnail img,
.column-item.post-style-4 .post-thumbnail img,
.elementor-widget-tmcore-blog .post-thumbnail img {
    height: 300px !important;
    object-fit: cover !important;
    width: 100% !important;
}

/* Ukrycie informacji o autorze we wpisach i na listach */
.posted-by, .meta-author, .author.vcard {
    display: none !important;
}

/* Wymuszenie poprawnego pozycjonowania wyszukiwarki na mobile */
@media (max-width: 767px) {
    .elementor-element-ea6bd4b {
        position: relative !important;
        width: 100% !important;
        right: auto !important;
        bottom: auto !important;
        margin-top: 20px !important;
    }
}

/* Wymuszenie 1 kolumny w aktualnościach */
#archive-container.grid-lg-col-2, #archive-container.grid-sm-col-2 {
    grid-template-columns: 1fr !important;
}

/* Wymuszenie proporcji dla obrazków z zainstalowanej wtyczki na liście wpisów */
#archive-container.post-archive .post-thumbnail img {
    width: 100% !important;
    height: 300px !important;
    object-fit: cover !important;
}

/* Zmiana kolejności wyszukiwarki i aktualności na stronie głównej (mobile) */
@media (max-width: 767px) {
    body .elementor-element-e80ba3d {
        display: flex !important;
        flex-direction: column !important;
    }
    body .elementor-element-8ba7a0c {
        order: 2 !important;
    }
    body .elementor-element-ea6bd4b {
        order: 1 !important;
        width: 100% !important;
        position: relative !important;
        right: auto !important;
        margin-top: 0 !important;
        max-width: 100% !important;
    }
    
    /* Wyszukiwarka i Rozkład jazdy na całą szerokość */
    body .elementor-element-ea6bd4b .elementor-widget-container,
    body .elementor-element-ea6bd4b form, 
    body .elementor-element-ea6bd4b fieldset {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    body .elementor-element-ea6bd4b .left,
    body .elementor-element-ea6bd4b .right {
        width: 100% !important;
        float: none !important;
        text-align: center !important;
        display: block !important;
    }

    body .elementor-element-ea6bd4b form label {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        width: 100% !important;
    }
    
    body .elementor-element-ea6bd4b form input {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-top: 5px !important;
        float: none !important;
    }

    /* Zdjęcia i treść w aktualnościach na całą szerokość (jeden pod drugim) */
    .column-item.post-style-4 .post-inner {
        display: block !important;
    }
    .column-item.post-style-4 .post-thumbnail,
    .column-item.post-style-4 .entry-content {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        display: block !important;
    }

    /* Przesunięcie menu (headera) do samej góry */
    .site-mobile-header-wrap .site-main-header-wrap {
        top: 0 !important;
        margin-top: 0 !important;
        position: fixed !important;
    }
    .site-mobile-header-wrap .site-header-upper-inner-wrap {
        margin-top: 0 !important;
        padding-top: 0 !important;
        height: auto !important;
    }
    body {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
}

/* Gradient (overlay) dla tła slidera - ciemny granat od dołu */
sr7-module sr7-bg::after {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(to top, rgba(10, 25, 65, 0.85) 0%, rgba(10, 25, 65, 0) 70%) !important;
    pointer-events: none !important;
    z-index: 1 !important;
}

/* ─── Kurczenie paska nagłówka przy scrollowaniu ─────────────────────────── */
/* Płynne przejście wysokości i loga dla sticky headera */
#masthead .site-main-header-wrap,
#masthead .site-main-header-inner-wrap {
    transition: min-height 0.3s ease, padding 0.3s ease;
}

.site-branding a.brand img {
    transition: max-width 0.3s ease, width 0.3s ease;
}

/* Stan po zescrollowaniu: header mniejszy */
body.header-shrink #masthead .site-main-header-inner-wrap {
    min-height: 65px !important;
}

body.header-shrink .site-branding a.brand img {
    max-width: 110px !important;
    width: 110px !important;
}

/* Dodatkowe zmniejszenie paddingów linków menu */
body.header-shrink .main-navigation .primary-menu-container > ul > li.menu-item > a {
    padding-top: 1.8em !important;
    padding-bottom: 1.8em !important;
}

/* Na mobile header-shrink nie ingeruje (jest fixed) */
@media (max-width: 1024px) {
    body.header-shrink #masthead .site-main-header-inner-wrap {
        min-height: 80px !important;
    }
}