/* P24 Full-Width Gallery + AdSense (port z theme pogorze24 v1.3.6) */

.p24-fwg-gallery {
    margin: 32px 0 0;
    display: block;
    width: 100%;
}

.p24-fwg-item {
    width: 100%;
    margin: 0 0 20px;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f6f8;
    position: relative;
}

.p24-fwg-item img {
    width: 100%;
    height: auto;
    display: block;
    cursor: zoom-in;
}

.p24-fwg-ad {
    margin: 18px 0;
    text-align: center;
}

.p24-fwg-ad ins.adsbygoogle {
    display: block !important;
    width: 100% !important;
    min-height: 280px;
}

.p24-fwg-ad-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
}

/* Loader spinner */
.p24-fwg-loader {
    text-align: center;
    padding: 40px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 80px;
}

.p24-fwg-loader-spinner {
    display: inline-block;
    width: 42px;
    height: 42px;
    border: 4px solid rgba(139, 184, 56, 0.18);
    border-top-color: #8bb838;
    border-right-color: #f5a623;
    border-radius: 50%;
    animation: p24fwgspin 0.9s linear infinite;
}

@keyframes p24fwgspin {
    to { transform: rotate(360deg); }
}

/* Skeleton dla ładujących się zdjęć */
.p24-fwg-item.p24-fwg-img-loading {
    min-height: 280px;
    overflow: hidden;
}

.p24-fwg-item.p24-fwg-img-loading::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: #eef0f3;
    background-image: linear-gradient(
        90deg,
        #eef0f3 0%,
        #f6f7f9 40%,
        #ffffff 50%,
        #f6f7f9 60%,
        #eef0f3 100%
    );
    background-size: 200% 100%;
    animation: p24fwgshimmer 1.4s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

.p24-fwg-item.p24-fwg-img-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    border: 4px solid rgba(139, 184, 56, 0.18);
    border-top-color: #8bb838;
    border-right-color: #f5a623;
    border-radius: 50%;
    animation: p24fwgspin 0.8s linear infinite;
    z-index: 2;
    pointer-events: none;
}

@keyframes p24fwgshimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.p24-fwg-item.p24-fwg-img-error {
    background: #fee2e2;
    min-height: 200px;
}

.p24-fwg-item.p24-fwg-img-error::after {
    content: '\26A0';
    font-size: 28px;
    color: #b91c1c;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    height: 1px;
    width: 1px;
    overflow: hidden;
    position: absolute !important;
}

@media (max-width: 768px) {
    .p24-fwg-item { margin-bottom: 14px; }
    .p24-fwg-item.p24-fwg-img-loading { min-height: 200px; }
    .p24-fwg-ad { margin: 12px 0; }
}
