/* =========================================================
   Bér-Flex Bt. – modern stíluslap
   Palette: Makita-hatású türkiz + piros
   ========================================================= */

:root {
    --teal: #008C95;
    --teal-dark: #006b73;
    --teal-light: #e6f4f5;
    --red: #E4002B;
    --red-dark: #bd0023;
    --dark: #0f1e24;
    --dark-2: #16313a;
    --text: #1c2b32;
    --muted: #5a6b73;
    --line: #e2e8ea;
    --bg: #ffffff;
    --bg-alt: #f4f7f8;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 2px 8px rgba(15, 30, 36, .06);
    --shadow: 0 12px 30px rgba(15, 30, 36, .10);
    --shadow-lg: 0 24px 60px rgba(15, 30, 36, .18);
    --container: 1160px;
    --header-h: 76px;
    --font-body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --font-head: 'Montserrat', var(--font-body);
}

* { box-sizing: border-box; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-dark); }

h1, h2, h3, h4 {
    font-family: var(--font-head);
    line-height: 1.15;
    margin: 0 0 .5em;
    color: var(--dark);
    letter-spacing: -.01em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 900; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }

p { margin: 0 0 1rem; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 22px;
}

.text-accent { color: var(--red); }

/* ---------- gombok ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 50px;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: .95rem;
    line-height: 1;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 8px 20px rgba(0, 140, 149, .3); }
.btn-primary:hover { background: var(--teal-dark); color: #fff; }
.btn-accent { background: var(--red); color: #fff; box-shadow: 0 8px 20px rgba(228, 0, 43, .3); }
.btn-accent:hover { background: var(--red-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--teal); border-color: var(--teal); }
.btn-outline:hover { background: var(--teal); color: #fff; }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.55); backdrop-filter: blur(4px); }
.btn-ghost:hover { background: #fff; color: var(--dark); border-color: #fff; }

/* ---------- címkék / eyebrow ---------- */
.eyebrow {
    font-family: var(--font-head);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .16em;
    font-size: .78rem;
    color: #ffd23f;
    margin: 0 0 .6rem;
}
.eyebrow-dark { color: var(--red); }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    height: var(--header-h);
    display: flex;
    align-items: center;
    background: transparent;
    transition: background .3s ease, box-shadow .3s ease, height .3s ease;
}
.site-header.scrolled {
    background: rgba(255, 255, 255, .97);
    box-shadow: var(--shadow-sm);
    height: 68px;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}
.site-header.scrolled .brand { color: var(--dark); }
.brand-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    padding: 3px;
    box-shadow: var(--shadow-sm);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; white-space: nowrap; }
.brand-text small { font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; opacity: .8; white-space: nowrap; }

.main-nav { display: flex; align-items: center; gap: 6px; }
.nav-link {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .95rem;
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    position: relative;
    transition: color .2s ease, background .2s ease;
}
.site-header.scrolled .nav-link { color: var(--text); }
.nav-link::after {
    content: "";
    position: absolute;
    left: 14px; right: 14px; bottom: 3px;
    height: 2px;
    background: var(--red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: var(--teal); }
.site-header.scrolled .nav-link.active { color: var(--teal); }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px; height: 44px;
    background: rgba(255,255,255,.14);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    padding: 0 11px;
}
.site-header.scrolled .nav-toggle {
    background: var(--teal-light);
    border: 1px solid var(--teal);
}
.nav-toggle span {
    display: block;
    height: 2.5px;
    width: 100%;
    background: #fff;
    border-radius: 2px;
    transition: transform .25s ease, opacity .25s ease, background .25s ease;
}
.site-header.scrolled .nav-toggle span { background: var(--dark); }
.nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    background: url("../images/bg8.jpg") center center / cover no-repeat;
    color: #fff;
    padding: calc(var(--header-h) + 40px) 0 80px;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(115deg, rgba(6, 40, 45, .94) 0%, rgba(6, 40, 45, .78) 45%, rgba(0, 140, 149, .55) 100%),
        radial-gradient(1000px 500px at 90% 10%, rgba(228, 0, 43, .28), transparent 60%);
}
.hero-content { position: relative; z-index: 2; max-width: 760px; }
.hero h1 { color: #fff; text-shadow: 0 4px 30px rgba(0,0,0,.35); }
.hero-lead {
    font-size: clamp(1.02rem, 1.8vw, 1.22rem);
    max-width: 600px;
    color: rgba(255,255,255,.9);
    margin-bottom: 1.8rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 2.4rem; }
.hero-badges {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    padding: 0; margin: 0;
    font-weight: 600;
    font-size: .92rem;
}
.hero-badges li { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.92); }
.hero-badges li::before {
    content: "";
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 0 4px rgba(228,0,43,.25);
}

