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

.gallery-page {
    background: #f4ead8;
}


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

.gallery-hero {
    position: relative;

    display: flex;
    align-items: flex-end;

    width: 100%;
    height: 430px;
    min-height: 430px;

    padding: 0;

    color: #fff;

    background:
        linear-gradient(
            90deg,
            rgba(0,0,0,.70) 0%,
            rgba(0,0,0,.30) 45%,
            rgba(0,0,0,.12) 100%
        ),
        url("../images/relax-apartman-paradsasvar-osz-gallery-hero.webp");

    background-size: cover;
    background-position: center 55%;
    background-repeat: no-repeat;

    overflow: hidden;
}


/* =========================================================
   MAIN
========================================================= */

.gallery-main {
    background: #f4ead8;
}


/* =========================================================
   INTRO
========================================================= */

.gallery-intro {
    max-width: 760px;

    margin: 0 auto;

    padding:
        90px
        24px
        65px;

    text-align: center;
}


.gallery-intro .section-eyebrow {
    margin-bottom: 14px;

    color: #b77a2d;

    font-size: 11px;
    font-weight: 700;
    letter-spacing: .28em;
}


.gallery-intro h2 {
    margin: 0 0 22px;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: clamp(46px, 5vw, 68px);

    font-weight: 400;

    line-height: 1;

    color: #17140f;
}


.gallery-intro > p:last-child {
    max-width: 610px;

    margin: 0 auto;

    font-size: 16px;
    line-height: 1.7;

    color: #665f54;
}


/* =========================================================
   MOZAIK
========================================================= */

.gallery-grid {
    width: min(1120px, calc(100% - 48px));
    margin: 0 auto 100px;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 245px;
    grid-auto-flow: dense;

    gap: 14px;
}


/* ---------------------------------------------------------
   KÉPKÁRTYA
--------------------------------------------------------- */

.gallery-item {
    position: relative;

    display: block;

    width: 100%;
    height: 100%;

    overflow: hidden;

    border: 0;
    border-radius: 12px;

    background: #ddd3c1;

    cursor: pointer;
}


.gallery-item img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform .6s ease,
        filter .4s ease;
}


/* alsó sötét átmenet a felirat mögött */

.gallery-item::after {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            to top,
            rgba(0,0,0,.66) 0%,
            rgba(0,0,0,.16) 34%,
            transparent 62%
        );

    transition: background .3s ease;

    pointer-events: none;
}


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


.gallery-item:hover::after {
    background:
        linear-gradient(
            to top,
            rgba(0,0,0,.72) 0%,
            rgba(0,0,0,.20) 38%,
            transparent 65%
        );
}


/* ---------------------------------------------------------
   MOZAIK MÉRETEK
--------------------------------------------------------- */

/* magas kártya */
.gallery-tall {
    grid-row: span 2;
}


/* széles kártya */
.gallery-wide {
    grid-column: span 2;
}


/* ---------------------------------------------------------
   FELIRAT
--------------------------------------------------------- */

.gallery-caption {
    position: absolute;

    z-index: 2;

    left: 20px;
    bottom: 18px;

    color: #fff;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 20px;
    line-height: 1.1;

    text-align: left;

    pointer-events: none;
}


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

.gallery-cta {
    padding:
        90px
        24px
        95px;

    text-align: center;

    background:
        linear-gradient(

            rgba(3, 24, 17, .84),

            rgba(3, 24, 17, .9)

        ),

        url("../images/relax-apartman-paradsasvar-osz-gallery-hero.webp");

        background-size: cover;

    background-position: center;

    color: white;
}


.gallery-cta .section-eyebrow {
    margin: 0 0 15px;

    color: #d3a052;

    font-size: 11px;

    font-weight: 700;

    letter-spacing: .28em;
}


.gallery-cta h2 {
    margin:
        0
        auto
        18px;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size:
        clamp(48px, 5vw, 70px);

    font-weight: 400;

    line-height: 1;

    color: white;
}


.gallery-cta > p:not(.section-eyebrow) {
    max-width: 540px;

    margin:
        0
        auto
        30px;

    line-height: 1.65;

    color:
        rgba(255,255,255,.82);
}


.gallery-cta .primary-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-width: 155px;
    min-height: 50px;

    padding: 0 28px;

    border-radius: 999px;

    background: #d6a34f;

    color: #15130f;

    text-decoration: none;

    font-size: 11px;

    font-weight: 800;

    letter-spacing: .08em;
}


/* =========================================================
   LIGHTBOX
========================================================= */

.gallery-lightbox {
    position: fixed;

    z-index: 9999;

    inset: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 70px;

    background:
        rgba(7, 18, 15, .94);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity .25s ease,
        visibility .25s ease;
}


.gallery-lightbox.open {
    opacity: 1;
    visibility: visible;
}


.gallery-lightbox img {
    display: block;

    max-width: 90vw;
    max-height: 85vh;

    object-fit: contain;

    border-radius: 6px;

    box-shadow:
        0 25px 70px
        rgba(0,0,0,.35);
}


/* CLOSE */

.lightbox-close {
    position: absolute;

    top: 25px;
    right: 35px;

    width: 48px;
    height: 48px;

    border: 0;

    background: transparent;

    color: white;

    font-size: 40px;

    cursor: pointer;
}


