/**
 * LFG Magazine – Homepage Styles
 * Wersja: 2.6.2
 * Plik:   css/magazine-home.css
 *
 * Zmiany v2.5.0 (2026-03-24):
 * - FIX: Odstępy między sekcjami przywrócone jak w v2.0.0
 * - FIX: Szare tło sekcji Najnowsze ograniczone do kontenera (nie full-width)
 * - FIX: Marginesy kafelków 10px (góra/dół/lewo/prawo)
 * - FIX: Czcionka tytułów sekcji 2x większa (1.3rem → 2.6rem)
 * - NEW: Baner reklamowy 900×200px pod nagłówkiem (przed sekcją Najnowsze)
 *
 * Zmiany v2.4.1 (2026-03-24):
 * - FIX: padding-left/right:0 !important na #main (390px offset z jaroti)
 *
 * Zmiany v2.4.0 (2026-03-24):
 * - FIX: Wyśrodkowanie strony – dodano #main.wrapper do selektora (wyższa specyficzność)
 * - FIX: Dodano #lgm-homepage .lgm-container z !important na marginesach
 * - FIX: Dodano body.lgm-is-homepage #lgm-homepage z pełną szerokością
 * - FIX: box-sizing: border-box !important na wszystkich elementach resetu
 *
 * Zmiany v2.3.1 (2026-03-24):
 * - FIX: .lgm-slider__track zmieniony z position:relative na position:absolute;inset:0
 * - FIX: functions.php enqueue wersja '2.4.0' (cache-busting)
 * Zmiany v2.3.0 (2026-03-24):
 * - NEW: Sekcja Najnowsze wpisy – slider (lewa) + lista (prawa)
 * - Slider: 3 artykuły, rotacja co 5s, fade transition, dots, swipe mobile
 * - Lista: te same 3 artykuły, tytuł + data + Czytaj dalej
 *
 * Zmiany v2.2.0 (2026-03-24):
 * - FIX: Wyśrodkowanie strony – reset parent-theme float/padding dla #main i .page-container
 * - FIX: Dodane separatory (border-top) między sekcjami tematycznymi
 * - FIX: Dodano margin: 0 auto jako fallback dla .lgm-container
 * - FIX: width: 100% dla #lgm-homepage
 *
 * Zmiany v2.1.0:
 * - Białe tło (#ffffff), czarna czcionka (#1a1a1a)
 * - Nowy kafelek lgm-tile (kwadrat z overlay tekstu)
 * - Nowy kafelek reklamy lgm-ad-tile (REKLAMA + baner 720×720 + REKLAMA)
 * - Sekcja "Najnowsze": 2 kolumny × 1 wiersz (lgm-latest__grid)
 * - Sekcje tematyczne: siatka 2×2 (lgm-section__tiles)
 * - Pełne skalowanie mobilne
 *
 * SPIS:
 *  1.  Custom Properties
 *  2.  Reset / Base
 *  3.  Container
 *  4.  Section – nagłówek
 *  5.  Section – siatka 2×2 (sekcje tematyczne)
 *  6.  Kafelek lgm-tile (overlay) – BASE
 *  7.  Kafelek lgm-tile – obraz tła
 *  8.  Kafelek lgm-tile – gradient overlay
 *  9.  Kafelek lgm-tile – treść (góra + dół)
 * 10.  Kafelek reklamy lgm-ad-tile
 * 11.  Sekcja "Najnowsze wpisy" (2 kolumny)
 * 12.  Baner pasek reklamowy (strip)
 * 13.  Hover / animacje
 * 14.  Responsywność – Tablet (≤1024px)
 * 15.  Responsywność – Mobile (≤768px)
 * 16.  Responsywność – Small Mobile (≤480px)
 * 17.  Utilities
 */

/* ================================================================
   1. CUSTOM PROPERTIES
   ================================================================ */
