.sg-years-grid,
.sg-events-grid,
.sg-gallery-grid {
    display: grid;
    gap: 24px;
}

.sg-years-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.sg-year-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    border-radius: 18px;
    background: #f3f5f7;
    text-decoration: none;
    color: #1a1a1a;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    padding: 20px;
    transition: transform .2s ease, box-shadow .2s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
}

.sg-year-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
}

.sg-year-title {
    line-height: 1.2;
}

.sg-events-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.sg-event-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
    text-decoration: none;
    color: inherit;
    transition: transform .2s ease, box-shadow .2s ease;
}

.sg-event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
}

.sg-event-thumb img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.sg-event-content {
    padding: 18px;
}

.sg-event-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.sg-event-date {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.sg-event-desc {
    font-size: 15px;
    color: #444;
    line-height: 1.5;
}

.sg-gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.sg-gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 14px;
    display: block;
}

.sg-single-header {
    margin-bottom: 30px;
}

.sg-single-title {
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 10px;
}

.sg-single-date {
    color: #666;
    margin-bottom: 12px;
}

.sg-breadcrumbs {
    margin-bottom: 18px;
    font-size: 14px;
    color: #666;
}

.sg-breadcrumbs a {
    text-decoration: none;
    color: inherit;
}

.sg-tax-header {
    margin-bottom: 30px;
}

.sg-tax-title {
    font-size: 34px;
    font-weight: 800;
    margin: 0 0 8px;
}

.sg-tax-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* KALENDARZ */

.sg-calendar-wrap {
    margin: 24px 0;
}

.sg-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.sg-calendar-title {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.2;
}

.sg-calendar-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sg-calendar-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 12px;
    background: #f3f5f7;
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 600;
    transition: transform .2s ease, box-shadow .2s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
}

.sg-calendar-nav-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
}

.sg-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
}

.sg-calendar-weekdays {
    margin-bottom: 10px;
}

.sg-calendar-weekdays > div {
    padding: 12px 8px;
    text-align: center;
    font-weight: 700;
    color: #444;
    background: #f7f7f7;
    border-radius: 12px;
}

