/* ==========================================================================
   1. ZMIENNE GLOBALNE I BAZA (THEME VARIABLES)
   ========================================================================== */
:root {
    --global--secondary-color: #db0d15;
    /* Twój RED */
    --global--red-hover: #fa1b24;
    --global--text-color: #ffffff;
    --global--text-muted: #a0aab2;
    --global--bg-main: #0a0a0a;
    /* Smocza, głęboka czerń */
    --global--bg-card: #141414;
    /* Czerń o stopień wyżej dla kart */
    --global--border: rgba(255, 255, 255, 0.08);
    --global--border-hover: rgba(219, 13, 21, 0.4);

    --container-width: 1280px;
    --font-heading: 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;

    /* Gładkie przejścia */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);

    /* Neon Glows */
    --red-glow: 0 8px 32px rgba(219, 13, 21, 0.25);
    --red-glow-strong: 0 12px 48px rgba(219, 13, 21, 0.4);
    --glass-bg: rgba(20, 20, 20, 0.7);
}

.site-main{

    padding-top: 0 !important;
}
main.main-blog-container.knowledge-hub {
    margin-top: 0px;
}

.knowledge-hub {
    padding-bottom: 100px;
}

.container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Użytkowe */
.text-red {
    color: var(--global--secondary-color) !important;
    font-weight: 800;
}

.bg-red {
    background-color: var(--global--secondary-color) !important;
    color: #fff !important;
}

/* Animacje wejścia */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    opacity: 0;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.3s;
}

.delay-3 {
    animation-delay: 0.5s;
}

/* ==========================================================================
   2. HERO SECTION & WYSZUKIWARKA (SEARCH BAR)
   ========================================================================== */

.parallax-hero {
    position: relative;
    padding: 60px 0; /* Wysokość ścięta o połowę! */
    margin-bottom: 30px; /* Lekko mniejszy margines pod spodem dla proporcji */

    /* Magia dynamicznej Paralaksy (bez 'fixed') */
    background-position: center 0px; 
    background-repeat: no-repeat;
    background-size: cover;
    overflow: hidden;
    
    /* Optymalizacja, żeby animacja nie cięła na telefonach */
    will-change: background-position;

    /* Animacja wejścia */
    animation: fadeIn 1s ease-out;
}

/* Overlay, który wtapia zdjęcie w resztę strony */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.4) 0%, rgba(10, 10, 10, 1) 100%);
    z-index: 1;
}

.relative-z {
    position: relative;
    z-index: 2;
}

.blog-hero__title {
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    color: #fff;
    text-align: center;
}

.blog-hero__title strong {
    font-weight: 900;
    color: var(--global--secondary-color);
}

.blog-hero__subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto 40px;
}

/* Glass Search Bar */
.blog-hero__search {
    max-width: 600px;
    margin: 0 auto 30px;
}

.search-input-wrapper {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 60px;
    padding: 8px;
    backdrop-filter: blur(15px);
    /* To daje efekt szkła */
    -webkit-backdrop-filter: blur(15px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--global--secondary-color);
    box-shadow: 0 0 30px rgba(219, 13, 21, 0.3);
    transform: translateY(-5px);
}

.search-field {
    flex: 1;
    background: transparent;
    border: none !important;
    padding: 0 24px !important;
    color: #fff !important;
    font-size: 1.1rem;
    outline: none;
    margin: 0 !important;
}

.search-submit {
    background: var(--global--secondary-color);
    color: #fff;
    border: none;
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content:center;  
}

.search-form {
    justify-content: center;
}

.search-submit:hover {
    background: #ff1f28;
    transform: scale(1.05);
}

/* Trending Tags (Lekko pulsujące) */
.blog-hero__trending {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.trending-tag {
    color: #fff;
    text-decoration: none;
    padding: 6px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s;
}

.trending-tag:hover {
    background: var(--global--secondary-color);
    border-color: var(--global--secondary-color);
}

/* Animacja wejścia */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   3. FILTRY KATEGORII
   ========================================================================== */
.blog-filters {
    margin-bottom: 60px;
    border-bottom: 1px solid var(--global--border);
    padding-bottom: 24px;
}

.filter-list {
    display: flex;
    gap: 16px;
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-x: auto;
    scrollbar-width: none;
    /* Firefox */
}

.filter-list::-webkit-scrollbar {
    display: none;
}

/* Chrome/Safari */

.filter-item a {
    display: block;
    padding: 12px 28px;
    color: var(--global--text-muted);
    border: 1px solid var(--global--border);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.filter-item a:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--global--text-color);
}

.filter-item.active a {
    background: var(--global--secondary-color);
    border-color: var(--global--secondary-color);
    color: #fff;
    box-shadow: var(--red-glow);
}