:root {
    /* ── Kolory – BIAŁE TŁO ── */
    --lgm-bg:              #ffffff;
    --lgm-bg-secondary:    #f7f7f7;
    --lgm-bg-card:         #f0f0f0;
    --lgm-border:          #e2e2e2;
    --lgm-border-hover:    #b0b0b0;

    /* ── Tekst – CZARNY ── */
    --lgm-text-primary:    #1a1a1a;
    --lgm-text-secondary:  #555555;
    --lgm-text-muted:      #999999;

    /* ── Akcenty (każda sekcja nadpisuje --lgm-accent) ── */
    --lgm-accent:          #e8272b;

    /* ── Typografia ── */
    --lgm-font:            'Barlow', 'Inter', system-ui, sans-serif;

    /* ── Layout ── */
    --lgm-container:       1280px;
    --lgm-pad:             24px;        /* padding boczny kontenera */
    --lgm-gap:             16px;        /* gap między kafelkami */
    --lgm-section-mt:      48px;        /* margines górny sekcji */

    /* ── Kafelek ── */
    --lgm-tile-radius:     0px;         /* zaokrąglenie rogów kafelka */

    /* ── Overlay gradient ── */
    --lgm-overlay-top:     linear-gradient(
                               to bottom,
                               rgba(0,0,0,0.72) 0%,
                               rgba(0,0,0,0.30) 45%,
                               rgba(0,0,0,0)    60%
                           );
    --lgm-overlay-bottom:  linear-gradient(
                               to top,
                               rgba(0,0,0,0.80) 0%,
                               rgba(0,0,0,0.35) 50%,
                               rgba(0,0,0,0)    70%
                           );

    /* ── Nagłówek sekcji ── */
    --lgm-sec-title-size:  1.4rem;       /* P3: przywrócono rozmiar jak v2.0.0 */
    --lgm-sec-accent-w:    4px;         /* szerokość kolorowej kreski */

    /* ── Reklama tile ── */
    --lgm-ad-label-size:   8px;
    --lgm-ad-label-pad:    7px 0;
}

/* ================================================================
   2. RESET / BASE
   ================================================================ */
#lgm-homepage *,
#lgm-homepage *::before,
#lgm-homepage *::after {
    box-sizing: border-box;
    padding: 0;
}

#lgm-homepage {
    width: 100%;                         /* FIX v2.2.0: pełna szerokość */
    background-color: var(--lgm-bg);
    color: var(--lgm-text-primary);
    font-family: var(--lgm-font);
    padding-bottom: 60px;
}

#lgm-homepage a {
    color: inherit;
    text-decoration: none;
}

#lgm-homepage img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ================================================================
   3. CONTAINER
   ================================================================ */
.lgm-container {
    max-width: var(--lgm-container);
    width: 100%;
    margin: 0 auto;                      /* FIX v2.2.0: fallback dla starszych przeglądarek */
    margin-inline: auto;
    padding-left: var(--lgm-pad);        /* FIX v2.2.0: fallback */
    padding-right: var(--lgm-pad);       /* FIX v2.2.0: fallback */
    padding-inline: var(--lgm-pad);
}

/* ================================================================
   4. SECTION – NAGŁÓWEK
   ================================================================ */
.lgm-section {
    margin-top: var(--lgm-section-mt);   /* P5: odstęp między blokami */
    margin-bottom: 10px;                 /* P5: minimum 10px odstępu na dole */
    padding-top: var(--lgm-section-mt);
    padding-bottom: var(--lgm-section-mt);
    /*border-top: 2px solid var(--lgm-border); /* FIX v2.2.0: separator między sekcjami */
}

.lgm-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--lgm-border);
}

.lgm-section__title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--lgm-sec-title-size);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--lgm-text-primary);
    line-height: 1; 
}

/* Kolorowa kreska przed tytułem */
.lgm-section__title-accent {
    display: inline-block;
    width: var(--lgm-sec-accent-w);
    height: 1em;
    background-color: var(--lgm-accent);
    border-radius: 2px;
    flex-shrink: 0;
}