.sg-calendar-day {
    min-height: 140px;
    padding: 10px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sg-calendar-day-empty {
    background: #fafafa;
    box-shadow: none;
}

.sg-calendar-day-has-events {
    border: 1px solid rgba(0, 0, 0, .06);
}

.sg-calendar-day-today {
    outline: 2px solid #1f7a3f;
    outline-offset: -2px;
}

.sg-calendar-day-number {
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

.sg-calendar-day-number a {
    text-decoration: none;
    color: inherit;
}

.sg-calendar-events {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sg-calendar-event {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--sg-calendar-event-color, #f3f5f7);
    color: var(--sg-calendar-event-text-color, #1a1a1a);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.35;
}

.sg-calendar-event:hover {
    filter: brightness(0.97);
}

.sg-calendar-event-icon {
    flex: 0 0 auto;
    line-height: 1;
}

/* TEASER WYDARZENIA */

.sg-event-teaser {
    --sg-event-accent: #e8f0ea;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
    border-top: 6px solid var(--sg-event-accent);
}

.sg-event-teaser-label {
    padding: 14px 18px 0;
    font-size: 13px;
    font-weight: 700;
    color: #666;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.sg-event-teaser-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.sg-event-teaser-thumb img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

.sg-event-teaser-content {
    padding: 18px;
}

.sg-event-teaser-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 10px;
}

.sg-event-teaser-icon {
    line-height: 1;
}

.sg-event-teaser-date {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.sg-event-teaser-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.sg-event-teaser-desc {
    font-size: 15px;
    color: #444;
    line-height: 1.55;
}

@media (max-width: 991px) {
    .sg-calendar-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sg-calendar-weekdays {
        display: none;
    }

    .sg-calendar-day {
        min-height: 110px;
    }
}

@media (max-width: 640px) {
    .sg-calendar-grid {
        grid-template-columns: 1fr;
    }

    .sg-calendar-title {
        font-size: 24px;
    }

    .sg-event-teaser-thumb img {
        height: 220px;
    }

    .sg-event-teaser-title {
        font-size: 20px;
    }
}

.sg-admin-help {
    margin-top: -4px;
    margin-bottom: 10px;
    color: #555;
    font-size: 13px;
    line-height: 1.5;
}

.sg-admin-counter {
    margin: 8px 0 6px;
    font-size: 13px;
    font-weight: 600;
}

.sg-admin-counter.is-ok {
    color: #2f6f3e;
}

.sg-admin-counter.is-warning {
    color: #9a6700;
}

.sg-admin-counter.is-danger {
    color: #b42318;
}

.sg-admin-warning {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-left: 4px solid #dba617;
    background: #fff8e5;
    color: #6b4e00;
    font-size: 13px;
    line-height: 1.5;
}

.sg-single-lead {
    font-size: 18px;
    color: #444;
    margin: 15px 0 25px;
    line-height: 1.6;
    font-weight: 500;
}

.sg-single-content {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    margin-bottom: 30px;
}

.sg-single-content p {
    margin-bottom: 14px;
}

.sg-calendar-event {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--sg-calendar-event-color, #f3f5f7);
    color: var(--sg-calendar-event-text-color, #1a1a1a);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.35;
}

.sg-calendar-event:hover {
    filter: brightness(0.97);
}

.sg-calendar-event-icon {
    flex: 0 0 auto;
    line-height: 1;
}

.sg-calendar-event-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.sg-calendar-event-range-note {
    font-size: 11px;
    line-height: 1.25;
    opacity: 0.85;
}

/* Wydarzenia wielodniowe */
.sg-calendar-event.is-multiday {
    border-left: 4px solid rgba(0, 0, 0, 0.12);
}

.sg-calendar-event.is-multiday.range-middle {
    opacity: 0.92;
}

.sg-calendar-event.is-multiday.range-start,
.sg-calendar-event.is-multiday.range-end {
    font-weight: 600;
}

.sg-section-title {
    font-size: 26px;
    font-weight: 800;
    margin: 32px 0 18px;
}

.sg-video-section,
.sg-public-gallery-section,
.sg-private-gallery-section {
    margin-top: 32px;
}

.sg-video-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.sg-video-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: #f3f5f7;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
}

.sg-video-item iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    display: block;
}

.sg-private-gallery-box {
    padding: 24px;
    border-radius: 16px;
    background: #f6f7f7;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
}

.sg-private-gallery-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.sg-private-gallery-form label {
    font-weight: 700;
}

.sg-private-gallery-form input[type="password"] {
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid #ccd0d4;
    border-radius: 10px;
}

.sg-private-gallery-form button {
    min-height: 42px;
    padding: 8px 16px;
    border: none;
    border-radius: 10px;
    background: #1f7a3f;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.sg-private-gallery-form button:hover {
    filter: brightness(0.95);
}

.sg-private-gallery-error {
    padding: 10px 12px;
    border-left: 4px solid #b42318;
    background: #fff1f0;
    color: #b42318;
    font-weight: 700;
}

.sg-facility-main-gallery-row {
    margin-bottom: 28px;
}

.sg-facility-main-gallery-card {
    display: block;
    min-height: 170px;
    border-radius: 20px;
    background: linear-gradient(135deg, #f3f5f7, #ffffff);
    text-decoration: none;
    color: #1a1a1a;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}

.sg-facility-main-gallery-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
}

.sg-facility-main-gallery-content {
    padding: 26px;
}

.sg-facility-main-gallery-kicker {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #666;
    margin-bottom: 8px;
}

.sg-facility-main-gallery-title {
    font-size: 28px;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 10px;
}

.sg-facility-main-gallery-desc {
    font-size: 16px;
    color: #444;
    line-height: 1.55;
    max-width: 760px;
    margin-bottom: 14px;
}

.sg-facility-main-gallery-meta {
    font-size: 14px;
    color: #666;
    font-weight: 700;
}