/* =======================================================
   REFERENCIÁK / MUNKAFOLYAMATOK OLDAL
   A globális fejlécet és footert a style.css kezeli.
======================================================= */

.referencia-page {
    background: #ffffff;
}

.referencia-page main {
    overflow: hidden;
}

.referencia-kicker {
    margin: 0 0 8px;
    color: #177323;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* ======================== HERO ======================== */

.referencia-hero {
    position: relative;

    min-height: 390px;
    padding: 52px 24px 42px;

    display: flex;
    align-items: center;

    background-image:
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 1) 0%,
            rgba(255, 255, 255, 0.99) 25%,
            rgba(255, 255, 255, 0.808) 38%,
            rgba(255, 255, 255, 0.507) 50%,
            rgba(255, 255, 255, 0.37) 66%,
            rgba(255, 255, 255, 0.253) 80%
        ),
        url("../kepek/kepgaleria/herohatterkep.webp");

    background-size: cover;
    background-position: center 54%;
    background-repeat: no-repeat;
}

.referencia-hero::before,
.referencia-hero::after {
    content: "";
    position: absolute;
    pointer-events: none;
    opacity: 0.28;
}

.referencia-hero::before {
    width: 240px;
    height: 240px;
    left: -90px;
    top: 35px;
    border: 1px solid rgba(30, 120, 47, 0.20);
    border-radius: 55% 45% 62% 38%;
    transform: rotate(28deg);
}

.referencia-hero::after {
    width: 180px;
    height: 180px;
    right: -65px;
    bottom: -58px;
    border: 1px solid rgba(30, 120, 47, 0.18);
    border-radius: 48% 52% 38% 62%;
    transform: rotate(-18deg);
}

.referencia-hero-belso {
    width: min(100%, 1420px);
    margin: 0 auto;
}

.referencia-hero-szoveg {
    position: relative;
    z-index: 1;
    max-width: 660px;
}

.referencia-hero h1 {
    margin: 0;
    color: #0a0a0a;
    font-size: clamp(2.7rem, 5vw, 5rem);
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.referencia-cim-vonal {
    width: 58px;
    height: 4px;
    margin: 18px 0 20px;
    border-radius: 999px;
    background: #168029;
}

.referencia-bevezeto {
    max-width: 650px;
    margin: 0;
    color: #4a4a4a;
    font-size: 1.02rem;
    line-height: 1.75;
}

.referencia-hero-cimkek {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.referencia-hero-cimkek span {
    padding: 9px 15px;
    border: 1px solid #cfe4d2;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: #176d25;
    font-size: 0.84rem;
    font-weight: 750;
}

.referencia-hero-kepdoboz {
    position: relative;
    min-height: 360px;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.12);
}

.referencia-hero-kepdoboz::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.22), transparent 36%);
    pointer-events: none;
}

.referencia-hero-kep {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 360px;
    object-fit: cover;
}

/* ======================== GALÉRIA ======================== */

.referencia-galeria {
    width: min(calc(100% - 48px), 1420px);
    margin: 0 auto;
    padding: 42px 0 26px;
}

.referencia-szekcio-fejlec {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 40px;
    margin-bottom: 28px;
}

.referencia-szekcio-fejlec h2 {
    margin: 0;
    color: #111111;
    font-size: clamp(1.8rem, 3vw, 2.65rem);
    letter-spacing: -0.035em;
}

.referencia-szekcio-fejlec > p {
    max-width: 510px;
    margin: 0 0 4px;
    color: #666666;
    line-height: 1.65;
    text-align: right;
}

.referencia-racs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.referencia-kartya {
    margin: 0;
    overflow: hidden;
    border: 1px solid #e2e8e2;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 7px 22px rgba(0, 0, 0, 0.055);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.referencia-kartya:hover {
    transform: translateY(-3px);
    box-shadow: 0 13px 30px rgba(0, 0, 0, 0.08);
}

.referencia-kepkeret {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #eef3ee;
}

.referencia-kepkeret img {
    display: block;
    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center top;

    transition:
        object-position 5s ease,
        transform 500ms ease;

    transform: scale(1.02);
}

.referencia-kartya:hover .referencia-kepkeret img {
    object-position: center bottom;
    transform: scale(1.03);
}

.referencia-tipus {
    position: absolute;
    left: 16px;
    bottom: 15px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(14, 98, 27, 0.94);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
}

.referencia-kartya figcaption {
    padding: 18px 20px 21px;
}

.referencia-kartya h3 {
    margin: 0 0 7px;
    color: #111111;
    font-size: 1.08rem;
}