.lgm-section__title a {
    color: var(--lgm-text-primary);
    transition: color 0.2s;
}
.lgm-section__title a:hover {
    color: var(--lgm-accent);
}

.lgm-section__more {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--lgm-text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.2s;
}
.lgm-section__more:hover {
    color: var(--lgm-accent);
}

/* ================================================================
   5. SECTION – SIATKA 2×2 (sekcje tematyczne)
   Kafelki: [Post1] [Post2] / [Post3] [Reklama]
   ================================================================ */
.lgm-section__tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: var(--lgm-gap);
}

/* ================================================================
   6. KAFELEK lgm-tile – BASE
   Kwadratowy, position:relative, overflow:hidden
   ================================================================ */
.lgm-tile {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--lgm-tile-radius);
    background-color: var(--lgm-bg-card);
    margin: 10px;                           /* FIX v2.5.0: marginesy kafelków 10px */
    /* Proporcje 1:1 (aspect-ratio z fallbackiem padding-top) */
    aspect-ratio: 1 / 1;
}

/* Fallback dla przeglądarek bez aspect-ratio */
@supports not (aspect-ratio: 1) {
    .lgm-tile {
        padding-top: 100%;
    }
    .lgm-tile > * {
        position: absolute;
        top: 0; left: 0;
        width: 100%; height: 100%;
    }
}

/* ================================================================
   7. KAFELEK lgm-tile – OBRAZ TŁA
   ================================================================ */
.lgm-tile__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.5s ease;
    z-index: 0;
}

.lgm-tile__bg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lgm-tile__bg--placeholder {
    background-color: #d0d0d0;
    background-image: repeating-linear-gradient(
        45deg,
        #bbb 0px, #bbb 1px,
        transparent 1px, transparent 12px
    );
}

/* ================================================================
   8. KAFELEK lgm-tile – GRADIENT OVERLAY
   Dwa pseudo-elementy: górny i dolny gradient
   ================================================================ */
.lgm-tile__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        var(--lgm-overlay-top),
        var(--lgm-overlay-bottom);
}

/* ================================================================
   9. KAFELEK lgm-tile – TREŚĆ (góra + dół)
   ================================================================ */
.lgm-tile__content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px 16px 16px 21px; /* +5px od lewej */
    margin-left: 10px;             /* Zmiana 3 */
    pointer-events: none;
}

/* Zmiana 3: dolna belka kafelka też z marginesem */
.lgm-tile__bottom {
    margin-left: 10px;
}

/* Elementy wewnętrzne muszą mieć pointer-events: auto dla linków */
.lgm-tile__content a {
    pointer-events: auto;
}

/* GÓRA */
.lgm-tile__top {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lgm-tile__cat {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #ffffff !important;
    background-color: var(--lgm-accent);
    padding: 2px 5px;
    border-radius: 2px;
    width: fit-content;  /* P6d: 2px góra/dół, 5px prawo/lewo */
    pointer-events: auto;
    transition: opacity 0.2s;
}
.lgm-tile__cat:hover {
    opacity: 0.85;
}

.lgm-tile__title {
    font-size: clamp(1.4rem, 2.6vw, 2.0rem);  /* P6b: 2x większy tytuł */
    font-weight: 700;
    line-height: 1.3;
    color: #ffffff;
    /* Max 3 linie */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lgm-tile__title a {
    color: #ffffff !important;
    pointer-events: auto;
    transition: opacity 0.2s;
}
.lgm-tile__title a:hover {
    opacity: 0.85;
}

/* DÓŁ */
.lgm-tile__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.lgm-tile__date {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
    white-space: nowrap;
}

.lgm-tile__readmore {
    font-size: 1.2rem;  /* P6c: 2x większe czytaj więcej */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #ffffff !important;
    white-space: nowrap;
    pointer-events: auto;
    border-bottom: 1px solid rgba(255,255,255,0.5);
    padding-bottom: 1px;
    transition: border-color 0.2s, opacity 0.2s;
}
.lgm-tile__readmore:hover {
    border-color: #fff;
    opacity: 0.85;
}

/* Pełnopowierzchniowy link – nie blokuje kliknięć na linki wewnętrzne */
.lgm-tile__link-full {
    position: absolute;
    inset: 0;
    z-index: 1; /* pod .lgm-tile__content (z-index: 2) */
    display: block;
}

/* ================================================================
   10. KAFELEK REKLAMY lgm-ad-tile
   ─────────────────────────────────────────────────────────────
   Struktura:
     <div class="lgm-ad-tile">
       <span class="lgm-ad-tile__label lgm-ad-tile__label--top">Reklama</span>
       <div class="lgm-ad-tile__inner">  ← obraz 1:1 (baner AdRotate) →  </div>
       <span class="lgm-ad-tile__label lgm-ad-tile__label--bottom">Reklama</span>
     </div>
   ================================================================ */
.lgm-ad-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--lgm-bg-secondary);
    border: 1px solid var(--lgm-border);
    border-radius: var(--lgm-tile-radius);
    overflow: hidden;
}

