/* =============================================
   RT Realizacje – front styles
   ============================================= */

/* ── Layout ── */

#module-rt_realizacje-list #content-wrapper,
#module-rt_realizacje-detail #content-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
}

.page-home .rt-realizacje-home {
    width: 100%;
    overflow: hidden;
    margin:50px 0px;
}

/* ── Spacing ── */

.rt-realizacje,
.rt-realizacje-home {
    margin: 2rem 0;
}

/* ── Grid – lista realizacji ── */

.rt-realizacje-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 767px) {
    .rt-realizacje-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Grid – widget homepage ── */

.rt-realizacje-grid-home {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* ── Nagłówek sekcji homepage ── */

.rt-realizacje-home-heading {
    position: relative;
    text-align: center;
    margin-bottom: 1.5rem;
}

.rt-realizacje-home-heading .title {
    font-size: 30px;
    font-weight: 700;
    margin: 0;
}

.rt-realizacje-home-heading a {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    font-size: 0.9rem;
}

/* ── Karta realizacji ── */

.rt-realizacja-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .05);
    display: flex;
    flex-direction: column;
    text-align: left;
}

.rt-realizacja-image {
    display: block;
    aspect-ratio: 16 / 9;
    background: #f5f5f5;
    overflow: hidden;
    flex-shrink: 0;
}

.rt-realizacja-image img,
.rt-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rt-realizacja-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    text-align: left;
}

.rt-realizacja-body h2,
.rt-realizacja-body h3 {
    margin: 0 0 .65rem;
    text-align: left;
}

.rt-realizacja-short {
    color: #555;
    margin-bottom: .75rem;
    text-align: left;
}

.rt-realizacja-body .btn-primary {
    margin-top: auto;
    align-self: flex-start;
}

/* ── Hero (detail) ── */

.rt-realizacja-hero {
    position: relative;
    height: 400px;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.rt-realizacja-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rt-realizacja-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .65) 0%, rgba(0, 0, 0, .15) 50%, transparent 100%);
    display: flex;
    align-items: flex-end;
    padding: 2rem;
}

.rt-realizacja-hero-title {
    color: #fff;
    font-size: 2rem;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}

/* ── Opis (detail) ── */

.rt-realizacja-description {
    margin-top: 1.25rem;
}

/* ── Galeria (detail) ── */

.rt-realizacja-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.rt-gallery-item {
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f5f5;
}

/* ── GLightbox – strzałki zawsze widoczne ── */

.glightbox-button-hidden {
    display: flex !important;
}

.gnext,
.gprev {
    display: flex !important;
}

/* ── Powrót (detail) ── */

.rt-realizacja-back {
    margin-top: 2rem;
}

/* ── Fixes motywu ── */

.card {
    border: none !important;
}


/* ── Lead text (homepage) ── */

.rt-realizacje-lead {
    text-align: center;
    color: #555;
    font-size: 1rem;
    margin: -.5rem 0 2rem;
}

/* ── Intro text (lista realizacji) ── */

.rt-realizacje-intro {
    max-width: 760px;
    margin: 0 auto 2.5rem;
    text-align: center;
    color: #555;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* ── Kroki ── */

.rt-realizacje-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.rt-realizacje-step {
    text-align: center;
    flex: 1;
    min-width: 140px;
    max-width: 200px;
    padding: 0 1rem;
}

.rt-realizacje-step-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto .75rem;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
}

.rt-realizacje-step-icon svg {
    width: 100%;
    height: 100%;
}

.rt-realizacje-step-title {
    font-weight: 700;
    font-size: .95rem;
    margin-bottom: .25rem;
}

.rt-realizacje-step-desc {
    font-size: .82rem;
    color: #666;
    line-height: 1.4;
}

.rt-realizacje-step-arrow {
    flex-shrink: 0;
    width: 24px;
    padding-top: 1rem;
    align-self: flex-start;
    margin-top: 16px;
}

.rt-realizacje-step-arrow svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 600px) {
    .rt-realizacje-step-arrow {
        display: none;
    }

    .rt-realizacje-step {
        margin-top:10px;
        min-width: 45%;
    }
}

.rt-realizacja-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    /* usuń aspect-ratio stąd */
}

.rt-realizacja-card-inner {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9; /* przenieś tutaj */
    position: relative;
    overflow: hidden;
}

.rt-realizacja-card-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.rt-realizacja-card:hover .rt-realizacja-card-inner img {
    transform: scale(1.05);
}

.rt-realizacja-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.7) 0%, rgba(0,0,0,.1) 50%, transparent 100%);
    display: flex;
    align-items: flex-end;
    padding: 1.25rem;
}

.rt-realizacja-overlay h2 {
    color: #fff !important;
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 6px rgba(0,0,0,.5);
}

.rt-realizacja-body {
    padding: 1rem;
    background: #fff;
}

.rt-realizacja-body h2 {
    display: none;
}
.rt-realizacja-overlay h2 {
    color: #fff !important;
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 6px rgba(0,0,0,.5);
}

.rt-realizacja-overlay h3 {
    color: #fff !important;
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 6px rgba(0,0,0,.5);
}