/* NYILAK */

.lightbox-arrow {
    position: absolute;

    top: 50%;

    transform:
        translateY(-50%);

    width: 55px;
    height: 70px;

    border: 0;

    background:
        rgba(255,255,255,.08);

    color: white;

    font-family: Georgia, serif;

    font-size: 46px;

    cursor: pointer;

    border-radius: 5px;
}


.lightbox-prev {
    left: 30px;
}


.lightbox-next {
    right: 30px;
}


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

@media (max-width: 768px) {

    .gallery-intro {
        padding:
            60px
            22px
            45px;
    }


    .gallery-intro h2 {
        font-size: 43px;
    }


    .gallery-intro > p:last-child {
        font-size: 14px;
    }


    /* ---------------------------------------------
       GALÉRIA
    --------------------------------------------- */

    .gallery-grid {
        padding:
            0
            16px
            65px;

        grid-template-columns:
            1fr 1fr;

        grid-auto-rows: 180px;

        gap: 8px;
    }


    .gallery-item {
        border-radius: 9px;
    }


    .gallery-tall {
        grid-row: span 2;
    }


    .gallery-wide {
        grid-column: span 2;
    }


    .gallery-caption {
        left: 13px;
        bottom: 12px;

        font-size: 15px;
    }


    /* CTA */

    .gallery-cta {
        padding:
            65px
            22px
            70px;
    }


    .gallery-cta h2 {
        font-size: 46px;
    }


    /* LIGHTBOX */

    .gallery-lightbox {
        padding: 50px 15px;
    }


    .gallery-lightbox img {
        max-width: 96vw;
        max-height: 78vh;
    }


    .lightbox-arrow {
        width: 42px;
        height: 55px;

        font-size: 35px;

        background:
            rgba(0,0,0,.35);
    }


    .lightbox-prev {
        left: 7px;
    }


    .lightbox-next {
        right: 7px;
    }


    .lightbox-close {
        top: 12px;
        right: 14px;
    }

}


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

@media (max-width: 480px) {

    .gallery-grid {
        grid-auto-rows: 155px;
    }

}

/* =========================================================
   GALÉRIA HERO – EGYSÉGES A HÁZ OLDALLAL
========================================================= */

.gallery-hero {
    position: relative;
    min-height: 430px;

    display: flex;
    align-items: flex-end;

    overflow: hidden;
}

.gallery-hero-content {
    position: relative;
    z-index: 2;

    width: 78%;
    max-width: none;

    margin: 0 auto;
    padding: 0 0 58px;
}

.gallery-hero h1 {
    margin: 0 0 10px;

    color: #fff;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(58px, 5.2vw, 78px);
    font-weight: 400;
    line-height: .95;
}

.gallery-hero .hero-subtitle {
    margin: 12px 0 20px;

    color: #fff;

    font-size: 15px;
    font-weight: 600;
    letter-spacing: .12em;
    line-height: 1.4;

    text-transform: uppercase;
}

.gallery-hero .hero-description {
    max-width: 430px;

    margin: 0;
    padding-left: 18px;

    border-left: 2px solid rgba(223, 173, 85, .8);

    color: rgba(255,255,255,.92);

    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
}

.gallery-hero .page-hero-motto {
    right: 8%;
    bottom: 72px;
}


/* MOBIL */

@media (max-width: 768px) {

    .gallery-hero {
        height: 330px;
        min-height: 330px;
    }

    .gallery-hero-content {
        width: calc(100% - 40px);
        margin: 0 auto;
        padding: 0 0 38px;
    }

    .gallery-hero h1 {
        font-size: 52px;
        line-height: .98;
    }

    .gallery-hero .hero-subtitle {
        margin: 9px 0 14px;
        font-size: 11px;
    }

    .gallery-hero .hero-description {
        max-width: 310px;
        padding-left: 13px;
        font-size: 13px;
        line-height: 1.45;
    }

    .gallery-hero .page-hero-motto {
        display: none;
    }
}


/* =========================================================
   GALÉRIA – LIGHTBOX MOBIL JAVÍTÁS
========================================================= */

.gallery-lightbox {
    overscroll-behavior: contain;
}

.lightbox-close {
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    pointer-events: none;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
}

.gallery-lightbox.open .lightbox-close {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.gallery-lightbox img {
    position: relative;
    z-index: 10000;
}

.lightbox-arrow {
    z-index: 10001;
    pointer-events: none;
}

.gallery-lightbox.open .lightbox-arrow {
    pointer-events: auto;
}

@media (max-width: 768px) {

    .gallery-lightbox {
        padding: 64px 12px 24px;
    }

    .gallery-lightbox img {
        max-width: calc(100vw - 24px);
        max-height: calc(100dvh - 100px);
        width: auto;
        height: auto;
    }

    .lightbox-close {
        position: fixed;
        top: max(12px, env(safe-area-inset-top));
        right: 12px;

        width: 48px;
        height: 48px;

        border-radius: 50%;
        background: rgba(0,0,0,.58);

        color: #fff;
        font-size: 38px;
        font-weight: 300;
    }
}
