:root {
    --red: #d92b1f;
    --red-dark: #b3221a;
    --ink: #1c1c1c;
    --text: #3a3a3a;
    --muted: #6b6b6b;
    --bg: #f5f5f3;
    --card: #ffffff;
    --line: #e4e4e0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

img {
    max-width: 100%;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--red);
}

a:hover {
    color: var(--red-dark);
}

#content {
    flex: 1;
}

.footer {
    padding: 2.5rem 2rem 1.5rem;
    background: var(--ink);
    color: #cfcfcf;
    border-top: 4px solid var(--red);
    line-height: 1.7;
    font-size: 0.95rem;
}

.footer-contact,
.footer-copyright {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.footer strong {
    color: #fff;
}

.footer a {
    color: #fff;
}

.footer a:hover {
    color: #ff8a80;
}

.footer-contact {
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #3a3a3a;
}

.footer-company {
    margin-bottom: 0.75rem;
    font-size: 1.6rem;
    letter-spacing: 0.08em;
    color: #fff;
}

.footer-copyright {
    font-size: 0.85rem;
    color: #8f8f8f;
}

#navbar {
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 2rem;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.navbar a {
    text-decoration: none;
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.navbar-logo {
    height: 44px;
    width: auto;
}

.navbar-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    list-style: none;
    grid-column: 2;
}

.navbar-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: none;
    background: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
}

.navbar-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}

.navbar.open .navbar-toggle span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.navbar.open .navbar-toggle span:nth-child(2) {
    opacity: 0;
}

.navbar.open .navbar-toggle span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

.navbar-links a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--ink);
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.navbar-links a:hover {
    color: var(--red);
    border-bottom-color: var(--red);
}

#content {
    padding: 3rem 1.5rem;
}

.home,
.termekek,
.kapcsolat,
.palyazat {
    max-width: 900px;
    margin: 0 auto;
    padding: 2.5rem 3rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-top: 4px solid var(--red);
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.home h1,
.termekek h1,
.kapcsolat h1,
.palyazat h1 {
    margin-bottom: 1.5rem;
    font-size: clamp(1.5rem, 4vw + 0.5rem, 2rem);
    color: var(--ink);
}

.home h1::after,
.termekek h1::after,
.kapcsolat h1::after,
.palyazat h1::after {
    content: '';
    display: block;
    width: 56px;
    height: 4px;
    margin-top: 0.6rem;
    background: var(--red);
    border-radius: 2px;
}

.home h2,
.kapcsolat h2,
.palyazat h2 {
    margin: 2rem 0 0.75rem;
    font-size: 1.3rem;
    color: var(--ink);
}

.home p,
.termekek p,
.kapcsolat p,
.palyazat p {
    margin-bottom: 1rem;
}

.home strong,
.kapcsolat strong,
.palyazat strong {
    color: var(--ink);
}

.home ul {
    margin: 0 0 1.25rem 1.25rem;
}

.home li {
    margin-bottom: 0.35rem;
    padding-left: 0.25rem;
}

.home li::marker {
    color: var(--red);
}

.termekek p {
    color: var(--muted);
}

.termekek {
    max-width: 1100px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.product-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    font: inherit;
    text-align: left;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 6px;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.product-card:hover,
.product-card:focus-visible {
    border-color: var(--red);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.product-card img,
.product-card video {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: var(--bg);
}

.product-thumb {
    position: relative;
}

.product-thumb::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3rem;
    height: 3rem;
    transform: translate(-50%, -50%);
    background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 6.5v11l9-5.5z'/%3E%3C/svg%3E") center / 100% no-repeat;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    pointer-events: none;
    transition: background-color 0.2s;
}

.product-card:hover .product-thumb::after,
.product-card:focus-visible .product-thumb::after {
    background-color: var(--red);
}

.product-section-title {
    margin: 2.5rem 0 1rem;
    font-size: 1.3rem;
    color: var(--ink);
}

.product-card .product-title {
    padding: 0.75rem 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink);
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.88);
}

.lightbox img,
.lightbox video {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 6rem);
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-media {
    display: flex;
    justify-content: center;
    max-width: 100%;
}

.lightbox-caption {
    color: #fff;
    text-align: center;
}

.lightbox button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: absolute;
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.75rem;
    line-height: 1;
    color: #fff;
    background: var(--ink);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    cursor: pointer;
}

.lightbox button:hover {
    background: var(--red);
}

.lightbox-close {
    top: 1rem;
    right: 1rem;
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

.kapcsolat p {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--bg);
    border-left: 3px solid var(--red);
    border-radius: 0 4px 4px 0;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.contact-card {
    padding: 1.5rem;
    text-align: center;
    background: var(--bg);
    border: 1px solid var(--line);
    border-top: 3px solid var(--red);
    border-radius: 6px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.contact-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.contact-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
}

.contact-avatar svg {
    width: 34px;
    height: 34px;
}

.contact-name {
    font-size: 1.15rem;
    color: var(--ink);
}

.contact-role {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.contact-list {
    list-style: none;
    text-align: left;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0;
    border-top: 1px solid var(--line);
}

.contact-list svg {
    flex: none;
    width: 18px;
    height: 18px;
    color: var(--red);
}

.contact-list a {
    color: var(--text);
    text-decoration: none;
}

.contact-list a:hover {
    color: var(--red);
}

.map-block {
    margin-bottom: 1.5rem;
}

.map-wrap {
    position: relative;
}

.map-open {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.map-open:hover {
    color: var(--red);
}

.map-title {
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
    color: var(--ink);
}

.map-frame {
    display: block;
    width: 100%;
    height: 350px;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.map-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--red);
}

.palyazat-logo {
    display: block;
    margin-left: auto;
    margin-top: 2rem;
    max-width: 600px;
    width: 100%;
    height: auto;
}

.popup-logo {
    position: fixed;
    right: 0;
    bottom: 0;
    z-index: 1000;
    width: 280px;
    max-width: 100%;
}

.popup-logo img {
    display: block;
    width: 100%;
    height: auto;
}

.popup-close {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.popup-close:hover {
    background: var(--red);
}

@media (min-width: 1400px) {
    .home,
    .termekek,
    .kapcsolat,
    .palyazat {
        max-width: 1000px;
    }
}

@media (max-width: 900px) {
    .navbar {
        padding: 0.75rem 1.25rem;
    }

    #content {
        padding: 2rem 1rem;
    }

    .home,
    .termekek,
    .kapcsolat,
    .palyazat {
        padding: 2rem 1.75rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .navbar-toggle {
        display: flex;
    }

    .navbar-links {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0;
        padding-bottom: 0.5rem;
    }

    .navbar.open .navbar-links {
        display: flex;
    }

    .navbar-links a {
        padding: 0.85rem 0.5rem;
        border-bottom: 1px solid var(--line);
    }

    .navbar-links a:hover {
        border-bottom-color: var(--line);
    }
}

@media (max-width: 600px) {
    .navbar {
        padding: 0.5rem 0.75rem;
    }

    .navbar-logo {
        height: 38px;
    }

    #content {
        padding: 1rem 0.5rem 1.5rem;
    }

    .home,
    .termekek,
    .kapcsolat,
    .palyazat {
        padding: 1.5rem 1.1rem;
        line-height: 1.6;
    }

    .kapcsolat p {
        padding: 0.6rem 0.75rem;
    }

    .footer {
        padding: 2rem 1rem 1.25rem;
    }

    .palyazat-logo {
        margin-left: auto;
        margin-right: auto;
    }
}
