/* ============================================================
   Card12 — Hexagonális projekt-kártya szekció
   Figma: desktop 1082:3806 (1920px), tablet 1082:752

   5 hexagon "W/zigzag" mintában:
   - Desktop: 5 flex col, egymásba csúsznak (~92px átfedés),
     páros col-ok (1, 3) lefelé tolva ~191px
   - Tablet (576–1024px): flex-wrap, 2 col, páros col offset
   - Mobile (<576px): 1 col, nincs offset

   Flat-top hexagon arány: 514:445 (W:H)
   Figma méretezés (1920px canvas, 100px padding/oldal):
     hex szélesség : 418px = 21.77vw
     col pitch     : 326.44px = 17.0vw
     átfedés       : 91.56px  = 4.77vw  → margin-left: max(-4.77vw, -92px)
     páros offset  : 190.96px = 9.95vw  → margin-top: clamp(50px, 9.95vw, 191px)
   ============================================================ */

/* ============================================================
   Szekció
   ============================================================ */

.fw-card12-section {
    background: linear-gradient(180deg, #131b21 0%, #2c69a9 28.846%, #a5bed8 66.346%, #d6c7bb 100%);
    padding: clamp(48px, 5vw, 60px) 0 clamp(32px, 3.3vw, 64px);
    position: relative;
}

/* ============================================================
   Fejléc
   ============================================================ */

.card12-header {
    text-align: center;
    margin-bottom: clamp(24px, 3.1vw, 60px);
}

.card12-title {
    color: #fff;
    font-family: Montserrat, sans-serif;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.card12-title p,
.card12-title h1,
.card12-title h2,
.card12-title h3 {
    margin: 0;
    color: #fff;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
}

.card12-description {
    color: #fff;
    font-family: Montserrat, sans-serif;
    line-height: 1.5;
    max-width: 786px;
    margin: 0 auto;
}

.card12-description p {
    margin-bottom: 0.5em;
}

.card12-description p:last-child {
    margin-bottom: 0;
}

/* ============================================================
   Hex rács — desktop 5 oszlop
   ============================================================ */

.card12-hex-grid {
    display: flex;
    align-items: flex-start;
    width: 100%;
    flex-wrap: nowrap;
    padding-bottom: clamp(50px, 9.95vw, 60px);
    overflow: visible;
    justify-content: center;
}

.card12-col {
    flex-shrink: 0;
    width: 20vw;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    z-index: 2;
}

/* Szomszédos oszlopok átfednek ~92px-rel (pitch = 326px < hex w = 418px) */
.card12-col + .card12-col {
    margin-left: -4.50vw;
}

/* Páros indexű oszlopok (1, 3) lefelé tolva — a "W" minta */
.card12-col-offset {
    margin-top: calc((20vw * 445 / 514 / 2 ) + 8px);
    z-index: 1;
}

/* ============================================================
   Hex kártya
   ============================================================ */

.card12-hex-card {
    display: block;
    position: relative;
    width: 100%;
    /* flat-top hexagon: W:H = 514:445 */
    aspect-ratio: 514 / 445;
    text-decoration: none;
    color: #fff;
}

.card12-hex-inner {
    position: relative;
    width: 100%;
    height: 100%;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    overflow: hidden;
}

.card12-hex-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.card12-hex-card:hover .card12-hex-img {
    transform: scale(1.06);
}

/* Sötét gradiens overlay — alsó ~58% */
.card12-hex-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 58%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%,rgba(0, 0, 0, 0.8) 70%, rgba(0, 0, 0, 0) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 0 18% 5%;
    text-align: center;
    gap: 8px;
}

.card12-hex-title {
    color: #fff;
    font-family: Montserrat, sans-serif;
    line-height: 1.1;
    margin: 0;
}

.card12-hex-link {
    display: inline;
    align-items: center;
    gap: 5px;
    color: #e26d1e;
    font-family: Montserrat, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.1;
    transition: gap 0.2s ease;
}

.card12-hex-card:hover .card12-hex-link {
    gap: 8px;
}

.card12-hex-arrow {
    width: 10px;
    height: 8px;
    flex-shrink: 0;
}

/* ============================================================
   Footer gomb (pentagon SVG — mint ref1-btn)
   ============================================================ */

.card12-footer {
    display: flex;
    justify-content: center;
    margin-top: clamp(24px, 2.5vw, 48px);
}

.card12-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 50px;
    padding: 15px 30px;
    color: #fff;
    font-family: Montserrat, sans-serif;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.card12-btn:hover {
    color: #fff;
    text-decoration: none;
}

.card12-btn:hover .card12-btn-shape path {
    fill: #c55d18;
}

.card12-btn-shape {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.card12-btn-text {
    position: relative;
    z-index: 1;
}

.card12-btn-arrow {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 11px;
    height: 9px;
    transition: transform 0.2s ease;
}

.card12-btn:hover .card12-btn-arrow {
    transform: translateX(3px);
}

/* ============================================================
   Reszponzív — Tablet (576–1024px): 2 oszlopos staggered
   ============================================================ */

/* Tablet grid — alapból rejtve, ≤1024px-en jelenik meg */
.card12-grid-tablet {
    display: none;
}

/* ============================================================
   Tablet (≤1024px): desktop grid rejtve, tablet grid látható
   References1 minta — vw-alapú, azonos arányok minden méreten
   52.42vw + (-11.09vw overlap) = 93.75vw kitöltés
   ============================================================ */

@media (max-width: 1024px) {

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

    .card12-grid-tablet {
        display: flex;
        align-items: flex-start;
        flex-wrap: nowrap;
        overflow: visible;
        position: relative;
        justify-content: center;
        z-index: 2;
    }

    .card12-grid-tablet .card12-col {
        --w: 50vw;
        flex-shrink: 0;
        width: var(--w);
        display: flex;
        flex-direction: column;
        gap: 16px;
        z-index: 2;
    }

    .card12-grid-tablet .card12-col + .card12-col {
        margin-left: -11vw;
        z-index: 1;
    }

    .card12-grid-tablet .card12-col-offset {
        margin-top: calc((var(--w) * 445 / 514 / 2 ) + 8px);
    }
}

/* ============================================================
   1200px – 1760px: kisebb tartalom a desktop hex-gridben
   ============================================================ */
@media (min-width: 1200px) and (max-width: 1760px) {
    .card12-hex-title {
        font-size: 16.8px !important;
    }

    .card12-hex-link {
        font-size: 14px !important;
    }

    .card12-hex-overlay {
        padding: 0 18% 10%;
    }
}

/* ============================================================
   Mobile (<576px): 1 oszlop, középre igazítva
   ============================================================ */

@media (max-width: 575px) {

    .card12-grid-tablet {
        flex-wrap: wrap;
        justify-content: center;
        padding-bottom: 20px;
    }

    .card12-grid-tablet .card12-col {
        flex: 1 1 100%;
        width: auto !important;
        z-index: 1 !important;
    }

    .card12-grid-tablet .card12-col + .card12-col {
        margin-left: 0 !important;
    }

    .card12-grid-tablet .card12-col-offset {
        margin-top: 16px !important;
    }
}

@media (max-width: 767px) {
    .card12-btn {
        width: 100%;
        height: 50px;
        justify-content: center;
        white-space: normal;
    }
}
