.homepage-container {
    width: 100%;
    max-width: 1320px;
    margin-top: 0;
    padding: 0;
    box-sizing: border-box;
}

.homepage-layout {
    display: flex;
    gap: 20px;
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Kolumna główna */
.homepage-main {
    flex: 0 0 863px;
    width: 863px;
    max-width: 863px;
}

.featured-article-large .dynamic-image-container {
    width: 100%;
    max-width: 863px;
}

.date-name-bar {
    margin-bottom: 5px;
    color: var(--light-text);
    font-size: 0.75rem;
	max-width: 863px;
	height: 21px;
    line-height: 21px;
}

.date-name-bar small {
	font-size: 0.9rem;
    display: inline-block;
    line-height: 21px !important;
}

/* Kolumna boczna */
.homepage-sidebar {
    flex: 0 0 420px;
    width: 420px;
    max-width: 420px;
    position: sticky;
    top: 70px;
    align-self: flex-start;
    height: fit-content;
}

/* Style dla bloku wydarzeń w sidebarze */
.sidebar-heading {
    font-size: 1.25rem;
    margin: 0;
    padding: 12px 15px;
    font-weight: 700;
    color: #1B365D;
    background-color: #f5f7fa;
    border-bottom: 2px solid #e0e0e0;
}

/* ----- WYRÓŻNIONY ARTYKUŁ ----- */
.featured-article-large {
    width: 100%;
    position: relative;
    margin: 0 0 10px 0;
}

.featured-article-large img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.featured-article-large h2 {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    color: var(--white);
    font-size: 1.5rem;
    line-height: 1.3;
    font-weight: 700;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

.featured-article-large a {
    color: var(--white);
    text-decoration: none;
    display: block;
}

.featured-article-large a:hover {
    opacity: 0.95;
}

/* ----- SIATKA ARTYKUŁÓW ----- */
.latest-articles-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Pojedynczy artykuł w siatce */
.article-thumbnail {
    width: calc((100% - 40px) / 3);
    position: relative;
}

.article-thumbnail img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.article-thumbnail a:hover img {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.article-thumbnail h3 {
    font-size: 1.2rem;
    margin: 6px 0 10px 0;
    line-height: 1.3;
    font-weight: 600;
	word-break: break-word;
}

.article-thumbnail a {
    color: var(--text-color);
    text-decoration: none;
    display: block;
}

.article-thumbnail a:hover h3 {
    color: var(--primary-color);
}

/* ----- SIDEBAR ----- */
.sidebar-section {
    background-color: var(--background-color);
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.sidebar-heading {
    font-size: 1.25rem;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
    color: var(--primary-color);
	text-align: center;
}

/* ===== ZUNIFIKOWANE STYLE DLA WSZYSTKICH BLOKÓW KATEGORII (2-10) ===== */
/* Zastępuje zduplikowane style dla: secondary, tertiary, quaternary, quinary, 
   senary, septenary, octonary, novenary, denary */

.category-block-container {
    width: 100%;
    margin: 30px 0;
    padding: 25px 0;
}

.category-block-header {
    padding: 0 20px 20px;
    position: relative;
}

.category-block-title {
    font-size: 1.6rem;
    margin: 0;
    font-weight: 700;
    color: #1B365D;
    text-align: center;
}

.category-block-articles {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 0 20px;
}

.category-articles-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.category-articles-row-3 .category-article-item {
    width: calc((100% - 40px) / 3);
}

.category-articles-row-4 .category-article-item {
    width: calc((100% - 60px) / 4);
}

.category-article-item {
    text-align: left;
}

.category-article-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-article-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.category-article-link:hover .category-article-image {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.category-article-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    margin: 12px 0 0;
    color: #333;
}

.category-article-link:hover .category-article-title {
    color: #D64045;
    text-decoration: underline;
}

.category-block-footer {
    margin-top: 20px;
    text-align: center;
}

/* Responsywność dla zunifikowanych bloków kategorii */
@media (max-width: 1024px) {
    .category-articles-row {
        flex-wrap: wrap;
        gap: 20px;
    }

    .category-articles-row-3 .category-article-item,
    .category-articles-row-4 .category-article-item {
        width: calc((100% - 40px) / 3);
    }

    .category-block-title {
        font-size: 1.4rem;
    }

    .category-articles-row-4 .category-article-item:nth-child(4) {
        display: none;
    }
}

@media (max-width: 768px) {
    .category-articles-row-3 .category-article-item,
    .category-articles-row-4 .category-article-item {
        width: calc((100% - 20px) / 2);
    }

    .category-articles-row-3 .category-article-item:nth-child(3) {
        display: none;
    }
}

@media (max-width: 480px) {
    .category-articles-row {
        flex-direction: column;
        gap: 25px;
    }

    .category-articles-row-3 .category-article-item,
    .category-articles-row-4 .category-article-item {
        width: 100%;
    }

    .category-articles-row-3 .category-article-item:nth-child(n+3),
    .category-articles-row-4 .category-article-item:nth-child(n+3) {
        display: none;
    }

    .category-article-title {
        font-size: 18px;
    }
}

/* ----- LINK "ZOBACZ WSZYSTKIE" ----- */
.view-all-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: #1B365D;
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background-color 0.3s ease;
}

.view-all-link:hover {
    background-color: #2E4A78;
    text-decoration: none;
}

/* Cała siatka jako jeden kontener flex */
.articles-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.articles-grid .article-thumbnail {
    width: calc((100% - 40px) / 3);
}

/* ----- LINK "ZOBACZ WIĘCEJ" (SIATKA) ----- */
.articles-more-container {
    width: 100%;
    text-align: center;
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.articles-more-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.articles-more-link:hover {
    background-color: var(--highlight-bg);
    text-decoration: underline;
}

.articles-more-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Artykuł sponsorowany */
.article-thumbnail.sponsored-article {
    position: relative;
    border: 1px solid #FFD700;
    border-radius: 8px;
    padding: 4px;
    background-color: #FFFEF5;
}

.sponsored-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: rgba(255, 215, 0, 0.5);
    color: #FFF;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 9px;
	letter-spacing: 0.5px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.article-thumbnail.sponsored-article img {
    border-radius: 4px;
}

/* Responsywność dla artykułu sponsorowanego */
@media (max-width: 768px) {
    .sponsored-badge {
        font-size: 10px;
        padding: 3px 6px;
    }
}

@media (max-width: 480px) {
    .sponsored-badge {
        font-size: 9px;
        padding: 2px 5px;
        top: 5px;
        right: 5px;
    }
}

/* ----- MODUŁ RAPORT MIESZKAŃCA ----- */
.citizen-report-module {
    margin-bottom: 25px;
    background: linear-gradient(to right, #1B365D, #2E4A78);
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

.citizen-report-heading {
    background-color: rgba(0,0,0,0.2);
    color: #FFF;
    padding: 12px 15px;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: relative;
}

.live-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #D64045;
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
    top: -1px;
    animation: pulse 1.5s infinite;
    box-shadow: 0 0 0 rgba(214, 64, 69, 0.4);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(214, 64, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(214, 64, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(214, 64, 69, 0);
    }
}

.citizen-report-container {
    padding: 12px 15px;
    background-color: rgba(0,0,0,0.05);
}

.citizen-report-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.citizen-report-item {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: flex-start;
}

.citizen-report-item:last-child {
    border-bottom: none;
}

.citizen-report-time {
    background-color: #D64045;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 4px;
    margin-right: 10px;
    min-width: 45px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.citizen-report-content {
    color: #FFF;
    font-size: 0.95rem;
    line-height: 1.4;
    flex: 1;
	white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

a.citizen-report-content {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #FFF;
    text-decoration: none;
}

a.citizen-report-content:hover {
    text-decoration: underline;
}

.citizen-report-footer {
    padding: 10px 15px;
    text-align: right;
    background-color: rgba(0,0,0,0.1);
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.citizen-report-link {
    color: #FFF;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
}

.citizen-report-link:hover {
    color: #FFD700;
    text-decoration: underline;
}

.citizen-report-add-link {
    color: #4CAF50;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
}

.citizen-report-add-link:hover {
    color: #8BC34A;
    text-decoration: underline;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .citizen-report-item {
        padding: 8px 0;
    }
    
    .citizen-report-time {
        font-size: 0.8rem;
        padding: 3px 6px;
    }
    
    .citizen-report-content {
        font-size: 0.9rem;
    }
}

/* ----- RESPONSYWNOŚĆ DLA RAPORTU MIESZKAŃCA ----- */
/* Domyślnie ukryj wersję mobilną */
.citizen-report-mobile-only {
    display: none;
}

/* Na desktopie pokazuj tylko wersję w sidebarze */
.citizen-report-desktop-only {
    display: block;
}



/* ----- RESPONSYWNOŚĆ ----- */
/* Tablet landscape i mniejsze */
@media (max-width: 1024px) {
    .homepage-layout {
        flex-direction: column;
    }
    
    .homepage-main, 
    .homepage-sidebar {
        width: 100%;
        max-width: 100%;
    }
    
    /* Wyłącz sticky na mniejszych ekranach */
    .homepage-sidebar {
        position: relative !important;
        top: auto !important;
    }
    
    .sidebar-section {
        margin: 0;
    }
}

/* Tablet portrait */
@media (max-width: 768px) {
    .article-thumbnail, 
    .articles-grid .article-thumbnail {
        width: calc((100% - 20px) / 2); /* Dla dwóch artykułów w wierszu */
    }
    
    .featured-article-large h2 {
        font-size: 1.25rem;
    }
}

/* Mobile landscape */
@media (max-width: 576px) {
    .featured-articles-container {
        padding: 0 5px;
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    .article-thumbnail,
    .articles-grid .article-thumbnail {
        width: 100%;
    }
    
    .articles-row {
        gap: 20px;
    }
    
    .featured-article-large h2 {
        font-size: 1.125rem;
        padding: 10px;
    }
    
    .featured-articles-container {
        padding: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

@supports not (backdrop-filter: blur(5px)) {
    .featured-article-large h2 {
        background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0));
    }
}

/* ----- MODUŁ NAJBLIŻSZE WYDARZENIA ----- */
.upcoming-events-module {
    margin-bottom: 25px;
    background: #FFFFFF;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.upcoming-events-heading {
    background-color: #f5f7fa;
    color: #1B365D;
    padding: 12px 15px;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    border-bottom: 2px solid #e0e0e0;
    position: relative;
}

.upcoming-events-container {
    padding: 15px;
    background-color: #FFFFFF;
}

.upcoming-events-empty {
    padding: 30px 15px;
    text-align: center;
}

.upcoming-events-no-content {
    color: #666666;
    font-style: italic;
    margin: 0;
}

.upcoming-events-day {
    margin-bottom: 15px;
    padding: 0;
}

.upcoming-events-day:last-child {
    margin-bottom: 0;
}

.upcoming-events-day-heading {
    font-size: 15px;
    font-weight: 600;
    color: #D64045;
    padding: 10px 0;
    margin: 0 0 8px 0;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
}

.upcoming-events-day-heading:after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: #D64045;
}

.upcoming-events-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.upcoming-event-item {
    margin-bottom: 12px;
    border-radius: 6px;
}

.upcoming-event-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333333;
    padding: 8px 0;
    border-radius: 6px;
}

.upcoming-event-link:hover {
    background-color: #f9f9f9;
}

.upcoming-event-image {
    width: 50px;
    height: 50px;
    overflow: hidden;
    border-radius: 8px;
    margin-right: 12px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    background-color: #f0f0f0;
}

.upcoming-event-image img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background-color: transparent;
}

.upcoming-event-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f5f5f5;
}

.upcoming-event-details {
    flex-grow: 1;
    overflow: hidden;
}

.upcoming-event-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #1B365D;
    margin-bottom: 5px;
}

.upcoming-event-link:hover .upcoming-event-title {
    color: #D64045;
    text-decoration: underline;
}

.upcoming-event-time {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    color: #666666;
    background-color: #f5f5f5;
    border-radius: 4px;
    padding: 2px 8px;
}

.upcoming-event-time:before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 4px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23D64045' d='M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120v136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.upcoming-events-footer {
    text-align: center;
    margin: 0;
    padding: 12px 15px;
    background-color: #f5f7fa;
    border-top: 1px solid #e0e0e0;
}

.upcoming-events-all-link {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    color: #D64045;
    text-decoration: none;
    padding: 8px 16px;
}

.upcoming-events-all-link:hover {
    color: #1B365D;
    text-decoration: underline;
}

/* Responsywność dla modułu wydarzeń */
@media (max-width: 768px) {
    .upcoming-event-item {
        padding: 6px;
    }
    
    .upcoming-event-time {
        font-size: 11px;
        padding: 2px 6px;
    }
    
    .upcoming-event-title {
        font-size: 13px;
    }
}

/* ----- OGŁOSZENIA PREMIUM W SIDEBARZE ----- */
.classifieds-sidebar {
    margin-bottom: 25px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.classifieds-sidebar .sidebar-heading {
    font-size: 1.25rem;
    margin: 0;
    padding: 12px 15px;
    font-weight: 700;
    color: #333; /* Ciemny kolor tekstu */
    border-bottom: 2px solid #e5d9c3;
}

.premium-classifieds-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px 0;
}

.premium-classified-item {
    display: flex;
    align-items: flex-start;
    text-decoration: none;
    color: #333333;
    padding: 12px;
    border-radius: 8px;
    background-color: #f9f9f9;
    border: 1px solid #e5e5e5;
}

.premium-classified-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-color: #e5d9c3;
    background-color: #fffdf8;
}

.premium-classified-image {
    width: 100px;
    height: 80px;
    overflow: hidden;
    border-radius: 6px;
    margin-right: 12px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background-color: #f0f0f0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.premium-classified-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.classified-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: #f0f0f0;
}

.classified-no-image svg {
    width: 40px;
    height: 40px;
    opacity: 0.3;
}

.premium-classified-details {
    flex-grow: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.premium-classified-category {
    display: block;
    font-size: 11px;
    font-weight: 480;
    line-height: 1.2;
    color: #666;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background-color: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
}

.premium-classified-title {
    display: block;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-top: 3px;
}

.premium-classified-item:hover .premium-classified-title {
    color: #D4862B;
    text-decoration: underline;
}

.premium-classified-price {
    display: block;
    font-size: 12px;
    color: #D4862B; /* Pomarańczowy/brązowy kolor dla ceny */
    margin-top: 5px;
    line-height: 1;
}

.sidebar-classifieds-footer {
    text-align: center;
    margin: 0;
    padding: 12px 15px;
    background-color: #f8f3e9; /* Taki sam jak w nagłówku */
    border-top: 1px solid #e5d9c3; /* Taki sam jak obramowanie nagłówka */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.all-classifieds-link {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    color: #2E8B57;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
}

.all-classifieds-link:hover {
    color: #216341;
    text-decoration: underline;
}

.add-classified-link {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    color: #2E8B57;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
}

.add-classified-link:hover {
    text-decoration: underline;
}

.add-first-classified {
    text-align: center;
    padding: 0 10px 20px;
    color: #2E8B57;
    font-weight: 500;
    font-size: 14px;
    background-color: #f9f9f9;
}

.all-classifieds-link, .add-classified-link {
    color: #D4862B; /* Spójny kolor dla linków */
}

.all-classifieds-link:hover, .add-classified-link:hover {
    color: #b36d20; /* Ciemniejszy odcień przy najechaniu */
    text-decoration: underline;
}

/* ----- GAZETKI PROMOCYJNE ----- */
.promotional-magazines-container {
    width: 100%;
    background-color: #f8f8f8;
    padding: 25px 0;
    margin: 20px 0;
    overflow: hidden;
    text-align: center;
}

.promotional-magazines-header {
    padding: 0 20px 20px;
    position: relative;
}

.magazines-title {
    font-size: 1.6rem;
    margin: 0;
    font-weight: 700;
    color: #1B365D;
    text-align: center;
}

.promotional-magazines-slider {
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.magazine-item {
    width: calc((100% - 75px) / 6); /* 6 elementów z odstępem 15px */
    text-align: center;
}

.magazine-cover {
    position: relative;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    margin-bottom: 10px;
    overflow: hidden;
    background-color: #ffffff;
    height: 0;
    padding-bottom: 141%; /* Proporcje 180:254 */
}

.magazine-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.magazine-title {
    font-size: 14px;
    font-weight: 600;
    margin: 10px 0 0;
    color: #333;
    line-height: 1.3;
    text-align: center;
}

.magazine-link {
    color: inherit;
    text-decoration: none;
    display: block;
}

.magazine-link:hover .magazine-title {
    color: #1B365D;
}

.view-all-magazines {
    font-size: 14px;
    font-weight: 500;
    color: #1B365D;
    text-decoration: none;
    display: inline-block;
    margin: 5px auto 0;
}

.view-all-magazines:hover {
    text-decoration: underline;
}

/* Responsywność */
@media (max-width: 1024px) {
    .magazine-item {
        width: calc((100% - 60px) / 5); /* 5 elementów */
    }
    
    .magazine-item:nth-child(6) {
        display: none;
    }
}

@media (max-width: 768px) {
    .magazine-item {
        width: calc((100% - 45px) / 4); /* 4 elementy */
    }
    
    .magazine-item:nth-child(5) {
        display: none;
    }
    
    .magazines-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 576px) {
    .magazine-item {
        width: calc((100% - 30px) / 3); /* 3 elementy */
    }
    
    .magazine-item:nth-child(4) {
        display: none;
    }
    
    .magazine-title {
        font-size: 13px;
    }
}

/* Styles for Random Galleries block */
.random-galleries-container {
    width: 100%;
    margin: 30px 0;
    padding: 25px 0;
    background-color: #f2f7ff;
    border-radius: 8px;
}

.random-galleries-header {
    padding: 0 20px 20px;
    position: relative;
}

.random-galleries-title {
    font-size: 1.6rem;
    margin: 0;
    font-weight: 700;
    color: #1B365D;
    text-align: center;
}

.random-galleries-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 0 20px;
}

.gallery-item {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.gallery-link {
    color: inherit;
    text-decoration: none;
    display: block;
}

.gallery-thumbnail {
    position: relative;
    overflow: hidden;
}

.gallery-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-thumbnail img {
    transform: scale(1.05);
}

.gallery-placeholder {
    height: 173px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e9ecef;
}

.gallery-placeholder svg {
    width: 48px;
    height: 48px;
    fill: #adb5bd;
}

.gallery-title {
    padding: 15px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.gallery-link:hover .gallery-title {
    color: #D64045;
}

.random-galleries-footer {
    margin-top: 20px;
    text-align: center;
}

@media (max-width: 480px) {
    .magazine-item {
        width: calc((100% - 15px) / 2); /* 2 elementy */
    }
    
    .magazine-item:nth-child(3) {
        display: none;
    }
}

.citizen-report-mobile-only {
    display: none;
}

.citizen-report-desktop-only {
    display: block;
}

@media (max-width: 1024px) {
    /* Ukryj wersję desktopową w sidebarze */
    .citizen-report-desktop-only {
        display: none;
    }
    
    /* Pokaż wersję mobilną pod dużym artykułem */
    .citizen-report-mobile-only {
        display: block;
        width: 100%;
    }
    
    /* Dostosuj style modułu na mobile */
    .citizen-report-mobile-only .citizen-report-module {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
    }
}