/* Napis REKLAMA – górny i dolny */
.lgm-ad-tile__label {
    display: block;
    width: 100%;
    text-align: center;
    font-size: var(--lgm-ad-label-size);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--lgm-text-muted);
    padding: var(--lgm-ad-label-pad);
    background-color: var(--lgm-bg-secondary);
    line-height: 1;
    user-select: none;
    flex-shrink: 0;
}

/* Kontener wewnętrzny – wypełnia dostępną przestrzeń i zachowuje proporcje 1:1 */
.lgm-ad-tile__inner {
    width: 100%;
    flex: 1;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    /* display: block (nie flex) – żeby .g dziedziczył szerokość normalnie */
}

/* ─────────────────────────────────────────────────────────────────────────
   AdRotate HTML (z analizy lifegun.pl):
     div.g.g-{N}                              ← wrapper GRUPY reklam
       div.g-dyn.a-{id}.c-{slot} [style="display:none"]  ← pojedyncza reklama
         a.gofollow > img
       div.g-dyn.a-{id}.c-{slot} [style=""]             ← aktywna reklama
         a.gofollow > img

   Zasada: dotykamy TYLKO .g (wrapper) i img.
   .g-dyn → NIE dotykamy (AdRotate JS zmienia style="display:none/block" na tych div-ach)
   ───────────────────────────────────────────────────────────────────────── */

/* .g = wrapper grupy – musi wypełnić tile */
.lgm-ad-tile__inner .g {
    width: 100% !important;
    height: 100% !important;
    display: block !important;   /* .g ZAWSZE widoczny – to kontener, nie reklama */
    position: relative;
}

/* .g-dyn = indywidualny baner – NIE DOTYKAMY display (AdRotate JS steruje) */
/* .lgm-ad-tile__inner .g-dyn { } ← celowo puste */

/* Obraz reklamy – wypełnia przestrzeń */
.lgm-ad-tile__inner .g img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Placeholder gdy AdRotate nieaktywny */
.lgm-ad-tile__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lgm-bg-card);
    color: var(--lgm-text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px dashed var(--lgm-border);
}
/* ================================================================
   Zmiana 5: kafelek sąsiadujący z reklamą (klasa dodana przez PHP)
   ================================================================ */
.lgm-tile--ad-neighbor {
    position: relative;
    top: 10px;
}


/* ================================================================
   11. SEKCJA "NAJNOWSZE WPISY" v2.3.0
   Lewa kolumna: slider (3 artykuły, rotacja co 5 sek.)
   Prawa kolumna: lista tytułów tych samych 3 artykułów
   ================================================================ */

/* ================================================================
   BANER GŁÓWNY 900×200 – między nagłówkiem a sekcją Najnowsze
   v2.5.4: prosta technika bez flex – margin: 0 auto wyśrodkowuje banner
   ================================================================ */
