/* ============================================================
   Hero3 — hexagonális service grid
   ============================================================ */

/* Section */
.hero3-section {
    position: relative;
    width: 100%;
    height: clamp(700px, 52.08vw, 1000px);
    overflow: hidden;
}

/* Háttérkép */
.hero3-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

/* Sötét overlay — alul és felül sötét, középen átlátszó */
.hero3-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(19, 27, 33, 0.95) 0%,
        rgba(19, 27, 33, 0) 50%,
        rgba(19, 27, 33, 0.95) 100%
    );
    z-index: 1;
}

/* ============================================================
   Desktop hex grid (>= 992px)
   ============================================================ */
.hero3-hex-grid {
    position: absolute;
    top: 56%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 1920px;
    aspect-ratio: 1920 / 1000;
    max-height: 100%;
    z-index: 2;
}

.hero3-mobile-grid {
    display: none;
}

.hero3-xs-grid {
    display: none;
}

/* Hex pozíció wrapper — ::before/::after SVG stroke adja a kontúrt (fill nélkül → nem süt át a kártyán) */
.hero3-hex-pos {
    position: absolute;
    width: 18.59%;
    aspect-ratio: 1.155;
    isolation: isolate;
}

.hero3-hex-pos::before,
.hero3-hex-pos::after {
    content: '';
    position: absolute;
    inset: 0;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.4s ease;
}

.hero3-hex-pos::before {
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%2086.6'%3E%3Cpolygon%20fill='none'%20stroke='rgba(255,255,255,0.85)'%20stroke-width='0.7'%20points='25,0%2075,0%20100,43.3%2075,86.6%2025,86.6%200,43.3'/%3E%3C/svg%3E");
    opacity: 1;
}

.hero3-hex-pos::after {
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%2086.6'%3E%3Cpolygon%20fill='none'%20stroke='rgba(226,109,30,0.9)'%20stroke-width='0.7'%20points='25,0%2075,0%20100,43.3%2075,86.6%2025,86.6%200,43.3'/%3E%3C/svg%3E");
    opacity: 0;
}

.hero3-hex-pos:hover::before {
    opacity: 0;
}

.hero3-hex-pos:hover::after {
    opacity: 1;
}

/* Hex kártya — kitölti a hex-pos-t, clip-path-szel vágva */
.hero3-hex-card {
    position: absolute;
    inset: 0;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    overflow: hidden;
    transition: background 0.4s ease;
    background: rgba(19, 27, 33, 0.50);
}


/* Hover háttérkép */
.hero3-hex-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.hero3-hex-card:hover .hero3-hex-bg {
    opacity: 1;
}

/* Sötét veil hover-re — szöveg olvashatóság megőrzésére */
.hero3-hex-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(19, 27, 33, 0.35);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.hero3-hex-card:hover::after {
    opacity: 1;
}

/* Tartalom réteg */
.hero3-hex-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 22% 10% 10%;
    text-align: center;
    width: 100%;
    height: 100%;
}

.hero3-hex-content-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 1;
}

/* Ikon */
.hero3-hex-icon {
    width: clamp(36px, 3.2vw, 60px);
    height: clamp(36px, 3.2vw, 60px);
    object-fit: contain;
    filter: brightness(0) invert(1);
    flex-shrink: 0;
}

/* Cím */
.hero3-hex-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
    margin: 0;
    word-break: break-word;
}

/* CTA link — mindig a hex aljára */
.hero3-hex-cta {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: #e26d1e;
    line-height: 1.1;
    white-space: nowrap;
    margin-bottom: 0;
    flex-shrink: 0;
}

/* ============================================================
   Középső logó
   ============================================================ */
.hero3-center-logo {
    position: absolute;
    left: 40.16%;
    top: 36.2%;
    width: 19.9%;
    height: 31.5%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 3;
}

.hero3-center-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ============================================================
   Logó hex — mindig látható háttér (nem csak hover)
   ============================================================ */
.hero3-hex-bg--visible {
    opacity: 1 !important;
}

.hero3-hex-card--logo::after {
    display: none;
}

.hero3-mobile-logo-wrap::before,
.hero3-mobile-logo-wrap::after {
    display: none;
}

.hero3-hex-card--logo:hover {
    background: rgba(19, 27, 33, 0.8);
}

/* ============================================================
   Sarok logó (pl. Széchenyi)
   ============================================================ */