.referencia-kartya p {
    margin: 0;
    color: #606060;
    font-size: 0.92rem;
    line-height: 1.6;
}

.referencia-megjegyzes {
    margin: 24px 0 0;
    padding: 16px 18px;
    border-left: 4px solid #1a7a2b;
    background: #f6faf6;
    color: #4f5c50;
    line-height: 1.6;
}

/* ======================== CTA ======================== */

.referencia-cta {
    width: min(calc(100% - 48px), 1420px);
    margin: 30px auto 38px;
    padding: 20px 24px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 22px;
    border: 1px solid #dbe8dc;
    border-radius: 18px;
    background:
        linear-gradient(90deg, rgba(236, 248, 238, 0.96), rgba(255, 255, 255, 0.96));
}

.referencia-cta-ikon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #dff3e2;
}

.referencia-cta-ikon svg {
    width: 29px;
    height: 29px;
    fill: none;
    stroke: #177326;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.referencia-cta-szoveg h2 {
    margin: 0 0 4px;
    color: #111111;
    font-size: 1.32rem;
}

.referencia-cta-szoveg p {
    margin: 0;
    color: #666666;
}

.referencia-cta-gomb {
    min-width: 200px;
    padding: 14px 20px;
    border-radius: 7px;
    background: #087616;
    color: #ffffff;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    transition: transform 160ms ease, background 160ms ease;
}

.referencia-cta-gomb:visited {
    color: #ffffff;
}

.referencia-cta-gomb:hover {
    background: #076711;
    transform: translateY(-1px);
}

.referencia-cta-gomb:focus-visible {
    outline: 3px solid #95d69f;
    outline-offset: 3px;
}

/* ======================== TABLET ======================== */

@media (max-width: 1050px) {
    .referencia-hero-belso {
        grid-template-columns: 1fr 0.95fr;
        gap: 34px;
    }

    .referencia-hero-kepdoboz,
    .referencia-hero-kep {
        min-height: 315px;
    }
}

@media (max-width: 820px) {
    .referencia-hero {
        padding: 38px 20px 32px;
    }

    .referencia-hero-belso {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .referencia-hero-szoveg {
        max-width: 100%;
    }

    .referencia-hero-kepdoboz,
    .referencia-hero-kep {
        min-height: 285px;
    }

    .referencia-galeria,
    .referencia-cta {
        width: min(calc(100% - 32px), 1420px);
    }

    .referencia-szekcio-fejlec {
        display: block;
    }

    .referencia-szekcio-fejlec > p {
        max-width: 680px;
        margin-top: 10px;
        text-align: left;
    }

    .referencia-racs {
        grid-template-columns: 1fr;
    }

    .referencia-cta {
        grid-template-columns: auto 1fr;
    }

    .referencia-cta-gomb {
        grid-column: 1 / -1;
        width: 100%;
    }
}

/* ======================== MOBIL ======================== */

@media (max-width: 560px) {
    .referencia-hero {
        padding: 28px 16px 24px;
    }

    .referencia-hero h1 {
        font-size: clamp(2.35rem, 14vw, 3.4rem);
    }

    .referencia-bevezeto {
        font-size: 0.95rem;
        line-height: 1.65;
    }

    .referencia-hero-cimkek {
        gap: 8px;
        margin-top: 22px;
    }

    .referencia-hero-cimkek span {
        padding: 8px 12px;
        font-size: 0.76rem;
    }

    .referencia-hero-kepdoboz,
    .referencia-hero-kep {
        min-height: 220px;
        border-radius: 18px;
    }

    .referencia-galeria {
        width: calc(100% - 24px);
        padding-top: 30px;
    }

    .referencia-racs {
        gap: 16px;
    }

    .referencia-kartya {
        border-radius: 14px;
    }

    .referencia-kartya figcaption {
        padding: 15px 16px 17px;
    }

    .referencia-megjegyzes {
        font-size: 0.88rem;
    }

    .referencia-cta {
        width: calc(100% - 24px);
        margin-top: 22px;
        padding: 18px;
        grid-template-columns: 1fr;
        text-align: center;
    }

    .referencia-cta-ikon {
        margin: 0 auto;
    }

    .referencia-cta-gomb {
        min-width: 0;
    }

    /* Biztonsági mobil fallback, ha a globális fejléc még nem kapott scrollozható navigációt. */
    .referencia-page .gombokfejlec {
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    .referencia-page .gombokfejlec a {
        flex: 0 0 auto;
    }
}