/* ==========================================================================
   4. WYRÓŻNIONY WPIS (HERO POST)
   ========================================================================== */
.blog-featured {
    margin-bottom: 80px;
}

.featured-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    background: var(--global--bg-card);
    border-radius: 24px;
    padding: 32px;
    border: 1px solid var(--global--border);
    align-items: center;
    transition: var(--transition-smooth);
}

.featured-card:hover {
    border-color: var(--global--border-hover);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.featured-card__image-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.featured-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-card:hover .featured-card__image {
    transform: scale(1.05);
}

.meta-data {
    display: flex;
    gap: 16px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-time {
    color: var(--global--text-muted);
}

.featured-card__title {
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 24px;
}

.featured-card__title a {
    color: var(--global--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.featured-card__title a:hover {
    color: var(--global--secondary-color);
}

.featured-card__excerpt {
    color: var(--global--text-muted);
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 40px;
}

.featured-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--global--border);
    padding-top: 24px;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.author-avatar {
    border-radius: 50%;
    width: 48px;
    height: 48px;
    object-fit: cover;
    border: 2px solid var(--global--border);
}

.author-details {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 700;
    font-size: 1rem;
}

.post-date {
    font-size: 0.85rem;
    color: var(--global--text-muted);
}

.btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--global--secondary-color);
    font-weight: 700;
    text-decoration: none;
    transition: gap 0.3s ease;
}

.btn-read-more:hover {
    gap: 14px;
}

/* ==========================================================================
   5. SIATKA WPISÓW Z WSTRZYKNIĘTYM BANEREM (GRID & LEAD MAGNET)
   ========================================================================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    perspective: 1200px;
    perspective-origin: center top;
    grid-auto-flow: dense; /* Magia, która łata dziury i układa małe posty obok dużego */
}

/* BIG POST (Pierwszy element zajmuje 2 kolumny) */
article.grid-card:not(.is-out):first-of-type {
    grid-column: span 2;
}

article.grid-card:not(.is-out):first-of-type .grid-card__image-wrapper {
    max-height: 380px; /* Zwiększyłem lekko, aby tytuł na obrazku miał miejsce oddychać */
}