.lgm-header-banner {
    padding: 20px 0 5px 0;
    background-color: #ffffff;
    text-align: center;
}

/* Zmiana 1: wyśrodkuj zawartość kontenera banera */
.lgm-header-banner .lgm-container {
    text-align: center;
    display: block;        /* NIE flex – żeby margin:0 auto działało */
    margin-left:  auto;
    margin-right: auto;
}

/* Napis REKLAMA nad/pod banerem */
.lgm-header-banner__label {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--lgm-text-muted, #888);
    margin: 0 auto 4px;
    line-height: 1;
    display: block;
}

/* Wrapper banera – wyśrodkowany bez flex */
.lgm-header-banner__wrap {
    max-width: 920px;          /* trochę szerszy niż 900 żeby paddingi nie urzynały */
    width: 100%;
    margin: 0 auto;            /* ← kluczowe wyśrodkowanie */
    min-height: 60px;
    overflow: visible;
    text-align: center;
}

/* AdRotate: .g = wrapper grupy, .g-dyn = indywidualny baner (display sterowany przez JS)
   FIX v2.6.2: stylizujemy .g (wrapper), NIE .g-dyn */
.lgm-header-banner__wrap .g {
    max-width: 900px !important;
    margin-left:  auto !important;
    margin-right: auto !important;
    text-align: center;
    display: block !important;   /* .g ZAWSZE widoczny */
}

/* .g-dyn → NIE dotykamy display (AdRotate JS steruje inline style) */

.lgm-header-banner__wrap .g img,
.lgm-header-banner__wrap .g a img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.lgm-section--latest {
    margin-top: 5px;   /* +5px odstęp od góry */
    margin-bottom: 5px; /* +5px odstęp od dołu */
    padding-top: var(--lgm-section-mt);
    padding-bottom: var(--lgm-section-mt);
    background-color: transparent;
    border-top: none;
    border-bottom: 2px solid var(--lgm-border);
}

/* P4: brak background na kontenerze – tło przenoszone na lgm-latest__grid */
.lgm-section--latest .lgm-container {
    background-color: transparent;
    padding: 0;
}

/* P4: szare tło TYLKO pod siatką slider+lista, nie rozciąga się poza */
.lgm-latest__grid {
    background-color: var(--lgm-bg-secondary);
    border-radius: 6px;
    padding: 16px;
}

/* Grid 2 kolumny: [slider] [lista] */
.lgm-latest__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--lgm-gap);
    align-items: start;          /* lista od góry */
}

/* ----------------------------------------------------------------
   11a. SLIDER
   ---------------------------------------------------------------- */
.lgm-slider {
    position: relative;
    overflow: hidden;
    border-radius: var(--lgm-tile-radius);
    /* Kwadrat 1:1 */
    aspect-ratio: 1 / 1;
    background-color: var(--lgm-bg-card);
}

/* Fallback aspect-ratio */
@supports not (aspect-ratio: 1) {
    .lgm-slider::before {
        content: '';
        display: block;
        padding-top: 100%;
    }
    .lgm-slider__track {
        position: absolute !important;
        inset: 0 !important;
    }
}

/* FIX v2.3.1: absolute fill zamiast relative+height:100% – działa z aspect-ratio */
.lgm-slider__track {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Każdy slajd: absolutny, domyślnie ukryty (opacity:0) */
.lgm-slider__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.75s ease;
    pointer-events: none;
}

/* Aktywny slajd */
.lgm-slider__slide--active {
    opacity: 1;
    pointer-events: auto;
}

/* Elementy tile wewnątrz slajdu */
.lgm-slider__slide .lgm-tile__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.lgm-slider__slide .lgm-tile__bg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lgm-slider__slide .lgm-tile__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        var(--lgm-overlay-top),
        var(--lgm-overlay-bottom);
}

