:root {
    --primary-color: #ba0810;
    --secondary-color: #343a40;
    --accent-color: #f8f9fa;
    --text-color: #212529;
    --light-gray: #e9ecef;
    --dark-gray: #495057;
    --white: #ffffff;
    --black: #000000;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px; /* Increased padding to indent from edges */
}

/* Header & Navigation */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    font-weight: 500;
    color: var(--secondary-color);
    font-size: 0.95rem;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    position: relative;
    height: 400px;
    background-color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: brightness(0.5);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 20px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.hero .phone {
    font-size: 1.5rem;
    font-weight: 700;
    background-color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 5px;
    display: inline-block;
}

/* Sections */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 10px auto 0;
}

/* Content Grid */
.grid {
    display: grid;
    gap: 30px;
}

/* 3 column grid that jumps to 1 column to avoid 2-1 layout */
.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* 6 column grid (counties) 3 -> 2 -> 1 */
.grid-6 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 992px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }
    .grid-6 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .grid-6 {
        grid-template-columns: 1fr;
    }
}

.card {
    background-color: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
    border: 1px solid var(--light-gray);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 in a row */
    gap: 15px;
}

@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 in a row */
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr; /* 1 in a row */
    }
}

.gallery-item {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    color: var(--white);
    font-size: 1.5rem;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80%;
    position: relative;
}

.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 20px;
    pointer-events: none;
}

.lightbox-btn {
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    pointer-events: auto;
    transition: var(--transition);
}

.lightbox-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Contact Form */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.contact-info p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 500;
}

.form-group input, .form-group textarea {
    padding: 12px;
    border: 1px solid var(--light-gray);
    border-radius: 5px;
    font-family: inherit;
}

.btn-submit {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 15px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-submit:hover {
    background-color: #004494;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 50px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: var(--white-color);
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    color: #fff;
}

/* Responsive */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 30px; /* Indent on mobile too */
    }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        padding: 0;
        box-shadow: 0 10px 20px rgba(0,0,0,0.15);
        gap: 0;
        z-index: 1000;
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid #eee;
    }

    .nav-links li:nth-child(even) {
        background-color: #f9f9f9;
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        display: block;
        padding: 15px 30px;
        width: 100%;
        font-size: 1.1rem;
    }

    .nav-links a:hover {
        background-color: #f0f0f0;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }
    .hero {
        height: 350px;
        min-width: 300px; /* Ensure 300px optimization */
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }
}

/* PROJEKT SZÁMLÁLÓ */
        :root {
            --well-blue: #ba0810;
            --water-light: #f0f8ff;
            --text-main: #2c3e50;
        }

        .counter-section {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            background-color: #ffffff;
            padding: 80px 20px;
            display: flex;
            justify-content: center;
        }

        .counter-container {
            max-width: 1100px;
            width: 100%;
            display: grid;
            /* ALAPHELYZET: Fixen 3 oszlop asztali nézetben */
            grid-template-columns: repeat(3, 1fr); 
            gap: 25px;
        }

        .counter-card {
            background: #ffffff;
            padding: 50px 25px;
            border-radius: 10px;
            text-align: center;
            border: 1px solid #e1e8ed;
            box-shadow: 0 12px 30px rgba(0, 119, 182, 0.08);
            transition: all 0.4s ease;
        }

        .counter-card:hover {
            transform: translateY(-10px);
            border-color: var(--well-blue);
            box-shadow: 0 15px 40px rgba(0, 119, 182, 0.15);
        }

        /* EGYEDI SVG IKONOK KERETE */
        .icon-wrapper {
            width: 64px;
            height: 64px;
            margin: 0 auto 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--water-light);
            border-radius: 16px;
            color: var(--well-blue);
        }

        .icon-wrapper svg {
            width: 36px;
            height: 36px;
            fill: none;
            stroke: currentColor;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        /* SZÁMOK ÉS FELIRATOK */
        .counter-number {
            font-size: 3.2rem;
            font-weight: 800;
            color: var(--text-main);
            margin: 10px 0;
            display: block;
            line-height: 1;
        }

        .counter-label {
            font-size: 1rem;
            font-weight: 600;
            color: #5a7184;
            text-transform: uppercase;
            letter-spacing: 0.8px;
        }

        /* TÖRDELÉSI LOGIKA (Reszponzivitás) */
        @media (max-width: 990px) {
            .counter-number { font-size: 2.6rem; }
        }

        /* 768px alatt rögtön 1 oszlopos lesz */
        @media (max-width: 768px) {
            .counter-container {
                grid-template-columns: 1fr;
                max-width: 450px;
            }
            .counter-section { padding: 40px 20px; }
            .counter-card { padding: 40px 20px; }
        }