/* KARTA - GŁÓWNY KONTENER */
.grid-card {
    background: var(--global--bg-card);
    border-radius: 20px;
    border: 1px solid var(--global--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.grid-card__link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* WRAAPER OBRAZKA (Teraz z gradientem pod tytuł) */
.grid-card__image-wrapper {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

/* Ciemny gradient (kinowy efekt pod tytułem) */
.grid-card__image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 40%,
        rgba(0, 0, 0, 0.4) 65%,
        rgba(0, 0, 0, 0.9) 100%
    );
    z-index: 1;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.grid-card:hover .grid-card__image-wrapper::after {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 30%,
        rgba(0, 0, 0, 0.5) 60%,
        rgba(0, 0, 0, 0.95) 100%
    );
}

.grid-card__image {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.grid-card:hover .grid-card__image {
    transform: scale(1.08);
}

/* ODZNAKA / BADGE */
.grid-card__badge {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgba(219, 13, 21, 0.9) !important;
    z-index: 3; /* Zabezpieczenie, by było nad gradientem */
}

/* TYTUŁ NAŁOŻONY NA OBRAZEK */
.grid-card__title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    margin-bottom: 0;
    padding: 30px 30px 20px 30px;
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.4;
    color: #ffffff;
    z-index: 2;
    transition: color 0.3s ease;
    background-color: rgba(0, 0, 0, 0.5);
}

.grid-card__title-clamp{
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    word-break: break-word;
    
}

.grid-card:hover .grid-card__title {
    color: var(--global--secondary-color);
}

/* KONTENER OPISU (Pod obrazkiem) */
.grid-card__content {
    padding: 24px 30px 30px 30px;
    flex-grow: 1;
}

.grid-card__excerpt {
    color: var(--global--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* STOPKA KARTY */
.grid-card__bottom {
    padding: 20px 30px;
    border-top: 1px solid var(--global--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
}

.grid-meta-inline {
    display: flex;
    gap: 8px;
    color: var(--global--text-muted);
}


/* ==========================================================================
   WSTRZYKNIĘTY LEAD MAGNET W SIATKĘ
   ========================================================================== */
.lead-magnet-card {
    background: linear-gradient(135deg, #1f1f1f 0%, rgba(219, 13, 21, 0.15) 100%);
    border: 1px solid rgba(219, 13, 21, 0.3);
    position: relative;
    padding: 48px;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    grid-column: 1 / -1; /* Rozciągnięcie na wszystkie dostępne kolumny */
}

.lead-magnet-card::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 250px;
    height: 250px;
    background: var(--global--secondary-color);
    filter: blur(120px);
    opacity: 0.2;
    pointer-events: none;
}

.lead-magnet-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto;
}

.lead-magnet-content .badge {
    background: var(--global--secondary-color);
    color: #fff;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 20px;
}

.lead-magnet-content h3 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.lead-magnet-content p {
    color: var(--global--text-muted);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.inline-newsletter-form {
    display: flex;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
}

.inline-newsletter-form input {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--global--border) !important;
    padding: 16px 24px !important;
    border-radius: 50px !important;
    color: #fff !important;
    outline: none;
    transition: var(--transition-fast);
}

.inline-newsletter-form input:focus {
    border-color: var(--global--secondary-color);
}

.inline-newsletter-form .btn {
    padding: 16px 32px;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
}

.inline-newsletter-form .btn:hover {
    background: var(--global--red-hover) !important;
    transform: scale(1.05);
}

.grid-read {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
}

.grid-read-arrow {
    transition: transform 0.25s ease;
}

.grid-card:hover .grid-read-arrow {
    transform: translateX(4px);
}

/* ==========================================================================
   🔥 ULTRA ANIMACJE I MIKROINTERAKCJE 🔥
   ========================================================================== */

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}

@keyframes pulseRed {
    0% { box-shadow: 0 0 0 0 rgba(219, 13, 21, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(219, 13, 21, 0); }
    100% { box-shadow: 0 0 0 0 rgba(219, 13, 21, 0); }
}

/* Efekt Przelatującego Błysku (Shine) na KARTACH WPISÓW! */
.grid-card {
    position: relative;
}

.grid-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    transition: all 0.75s ease;
    z-index: 10;
    pointer-events: none;
}

.grid-card:hover::before {
    left: 200%;
    transition: all 0.75s ease;
}

.filter-item a:active {
    transform: scale(0.95);
}

@keyframes slowZoom {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

.featured-card__image {
    animation: slowZoom 10s ease-in-out infinite;
}

.featured-card:hover .featured-card__image {
    animation-play-state: paused;
    transform: scale(1.08);
}


/* ==========================================================================
   ANIMACJE 3D DLA FILTROWANIA (KINETIC POP)
   ========================================================================== */
.grid-card {
    will-change: transform, opacity, filter;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    transition: 
        transform 0.4s cubic-bezier(0.25, 1, 0.5, 1),
        opacity 0.35s ease,
        filter 0.35s ease,
        border-color 0.3s ease; /* Dodane z Twojego hovera */
}

.grid-card.is-out {
    opacity: 0;
    transform: scale(0.85) translateZ(-80px) translateY(40px) rotateX(-12deg);
    filter: blur(12px);
    pointer-events: none;
}

.grid-card.is-visible {
    animation: kineticPop 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: calc(var(--stagger, 0) * 65ms);
}

@keyframes kineticPop {
    0% {
        opacity: 0;
        filter: blur(15px);
        transform: scale(0.75) translateZ(100px) translateY(-60px) rotateX(25deg);
    }
    60% {
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        filter: blur(0px);
        transform: scale(1) translateZ(0) translateY(0) rotateX(0deg);
    }
}


/* ==========================================================================
   📱 RESPONSYWNOŚĆ
   ========================================================================== */

/* LAPTOP / SMALL DESKTOP */
@media (max-width: 1200px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    article.grid-card:not(.is-out):first-of-type {
        grid-column: span 2;
    }
}

/* TABLET */
@media (max-width: 900px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    article.grid-card:not(.is-out):first-of-type {
        grid-column: span 1;
    }
    
    .grid-card__title {
        font-size: 1.25rem;
        padding: 24px 24px 16px 24px;
    }
    
    .grid-card__content {
        padding: 20px 24px 24px 24px;
    }

    .grid-card__bottom {
        padding: 18px 24px;
    }

    .lead-magnet-card {
        padding: 32px 24px;
    }
    .lead-magnet-content h3 {
        font-size: 1.8rem;
    }
    .inline-newsletter-form {
        flex-direction: column;
    }
    .inline-newsletter-form .btn {
        width: 100%;
    }
}

/* MOBILE */
@media (max-width: 600px) {
    .blog-grid {
        gap: 20px;
    }
    .grid-card {
        border-radius: 16px;
    }
    
    .grid-card__title {
        font-size: 1.1rem;
        line-height: 1.5;
        padding: 20px 20px 15px 20px;
    }

    .grid-card__content {
        padding: 16px 20px 20px 20px;
    }

    .grid-card__bottom {
        padding: 16px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .grid-card__excerpt {
        font-size: 0.95rem;
    }

    .grid-card__badge {
        top: 14px;
        left: 14px;
        font-size: 0.7rem;
        padding: 5px 10px;
    }

    .lead-magnet-card {
        padding: 24px 20px;
        border-radius: 18px;
    }
    .lead-magnet-content h3 {
        font-size: 1.4rem;
        line-height: 1.3;
    }
    .lead-magnet-content p {
        font-size: 1rem;
    }
    .inline-newsletter-form input {
        padding: 14px 18px;
        font-size: 0.95rem;
    }
    .inline-newsletter-form .btn {
        padding: 14px 20px;
    }

    /* PAGINATION */
        .blog-pagination ul.page-numbers {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap; /* MAGIA: Pozwala zawijać przyciski do nowej linii! */
        gap: 12px;
        list-style: none;
        padding: 0;
        margin: 0;
    }
    .blog-pagination ul.page-numbers li a,
    .blog-pagination ul.page-numbers li span {
        min-width: 42px;
        height: 42px;
        font-size: 0.9rem;
    }
}



/* ==========================================================================
   6. PAGINACJA WP (Wersja z LIST)
   ========================================================================== */
.blog-pagination {
    margin-top: 60px;
}

.blog-pagination ul.page-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-pagination ul.page-numbers li a,
.blog-pagination ul.page-numbers li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    padding: 0 16px;
    border-radius: 12px;
    /* Nowoczesne zaokrąglone kwadraty */
    background: var(--global--bg-card);
    color: var(--global--text-color);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition-fast);
    border: 1px solid var(--global--border);
}

.blog-pagination ul.page-numbers li a:hover {
    border-color: var(--global--secondary-color);
    color: var(--global--secondary-color);
    transform: translateY(-2px);
}

.blog-pagination ul.page-numbers li span.current {
    background: var(--global--secondary-color);
    border-color: var(--global--secondary-color);
    box-shadow: var(--red-glow);
    color: #fff;
}

/* ==========================================================================
   7. BOTTOM CTA
   ========================================================================== */
.blog-cta {
    margin-top: 100px;
}

.cta-wrapper {
    background: var(--global--bg-card);
    border: 1px solid var(--global--border);
    border-radius: 24px;
    padding: 80px 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    position: relative;
    overflow: hidden;
}

.cta-wrapper.shadow-red {
    box-shadow: 0 20px 80px rgba(219, 13, 21, 0.1);
    border-color: rgba(219, 13, 21, 0.2);
}

.cta-content h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.1;
}

.cta-content p {
    color: var(--global--text-muted);
    font-size: 1.2rem;
    max-width: 550px;
}

.cta-actions {
    display: flex;
    gap: 20px;
    flex-shrink: 0;
}

.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 18px 36px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.btn-primary {
    color: #fff !important;
    box-shadow: var(--red-glow);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: var(--red-glow-strong);
}

.btn-secondary {
    background: transparent;
    color: var(--global--text-color);
    border: 1px solid var(--global--border);
}

.btn-secondary:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   8. MEDIA QUERIES (RESPONSYWNOŚĆ)
   ========================================================================== */
@media (max-width: 1024px) {
    .featured-card {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .cta-wrapper {
        flex-direction: column;
        text-align: center;
        padding: 60px 40px;
    }

    .cta-content p {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .knowledge-hub {
                padding-bottom: 60px;
    }

    .blog-hero__search {
        max-width: 100%;
    }

    .search-input-wrapper {
        flex-direction: column;
        border-radius: 20px;
        padding: 12px;
        background: var(--global--bg-card);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 20px;
    }

    .search-field {
        padding: 16px;
        margin-bottom: 10px;
    }

    .search-submit {
        max-width: 50%;
        max-height: 50%;
        /* width: 100%; */
    }

    .grid-card__title {
        font-size: 1.2rem;
    }

    .lead-magnet-card {
        padding: 30px 20px;
    }

    .inline-newsletter-form {
        flex-direction: column;
    }

    .cta-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }

    /* Zmniejszenie paddingów wewnątrz kart na telefonach */
    .grid-card__title {
        padding: 20px 20px 15px 20px;
    }
    
    .grid-card__content {
        padding: 15px 20px 20px 20px;
    }
    
    .grid-card__bottom {
        padding: 15px 20px;
        flex-direction: column; /* Układamy datę i przycisk czytaj więcej pod sobą */
        align-items: flex-start;
        gap: 15px;
    }
}

/* TABLETY I MAŁE LAPTOPY */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr); /* Zmiana na 2 kolumny */
    }
}

/* SMARTFONY */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr; /* Zmiana na 1 kolumnę na telefonach */
    }
    
    /* Wyłączamy rozciąganie pierwszego dużego wpisu */
    article.grid-card:not(.is-out):first-of-type {
        grid-column: span 1;
    }
    
    article.grid-card:not(.is-out):first-of-type .grid-card__image-wrapper {
        max-height: 250px; /* Zmniejszamy wysokość obrazka pierwszego wpisu na mobile */
    }
}