.lgm-slider__slide .lgm-tile__content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    pointer-events: none;
}

.lgm-slider__slide .lgm-tile__content a {
    pointer-events: auto;
}

/* Hover: zoom na aktywnym slajdzie */
.lgm-slider:hover .lgm-slider__slide--active .lgm-tile__bg {
    transform: scale(1.04);
}

/* Dots – wskaźniki slajdów */
.lgm-slider__dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.lgm-slider__dot {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    border: 2px solid rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0;
    transition: background 0.3s, transform 0.2s;
    flex-shrink: 0;
}

.lgm-slider__dot--active {
    background: #ffffff;
    transform: scale(1.25);
}

.lgm-slider__dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* ----------------------------------------------------------------
   11b. LISTA TYTUŁÓW (prawa kolumna)
   ---------------------------------------------------------------- */
.lgm-latest__list {
    display: flex;
    flex-direction: column;
    /* Wys. listy = wys. slidera (auto via grid align-items:stretch) */
    align-self: stretch;
    justify-content: space-between;
    padding: 0;
    gap: 0;
}

.lgm-list-item {
    display: flex;
    flex-direction: column;
    padding: 18px 0;
    border-bottom: 1px solid var(--lgm-border);
    /* Upewnij się, że element ma z czego "rosnąć" */
    flex: 1; 
}

/* 2. Meta działająca jak stopka (footer) */
.lgm-list-item__meta {
    margin-top: auto;      /* Wypycha całą linię na dół kafelka */
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Zmieniamy z space-between na start */
    gap: 0;                /* Resetujemy gap, bo mamy &nbsp; w HTML */
}

.lgm-list-item__readmore {
    margin-left: auto;     /* MAGIA: to przesuwa tylko ten link na prawą krawędź */
    font-size: 1.2rem;
    font-weight: 700;
    /* ... reszta Twoich styli ... */
}

/* 4. Kosmetyka dla lewej strony */
.lgm-list-item__date {
    font-size: 1rem;
    color: var(--lgm-text-muted);
}

.lgm-list-item__cat {
    margin-left: 8px;    /* Odstęp kategorii od daty */
}

/* Badge kategorii */
.lgm-list-item__cat {
    display: inline-block;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    /*letter-spacing: 0.12em;*/
    /*color: #ffffff !important;*/
    background-color;
    padding: 2px 7px;
    border-radius: 2px;
    width: fit-content;
    transition: opacity 0.2s;
}
.lgm-list-item__cat:hover {
    opacity: 0.85;
}

/* Tytuł */
.lgm-list-item__title {
    margin-top: 10px;
    margin-bottom: 20px;
    element.style {
    /* margin-left: 0; */
    margin: auto;
    margin-left: 0;
    font-size: clamp(1.6em, 1.6vw, 1.8rem);
    font-weight: 700;
    line-height: 1.4;
    color: var(--lgm-text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lgm-list-item__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}
.lgm-list-item__title a:hover {
    color: var(--lgm-accent);
}

/* Meta: data + Czytaj dalej */
.lgm-list-item__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.lgm-list-item__date {
    font-size: 1rem;
    color: var(--lgm-text-muted);
    white-space: nowrap;
}


/* Zmiana 4: kategoria w meta – spacja między elementami (gap już jest) */
.lgm-list-item__meta .lgm-list-item__cat {
    display: inline-block;
    margin-left: 6px;   /* spacja od daty */
}
.lgm-list-item__readmore {
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--lgm-accent) !important;
    white-space: nowrap;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 1px;
    transition: border-color 0.2s;
}
.lgm-list-item__readmore:hover {
    border-color: var(--lgm-accent);
}

/* ================================================================
   12. BANER PASEK REKLAMOWY (strip poziomy)
   ================================================================ */
.lgm-ad-strip {
    background-color: var(--lgm-bg-secondary);
    border-top: 2px solid var(--lgm-border);
    border-bottom: 2px solid var(--lgm-border);
    padding-block: 0;
}

.lgm-ad-strip__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-block: 4px;
}