/* =========================================================
   SZEKCIÓK
   ========================================================= */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 720px; margin: 0 auto 54px; text-align: center; }
.section-sub { color: var(--muted); font-size: 1.05rem; margin: 0; }

/* ---------- kártyák ---------- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 26px;
}
.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 34px 30px;
    box-shadow: var(--shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    position: relative;
    overflow: hidden;
}
.card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--teal), var(--red));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--muted); margin: 0; font-size: .98rem; }

.card-icon {
    width: 58px; height: 58px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--teal-light);
    color: var(--teal);
    margin-bottom: 20px;
}
.card-icon-sm { width: 46px; height: 46px; border-radius: 12px; margin: 0; flex-shrink: 0; }

/* ---------- katalógus sáv ---------- */
.catalog-band {
    margin-top: 46px;
    background: linear-gradient(120deg, var(--dark-2), var(--teal-dark));
    color: #fff;
    border-radius: var(--radius);
    padding: 38px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
    box-shadow: var(--shadow);
}
.catalog-band h3 { color: #fff; margin-bottom: .25rem; }
.catalog-band p { margin: 0; color: rgba(255,255,255,.82); }
.catalog-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.catalog-band .btn-outline { color: #fff; border-color: rgba(255,255,255,.6); }
.catalog-band .btn-outline:hover { background: #fff; color: var(--dark); }

/* ---------- gép kereső ---------- */
.machine-search {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 520px;
    margin: 0 auto 36px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 50px;
    padding: 12px 22px;
    box-shadow: var(--shadow-sm);
    color: var(--muted);
}
.machine-search input {
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: var(--font-body);
    width: 100%;
    color: var(--text);
    background: transparent;
}
.machine-grid {
    list-style: none;
    padding: 0; margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}
.machine-grid li {
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-left: 4px solid var(--teal);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    font-weight: 600;
    font-size: .95rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.machine-grid li::before {
    content: "";
    width: 7px; height: 7px;
    margin-top: .45em;
    border-radius: 50%;
    background: var(--red);
    flex-shrink: 0;
}
.machine-grid li:hover {
    transform: translateY(-3px);
    border-left-color: var(--red);
    box-shadow: var(--shadow-sm);
    background: #fff;
    z-index: 30;
}
.machine-grid .m-text { display: flex; flex-direction: column; gap: 2px; }
.machine-grid .m-name { font-weight: 700; }

/* kattintásra lenyíló méret-panel */
.machine-grid .m-spec {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    font-weight: 500;
    font-size: .86rem;
    color: var(--muted);
    line-height: 1.5;
    transition: max-height .3s ease, opacity .25s ease, margin-top .3s ease;
}
.machine-grid li.has-spec.open .m-spec {
    max-height: 260px;
    opacity: 1;
    margin-top: 6px;
}
.machine-grid li.has-spec { cursor: pointer; }
.machine-grid li.has-spec::after {
    content: "\25BE";
    margin-left: auto;
    margin-top: .02em;
    align-self: flex-start;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1;
    transition: transform .25s ease, color .25s ease;
}
.machine-grid li.has-spec.open::after {
    transform: rotate(180deg);
    color: var(--teal);
}
.machine-empty {
    text-align: center;
    color: var(--muted);
    margin-top: 28px;
    font-weight: 600;
}

/* ---------- galéria ---------- */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.gallery-item {
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    aspect-ratio: 4 / 3;
    box-shadow: var(--shadow-sm);
}
.gallery-item:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.gallery-item::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(15,30,36,.5), transparent 55%);
    opacity: 0;
    transition: opacity .3s ease;
}
.gallery-item:hover img { transform: scale(1.07); }
.gallery-item:hover::after { opacity: 1; }

/* ---------- partnerek ---------- */
.partners { padding: 54px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.partners-title {
    text-align: center;
    font-family: var(--font-head);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .82rem;
    color: var(--muted);
    margin-bottom: 30px;
}
.partners-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 24px 46px;
}
.partners-row a img {
    height: 30px;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: .65;
    transition: filter .25s ease, opacity .25s ease, transform .25s ease;
}
.partners-row a:hover img { filter: grayscale(0); opacity: 1; transform: scale(1.05); }

/* ---------- kapcsolat ---------- */
.contact-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 44px;
}
.info-card {
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    display: flex;
    gap: 16px;
    align-items: center;
    transition: transform .2s ease, box-shadow .2s ease;
}
.info-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.info-card h4 {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--muted);
    margin: 2px 0 6px;
}
.info-card p { margin: 0; font-weight: 600; font-size: .96rem; }

