/* Globalne style */
html, body {
    font-family: Open Sans, sans-serif !important;
    line-height: 1.45; /* 145% */
}

/* Globalne style dla nagłówków */
h1, h2, h3, h4, h5, h6 {
    color: #172C57;
}

h3 {
    /* font-family: Open Sans; - usuwamy tę linię */
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Hero Section */
.hero-section {
    margin-bottom: 40px;
}

.hero-post {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.hero-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.hero-content {
    padding: 20px;
}

.hero-content h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

/* Separator między blokami kategorii */
.categories-separator {
    grid-column: 1 / -1;
    height: 1px;
    background: #e0e0e0;
    margin: 20px 0;
}

.category-box {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    min-height: 500px;
    position: relative;
    padding-bottom: 70px;
    transition: box-shadow 0.2s ease-in-out;
}

.category-box:hover {
    box-shadow: 0 4px 12px rgba(23, 44, 87, 0.12);
}

.category-header {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(23, 44, 87, 0.12);
    padding-bottom: 10px;
}

.category-header h2 {
    font-size: 1.4em;
    color: #172c57;
    margin: 0;
}

/* Featured post w kategorii */
.category-featured-post {
    margin-bottom: 15px;
}

.category-featured-post .post-thumbnail {
    margin-bottom: 15px;
}

.category-featured-post .post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
}

.category-featured-post h3 {
    font-size: 18px;
    line-height: 1.45;
    margin: 10px 0;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Małe posty w kategorii */
.category-small-post {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(23, 44, 87, 0.12);
    height: 100px;
    box-sizing: border-box;
}

.category-small-post:last-of-type {
    border-bottom: none;
    margin-bottom: 15px;
}

.category-small-post .post-thumbnail {
    flex: 0 0 80px;
    height: 80px;
}

.category-small-post .post-thumbnail img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.category-small-post .post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.category-small-post h3 {
    font-size: 14px;
    line-height: 1.45;
    margin: 0 0 5px 0;
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-small-post .post-meta {
    font-size: 0.85em;
}

/* Przycisk Zobacz wszystkie */
.view-all, 
.search-submit,
.button {
    font-family: 'Open Sans', sans-serif !important;
    font-weight: 600;
    display: inline-block;
    padding: 12px 24px;
    background: #0C61D9;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
    text-align: center;
    line-height: 1.4;
}

.view-all:hover, 
.search-submit:hover,
.button:hover {
    background: #0C61D9;
    color: #fff;
    text-decoration: none;
}

/* Specjalne style dla przycisku wyszukiwania */
.search-submit {
    padding: 8px;
    border-radius: 50%;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

/* Latest Posts Section */
.latest-posts {
    margin-bottom: 50px;
}

.section-title {
    font-size: 24px;
    color: #172c57;
    margin-bottom: 30px;
    text-align: center;
}

.latest-posts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

.post-card.featured {
    grid-column: 1;
    grid-row: 1;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: none;
    display: block;
    transition: box-shadow 0.2s ease-in-out;
}

.post-card.featured:hover {
    box-shadow: 0 4px 12px rgba(23, 44, 87, 0.12);
}

.post-card.featured .post-thumbnail img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.post-card.featured .post-content {
    padding: 20px;
}

.post-card.featured h3 {
    font-size: 24px;
    line-height: 1.4;
    margin-bottom: 15px;
    font-family: Museo, sans-serif !important;
    color: #172c57;
}

.post-card.featured .post-excerpt {
    font-size: 16px;
    color: rgba(23, 44, 87, 0.87);
    margin-bottom: 15px;
    line-height: 1.5;
}

.post-card.featured .post-meta {
    font-size: 14px;
    color: rgba(23, 44, 87, 0.6);
}

.post-card.small {
    padding: 12px 10px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-bottom: 1px solid rgba(23, 44, 87, 0.12);
}

.post-card.small:last-child {
    border-bottom: none;
}

.post-card.small .post-thumbnail {
    flex: 0 0 100px;
}

.post-card.small .post-thumbnail img {
    width: 100px;
    height: 75px;
    object-fit: cover;
    border-radius: 4px;
}

.post-card.small h3 {
    font-family: Museo, sans-serif !important;
    font-size: 15px;
    line-height: 1.45;
    margin: 0 0 3px 0;
    color: #172c57;
}

.post-card.small .post-meta {
    font-size: 12px;
    color: rgba(23, 44, 87, 0.6);
}

/* Responsywność - wszystkie media queries w jednym miejscu */
@media (max-width: 992px) {
    .featured-posts .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sticky-post.widget-container {
        grid-column: 1 / -1;
        margin: 0;
    }
}

@media (max-width: 768px) {
    .post-card.featured {
        display: none;
    }

    .mobile-featured-post {
        display: block;
        margin-bottom: 30px;
        background: #fff;
        border-radius: 8px;
        overflow: hidden;
    }

    .mobile-featured-post .post-thumbnail img {
        width: 100%;
        height: 250px;
        object-fit: cover;
    }

    .mobile-featured-post .post-content {
        padding: 20px;
    }

    .mobile-featured-post h3 {
        font-size: 18px;
        line-height: 1.45;
        margin-bottom: 10px;
    }

    .mobile-featured-post h3 a {
        color: #172C57;
        text-decoration: none;
        font-family: 'Open Sans', sans-serif !important;
    }

    /* Rozszerzamy sidebar na pełną szerokość */
    .latest-posts-grid {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }

    .sidebar-content {
        order: -1;
        grid-column: 1 / -1;
        width: 100%;
        margin-bottom: 0;
    }
}

@media (max-width: 576px) {
    .featured-posts {
        margin: 30px 0;
    }

    .featured-posts .posts-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .post-card.featured h3 {
        font-size: 22px;
    }

    .sticky-post.widget-container {
        padding: 0;
        margin: 0;
    }
}

/* reszta stylów bez zmian */

@media (max-width: 992px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .category-posts {
        grid-template-columns: 1fr;
    }
    
    .hero-image img {
        height: 300px;
    }
}

/* Sekcja przypiętych postów */
.featured-posts {
    margin: 50px 0;
}

.featured-posts .posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.sticky-post {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: none;
    transition: transform 0.2s;
    height: 100%;
}

.sticky-post:hover {
    transform: translateY(-5px);
}

.sticky-post .post-thumbnail img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    object-position: center;
    border-radius: 4px 4px 0 0;
}

.sticky-post .post-content {
    padding: 20px;
}

.sticky-post h3 {
    font-size: 18px;
    margin-bottom: 10px;
    line-height: 1.45;
}

.sticky-post .post-excerpt {
    font-size: 1em;
    color: #666;
    margin-bottom: 15px;
}

@media (max-width: 992px) {
    .featured-posts .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .featured-posts .posts-grid {
        grid-template-columns: 1fr;
    }
}

/* Wyszukiwarka */
.search-form {
    width: 100%;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(23, 44, 87, 0.05);
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    height: 40px;
    padding: 0 40px 0 16px;
    border: 1px solid #E5E9F2;
    border-radius: 4px;
    font-size: 14px;
    color: #172c57;
    background: #fff;
    outline: none;
}

.search-input::placeholder {
    color: #8E9AAE;
}

.search-form .search-submit {
    width: 16%;
    height: 40px;
    position: absolute;
    right: 0;
    top: 20px;
    background: #0C61D9;
    border: none;
    border-radius: 0 4px 4px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Open Sans', sans-serif !important;
    font-weight: 600;
}

.search-submit svg {
    width: 16px;
    height: 16px;
    color: #fff;
}

.search-submit:hover {
    background: #0C61D9;
}

/* Modyfikacja siatki */
.latest-posts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

.sidebar-content {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Wyszukiwarka w sidebarze */
.sidebar-content .blog-search {
    margin-bottom: 10px;
}

.sidebar-content .search-wrapper {
    max-width: 100%;
}

.sidebar-content .search-input {
    padding: 12px 40px 12px 15px;
    font-size: 14px;
}

/* Responsywność */
@media (max-width: 768px) {
    .sidebar-content {
        order: -1; /* Wyszukiwarka na górze na mobile */
    }
}

/* Widget Lendi */
.sticky-post.widget-container {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.sticky-post.widget-container:hover {
    box-shadow: none;
    background: transparent;
}

/* Ukrycie stopki widgetu Lendi */
.widget-container p,
.sticky-post.widget-container .lendi-widget p,
.sticky-post.widget-container .lendi-widget [style*="font-size: 12px"] {
    display: none !important;
}

/* Responsywność */
@media (max-width: 992px) {
    .featured-posts .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .sticky-post.widget-container {
        grid-column: 1 / -1;
        margin: 0; /* Usuwamy margines */
    }
}

@media (max-width: 576px) {
    .featured-posts .posts-grid {
        grid-template-columns: 1fr;
        gap: 20px; /* Zmniejszamy odstęp na mobile */
    }
    
    .featured-posts {
        margin: 30px 0; /* Zmniejszamy marginesy sekcji na mobile */
    }
    
    .sticky-post.widget-container {
        margin: 0;
        padding: 0;
    }
}

/* Style dla przycisku "Zobacz wszystkie" */
.view-all {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    text-align: center;
    margin-top: auto;
}

/* Kontener na posty w kategorii */
.category-posts-container {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
}

/* Aktualizujemy style dla konkretnych nagłówków */
.post-card.featured h3,
.post-card.small h3,
.category-featured-post h3,
.category-small-post h3 {
    font-family: Museo, sans-serif !important;
    color: #172c57;
}

.category-header h2 {
    font-size: 1.4em;
    color: #172c57;
    margin: 0;
}

.section-title {
    font-size: 24px;
    color: #172c57;
    margin-bottom: 30px;
    text-align: center;
}

/* Style dla linków w artykułach */
.post-card h3 a,
.category-featured-post h3 a,
.category-small-post h3 a,
.sticky-post h3 a {
    font-family: 'Open Sans', sans-serif !important;
    color: #172C57;
    text-decoration: none;
}

/* Nagłówki pozostają na Museo */
.post-card h3,
.category-featured-post h3,
.category-small-post h3,
.sticky-post h3,
.category-header h2,
.section-title {
    font-family: Museo, sans-serif !important;
}

/* Usuwamy style hover */
.post-card h3 a:hover,
.category-featured-post h3 a:hover,
.category-small-post h3 a:hover,
.sticky-post h3 a:hover {
    color: #172C57;
}

/* Style dla pierwszego artykułu w kategorii */
.category-featured-post h3 {
    font-size: 18px;
    line-height: 1.45;
    margin: 10px 0;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Zachowujemy normalne styles dla pozostałych artykułów */
.category-small-post h3 {
    font-size: 14px;
    line-height: 1.45;
    margin: 0 0 5px 0;
    font-weight: 400;
}

/* Usuwamy nadmiarowe deklaracje koloru */
.post-card.featured h3,
.post-card.small h3,
.sticky-post h3 {
    color: inherit;
}

/* Usuwamy poprzednie dekoracyjne style */
.category-featured-post h3::after {
    display: none;
}

/* Aktualizacja wag dla konkretnych nagłówków */
.category-header h2,
.section-title,
.post-card.featured h3,
.sticky-post h3 {
    font-family: Museo, sans-serif !important;
    font-weight: 500;
}

/* Zachowujemy mniejszą wagę dla małych postów */
.category-small-post h3 {
    font-weight: 400;
}

/* Zachowujemy Open Sans dla linków */
.post-card h3 a,
.category-featured-post h3 a,
.category-small-post h3 a,
.sticky-post h3 a {
    font-family: 'Open Sans', sans-serif !important;
}

/* Nagłówki */
.post-card.featured h3,
.sticky-post h3 {
    line-height: 1.4;
}

/* Treść */
.post-excerpt {
    line-height: 1.5;
}

.post-card.featured .post-excerpt {
    line-height: 1.45;
}

/* Style dla post-meta */
.post-meta,
.post-card.featured .post-meta,
.post-card.small .post-meta,
.category-small-post .post-meta {
    font-size: 14px;
    color: #172C57;
}

/* Usuwamy stare style z opacity */
.post-card.featured .post-meta {
    /* color: rgba(23, 44, 87, 0.6); - usuwamy */
}

.post-card.small .post-meta {
    /* color: rgba(23, 44, 87, 0.6); - usuwamy */
}

.category-small-post .post-meta {
    /* font-size: 0.85em; - usuwamy */
}

/* Nagłówki sekcji i kategorii - tylko te są na Museo */
.section-title,
.category-header h2 {
    font-family: Museo, sans-serif !important;
    font-weight: 700;
    color: #172C57;
}

/* Wszystkie linki do artykułów i teksty na Open Sans */
.post-card h3,
.category-featured-post h3,
.category-small-post h3,
.sticky-post h3,
.post-card h3 a,
.category-featured-post h3 a,
.category-small-post h3 a,
.sticky-post h3 a {
    font-family: 'Open Sans', sans-serif !important;
    color: #172C57;
    text-decoration: none;
}

/* Usuwamy poprzednie deklaracje czcionek */
h1, h2, h3, h4, h5, h6 {
    /* font-family: Museo, sans-serif !important; - usuwamy */
    color: #172C57;
}

/* Zachowujemy pozostałe style dla linków */
.post-card h3 a,
.category-featured-post h3 a,
.category-small-post h3 a,
.sticky-post h3 a {
    text-decoration: none;
}

/* Tylko nagłówki sekcji i kategorii na Museo 700 */
.section-title,
.category-header h2 {
    font-family: Museo, sans-serif !important;
    font-weight: 700;
    color: #172C57;
}

/* Usuwamy wszystkie pozostałe deklaracje czcionek */
h1, h2, h3, h4, h5, h6 {
    color: #172C57;
}

/* Style dla linków na zdjęciach */
.post-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
}

.post-thumbnail a img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Domyślnie ukrywamy mobile-featured-post */
.mobile-featured-post {
    display: none;
}

@media (max-width: 768px) {
    .post-card.featured {
        display: none;
    }

    .mobile-featured-post {
        display: block;
        margin-bottom: 30px;
        background: #fff;
        border-radius: 8px;
        overflow: hidden;
    }

    .mobile-featured-post .post-thumbnail img {
        width: 100%;
        height: 250px;
        object-fit: cover;
    }

    .mobile-featured-post .post-content {
        padding: 20px;
    }

    .mobile-featured-post h3 {
        font-size: 18px;
        line-height: 1.45;
        margin-bottom: 10px;
    }

    .mobile-featured-post h3 a {
        color: #172C57;
        text-decoration: none;
        font-family: 'Open Sans', sans-serif !important;
    }

    /* Rozszerzamy sidebar na pełną szerokość */
    .latest-posts-grid {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }

    .sidebar-content {
        order: -1;
        grid-column: 1 / -1;
        width: 100%;
        margin-bottom: 0;
    }
}

/* Style dla kart z borderem */
.post-card.featured,
.sticky-post,
.category-box,
.mobile-featured-post {
    border-width: 1px;
    border-color: #172C571F;
    border-style: solid;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

/* Wyjątek dla widget-container */
.sticky-post.widget-container {
    border: none;
    background: transparent;
}