.lgm-ad-strip__label {
    display: block;
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--lgm-text-muted);
    text-align: center;
    padding: 4px 0;
    user-select: none;
}

.lgm-ad-strip__inner .g,
.lgm-ad-strip__inner > div:not(.lgm-ad-strip__label) {
    max-width: 900px;
    width: 100%;
}

.lgm-ad-strip__inner img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-inline: auto;
}

/* ================================================================
   13. HOVER / ANIMACJE
   ================================================================ */
.lgm-tile:hover .lgm-tile__bg {
    transform: scale(1.04);
}

.lgm-tile:hover {
    box-shadow: 0 6px 32px rgba(0,0,0,0.18);
}

.lgm-ad-tile:hover {
    border-color: var(--lgm-border-hover);
}

/* ================================================================
   14. RESPONSYWNOŚĆ – TABLET (≤1024px)
   ================================================================ */
@media (max-width: 1024px) {
    :root {
        --lgm-section-mt: 36px;
        --lgm-gap: 14px;
        --lgm-container: 100%;
        --lgm-pad: 20px;
    }

    .lgm-tile__title {
        font-size: clamp(0.85rem, 2.5vw, 1.1rem);
    }

    .lgm-tile__content {
        padding: 14px;
    }

    /* Tablet: lista prawa – mniejszy tekst */
    .lgm-list-item__title {
        font-size: clamp(0.9rem, 2vw, 1.05rem);
    }

    .lgm-slider__dot {
        width: 9px;
        height: 9px;
    }
}

/* ================================================================
   15. RESPONSYWNOŚĆ – MOBILE (≤768px)
   ================================================================ */
@media (max-width: 768px) {
    :root {
        --lgm-section-mt: 28px;
        --lgm-gap: 10px;
        --lgm-pad: 16px;
        --lgm-sec-title-size: 1.15rem;
    }

    /* Mobile: slider i lista pionowo (slider na górze, lista pod) */
    .lgm-latest__grid {
        grid-template-columns: 1fr;
    }

    /* Na mobile lista nie stretch – naturalny flow */
    .lgm-latest__list {
        align-self: auto;
        justify-content: flex-start;
    }

   .lgm-list-item {
    flex: 1; 
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* ZMIANA: usuń "top", wpisz "flex-start" */
    gap: 6px;
    padding: 18px 0;
    border-bottom: 1px solid var(--lgm-border);
}

    /* Sekcje tematyczne: 2×2 → 1 kolumna */
    .lgm-section__tiles {
        grid-template-columns: 1fr;
    }

    /* Kafelek reklamy na mobile */
    .lgm-ad-tile__inner {
        aspect-ratio: 1 / 1;
        max-height: 320px;
    }

    /* Mniejszy padding tekstu */
    .lgm-tile__content {
        padding: 12px;
    }

    .lgm-tile__title {
        font-size: clamp(0.9rem, 4vw, 1.1rem);
        -webkit-line-clamp: 3;
    }

    .lgm-tile__cat {
        font-size: 0.62rem;
    }

    .lgm-tile__date,
    .lgm-tile__readmore {
        font-size: 0.68rem;
    }

    /* Slider dots mniejsze na mobile */
    .lgm-slider__dot {
        width: 8px;
        height: 8px;
    }

    .lgm-slider__dots {
        bottom: 10px;
        gap: 6px;
    }
}

/* ================================================================
   16. RESPONSYWNOŚĆ – SMALL MOBILE (≤480px)
   ================================================================ */
@media (max-width: 480px) {
    :root {
        --lgm-gap: 8px;
        --lgm-pad: 12px;
    }

    /* Na bardzo małych ekranach kafelek trochę mniejszy gradient */
    .lgm-tile__top {
        gap: 5px;
    }

    .lgm-tile__title {
        font-size: 0.95rem;
        -webkit-line-clamp: 2;
    }

    /* Pasek reklamowy – mała wysokość */
    .lgm-ad-strip__inner img {
        max-height: 100px;
    }
}