.map-wrap {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    line-height: 0;
    border: 1px solid var(--line);
}
.map-wrap iframe { width: 100%; height: 420px; display: block; }

/* =========================================================
   LÁBLÉC
   ========================================================= */
.site-footer { background: var(--dark); color: rgba(255,255,255,.72); padding-top: 64px; }
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 46px;
}
.footer-logo {
    width: 62px; height: 62px;
    border-radius: 10px;
    background: #fff;
    padding: 5px;
    margin-bottom: 16px;
}
.footer-about { max-width: 320px; font-size: .95rem; }
.site-footer h4 {
    color: #fff;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    margin-bottom: 16px;
}
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: .95rem; }
.footer-links a { color: rgba(255,255,255,.72); }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; font-size: .85rem; }

/* =========================================================
   LIGHTBOX
   ========================================================= */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(8, 18, 22, .92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 16px;
}
.lightbox[hidden] { display: none; }
.lightbox img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
}
.lightbox-caption { color: #fff; font-weight: 600; }
.lightbox-close {
    position: absolute;
    top: 22px; right: 26px;
    width: 48px; height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.14);
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}
.lightbox-close:hover { background: var(--red); transform: rotate(90deg); }

/* =========================================================
   RESZPONZÍV
   ========================================================= */
@media (max-width: 960px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .gallery { grid-template-columns: repeat(2, 1fr); }
    .gallery-item:first-child { grid-column: span 2; grid-row: auto; aspect-ratio: 16/9; }
}

@media (max-width: 1024px) {
    .nav-toggle { display: flex; }
    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: auto;
        left: auto;
        width: min(340px, 84vw);
        height: 100vh;
        height: 100dvh;
        overflow-y: auto;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 4px;
        background: #fff;
        padding: 96px 22px 30px;
        box-shadow: var(--shadow-lg);
        transform: translateX(100%);
        transition: transform .3s ease;
    }
    .main-nav.open { transform: translateX(0); }
    .nav-link { color: var(--text); font-size: 1.05rem; padding: 14px 12px; border-bottom: 1px solid var(--line); border-radius: 0; }
    .nav-link::after { display: none; }
}

@media (max-width: 780px) {
    .container { padding: 0 18px; }
    .section { padding: 68px 0; }
    .section-head { margin-bottom: 40px; }
    .hero { padding-top: calc(var(--header-h) + 24px); padding-bottom: 56px; }
    .catalog-band { padding: 30px 26px; }
    .contact-info { grid-template-columns: 1fr; }
    .machine-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
    /* érintőképernyőn nincs hover: a méret mindig látszik */
    .machine-grid .m-spec {
        max-height: none;
        overflow: visible;
        opacity: 1;
        margin-top: 4px;
        font-size: .86rem;
    }
    .machine-grid li.has-spec { cursor: default; }
    .machine-grid li.has-spec::after { display: none; }
    .map-wrap iframe { height: 340px; }
}

@media (max-width: 520px) {
    .container { padding: 0 15px; }
    .gallery { grid-template-columns: 1fr; }
    .gallery-item:first-child { aspect-ratio: 16/10; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero-actions .btn { width: 100%; }
    .catalog-band { padding: 26px 20px; }
    .machine-search { padding: 10px 18px; }
}

/* kisméretű telefonok */
@media (max-width: 380px) {
    html { font-size: 15px; }
    .brand-text strong { font-size: 1rem; }
    .brand-text small { display: none; }
    .hero-badges { flex-direction: column; gap: 8px; }
    .section { padding: 56px 0; }
}

/* =========================================================
   NAGY KIJELZŐK (QHD / 4K és feljebb)
   ========================================================= */
@media (min-width: 1600px) {
    html { font-size: 17px; }
    :root { --container: 1360px; --header-h: 86px; }
    .section { padding: 118px 0; }
    .section-head { margin-bottom: 64px; }
}

@media (min-width: 2200px) {
    html { font-size: 18.5px; }
    :root { --container: 1720px; --header-h: 96px; }
    .section { padding: 140px 0; }
    .gallery { gap: 22px; }
    .map-wrap iframe { height: 520px; }
    .card { padding: 42px 36px; }
}

@media (min-width: 3000px) {
    html { font-size: 20px; }
    :root { --container: 2200px; --header-h: 108px; }
    .section { padding: 170px 0; }
    .cards { gap: 34px; }
    .machine-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
    .map-wrap iframe { height: 620px; }
}