.hero3-corner-logo {
    position: absolute;
    top: 160px; /* felülírja a blade inline style */
    right: 24px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero3-corner-img {
    display: block;
    width: 290px;
    max-width: 220px;
    height: auto;
    object-fit: contain;
}

/* ============================================================
   1200px – 1760px: kisebb tartalom a desktop hex-gridben
   ============================================================ */
@media (min-width: 1200px) and (max-width: 1760px) {
    .hero3-hex-icon {
        width: 50px;
        height: 50px;
    }

    .hero3-hex-title {
        font-size: 15px !important;
    }

    .hero3-hex-cta {
        font-size: 15px !important;
    }

    /* Tartalom réteg */
    .hero3-hex-content {
        position: relative;
        z-index: 2;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 15% 10% 10%;
        text-align: center;
        width: 100%;
        height: 100%;
    }
}

/* ============================================================
   Tablet (576px – 1199px): Figma 2-oszlopos layout (800px alap)
   Jobb oszlop fent: items 1–4 | Bal oszlop 168px lentebb: items 0,logo,5
   Corner logó: right:0, width: 54vw
   ============================================================ */
@media (max-width: 1199px) {
    .hero3-section {
        height: auto;
        min-height: unset;
        max-height: unset;
        overflow: hidden;
        padding: 0;
    }

    /* Tartalom réteg */
    .hero3-hex-content {
        position: relative;
        z-index: 2;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 20% 15% 10%;
        text-align: center;
        width: 100%;
        height: 100%;
    }

    .hero3-hex-grid {
        display: none;
    }

    /* Corner logó: jobbra zárt, Figma-arányos méret */
    .hero3-corner-logo {
        right: 0 !important;
    }

    .hero3-corner-img {
        width: min(433px, 54vw);
        max-width: none;
    }

    /* Mobile grid: 2 oszlop, vízszintesen középre */
    .hero3-mobile-grid {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
        padding: clamp(380px, 61vw, 490px) 0 clamp(50px, 21vw, 170px);
        overflow: visible;
        position: relative;
        z-index: 2;
    }

    /* Bal oszlop: 168px lentebb a jobb oszlopnál (Figma: bal=656px, jobb=488px) */
    .hero3-col-left {
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        margin-top: clamp(100px, 21vw, 168px);
        z-index: 2;
    }

    /* Jobb oszlop: tetején kezd, 75px vízszintes átfedés */
    .hero3-col-right {
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        margin-left: max(-9.375vw, -75px);
        margin-top: 0;
        z-index: 1;
    }

    .hero3-mobile-card-wrap {
        position: relative;
        width: min(357px, 44.6vw);
        aspect-ratio: 1.155;
        flex-shrink: 0;
        isolation: isolate;
        margin-bottom: clamp(10px, 3vw, 24px);
    }

    .hero3-mobile-card-wrap::before,
    .hero3-mobile-card-wrap::after {
        content: '';
        position: absolute;
        inset: 0;
        background-size: 100% 100%;
        background-repeat: no-repeat;
        pointer-events: none;
        z-index: 10;
        transition: opacity 0.4s ease;
    }

    .hero3-mobile-card-wrap::before {
        background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%2086.6'%3E%3Cpolygon%20fill='none'%20stroke='rgba(255,255,255,0.85)'%20stroke-width='0.7'%20points='25,0%2075,0%20100,43.3%2075,86.6%2025,86.6%200,43.3'/%3E%3C/svg%3E");
        opacity: 1;
    }

    .hero3-mobile-card-wrap::after {
        background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%2086.6'%3E%3Cpolygon%20fill='none'%20stroke='rgba(226,109,30,0.9)'%20stroke-width='0.7'%20points='25,0%2075,0%20100,43.3%2075,86.6%2025,86.6%200,43.3'/%3E%3C/svg%3E");
        opacity: 0;
    }

    .hero3-mobile-card-wrap:hover::before { opacity: 0; }
    .hero3-mobile-card-wrap:hover::after { opacity: 1; }

    .hero3-mobile-logo-wrap {
        width: min(377px, 47vw) !important;
        align-self: center;
    }
}

/* ============================================================
   Mobile (< 576px): Figma mobile layout
   Sarok logó: felülre, középre | xs-grid: 0,1,2,logo,3,4,5
   ============================================================ */
@media (max-width: 575px) {
    .hero3-section {
        padding: 0;
    }

    /* Sarok logó: jobbra igazítva, navbar (147px) alatt rögtön */
    .hero3-corner-logo {
        top: 150px !important;
        right: 0 !important;
    }

    .hero3-corner-img {
        width: auto !important;
        max-width: min(200px, 50vw) !important;
    }

    /* Tablet 2-oszlopos grid elrejtése mobilon */
    .hero3-mobile-grid {
        display: none !important;
    }

    /* XS grid: navbar (150px) + logó (~138px) + gap (22px) = ~310px */
    .hero3-xs-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative;
        z-index: 2;
        padding: 310px 0 60px;
        gap: 8px;
    }

    .hero3-xs-grid .hero3-mobile-card-wrap {
        width: min(357px, 89vw);
        aspect-ratio: 1.155;
        margin-bottom: 0;
        align-self: center;
    }

    .hero3-xs-grid .hero3-mobile-logo-wrap {
        width: min(380px, 94vw) !important;
    }

    .hero3-hex-icon {
        width: 44px;
        height: 44px;
    }
}