/* ================================================================
   17. UTILITIES
   ================================================================ */
.lgm-sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ================================================================
   FIX v2.4.0: RESET PARENT THEME – WYŚRODKOWANIE STRONY
   Nadpisanie stylów parent theme (jaroti/.wrapper) które powodują
   wyrównanie do lewej. #main ma klasę .wrapper w jaroti – dodajemy
   ją do selektora dla wyższej specyficzności.
   ================================================================ */
body.lgm-is-homepage,
body.lgm-is-homepage #page,
body.lgm-is-homepage #content,
body.lgm-is-homepage .site-content,
body.lgm-is-homepage #primary,
body.lgm-is-homepage .content-area {
    background-color: #ffffff !important;
    color: #1a1a1a !important;
}

/* Reset #main – usuń float i ograniczenia szerokości (z klasą .wrapper) */
body.lgm-is-homepage #main,
body.lgm-is-homepage #main.wrapper,
body.lgm-is-homepage .page-container,
body.lgm-is-homepage .site-main,
body.lgm-is-homepage #primary,
body.lgm-is-homepage .content-area {
    display: block !important;
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: none !important;
    box-sizing: border-box !important;
}

/* FIX v2.4.0: Wymuś wyśrodkowanie .lgm-container (nadpisanie .wrapper) */
#lgm-homepage .lgm-container {
    max-width: var(--lgm-container) !important;
    width: 100% !important;
    margin-left:  auto !important;
    margin-right: auto !important;
    padding-left:  var(--lgm-pad) !important;
    padding-right: var(--lgm-pad) !important;
    box-sizing: border-box !important;
    display: block !important;
    float: none !important;
}

/* FIX v2.4.0: #lgm-homepage pełna szerokość */
body.lgm-is-homepage #lgm-homepage {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    padding-bottom: 60px !important;
    float: none !important;
    box-sizing: border-box !important;
}

/* Reset artykułu / entry – usuń nadmiarowe marginesy */
body.lgm-is-homepage article.page,
body.lgm-is-homepage .hentry,
body.lgm-is-homepage .entry-content {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
}

/* Ukryj sidebar na stronie głównej */
body.lgm-is-homepage .widget-area,
body.lgm-is-homepage #secondary,
body.lgm-is-homepage .sidebar {
    display: none !important;
}

/* ================================================================
   LGM MINIMAL HEADER STYLES
   ================================================================ */

.lgm-minimal-header {
    background: #ffffff;
    border-bottom: 1px solid var(--lgm-border);
    padding: 10px 0;
}

.lgm-minimal-header .header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Logo po lewej, menu po prawej */
    gap: 40px;
}

/* Ustawienia LOGO */
.lgm-minimal-header .logo img {
    height: 60px !important;
    width: auto !important;
    display: block;
}

/* CZARNE MENU */
.lgm-minimal-header .main-menu > li > a {
    color: #000000 !important; /* Wymuszenie czarnego koloru */
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.05em;
    transition: color 0.2s ease;
}

.lgm-minimal-header .main-menu > li > a:hover {
    color: var(--lgm-accent) !important; /* Kolor akcentu po najechaniu */
}

/* Fix dla układu listy menu */
.lgm-minimal-header .main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 25px;
}

/* Responsywność - wyśrodkowanie na mniejszych ekranach */
@media (max-width: 991px) {
    .lgm-minimal-header .header-wrapper {
        flex-direction: column;
        padding: 15px 0;
    }
}
/* ================================================================
   18. SINGLE POST – ukrycie obrazka wyróżniającego (entry-format)
   v2.7.3: .single body class → ukrywamy .entry-format thumbnail
   ================================================================ */
body.single .entry-format,
body.single .entry-header .entry-format,
body.single-post .entry-format {
    display: none !important;
}