#nav-toggle { display: none; }

@media screen and (max-width: 768px) {
    /* Alap beállítások a mobil nézethez */
    html, body {
        width: 100%;
        overflow-x: hidden;
        margin: 0;
        padding: 0;
        font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; /* Modernebb betűtípus */
        background-color: #f4f4f4; /* Világos szürke háttér a textúra helyett */
        color: #333;
    }

    /* Fő konténerek szélességének rugalmassá tétele és hátterek tisztítása */
    #header_bg, #menu_bg, #content, #footer, #header, #menu, #main {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
        padding-left: 0;
        padding-right: 0;
        background-image: none !important; /* Régi textúrák eltávolítása */
    }

    /* Fejléc modernizálása */
    #header_bg {
        background-color: #222;
        padding: 15px 0;
    }
    
    #header {
        height: auto !important;
    }

    #logo {
        text-align: center;
        height: auto !important;
        padding: 0 !important;
        /* Logó kiemelése a header.jpg-ből */
        background-image: url('images/header.jpg') !important;
        background-position: center top !important; /* Vagy próbáld: center -20px */
        background-size: cover !important;
        background-repeat: no-repeat !important;
        filter: contrast(1.5) brightness(1.2); /* Kontraszt és fényerő növelése */
    }
    #logo h1 {
        float: none !important;
        text-align: center !important;
        display: block;
        margin: 5px 0;
        font-size: 22px;
        color: #fff !important; 
        text-shadow: 2px 2px 4px #000; /* Szöveg árnyékolása az olvashatóságért */
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    /* Menü modernizálása */
    #menu_bg {
        height: auto !important;
        background-color: #333;
        margin-bottom: 20px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    #menu {
        height: auto !important;
        padding: 10px;
    }
    #menu ul {
        padding: 0;
        text-align: center;
        display: none;
        flex-direction: column;
        gap: 10px;
    }
    
    #menu.open ul {
        display: flex;
    }

    #nav-toggle {
        display: block;
        width: 30px;
        height: 24px;
        margin: 10px auto;
        cursor: pointer;
    }
    #nav-toggle span {
        display: block;
        width: 100%;
        height: 4px;
        background-color: #fff;
        margin-bottom: 5px;
        border-radius: 2px;
    }

    #menu li {
        float: none !important;
        display: block;
        margin: 0;
        background: none !important;
    }
    #menu li a {
        display: block;
        padding: 12px 20px;
        background-color: #701212; /* Megtartjuk a brand színt */
        color: #fff;
        border-radius: 6px;
        border: none !important;
        text-decoration: none;
        font-size: 16px;
        width: 100% !important;
        box-sizing: border-box;
        float: none !important;
        height: auto !important;
        transition: background-color 0.3s, transform 0.2s;
        box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    }
    #menu li a:hover {
        background-color: #8a1c1c;
        transform: translateY(-2px);
    }

    /* Tartalom elrendezés */
    #main {
        display: flex;
        flex-direction: column;
        padding: 0 15px;
    }
    #right, #left {
        float: none !important;
        width: 100% !important;
        margin: 0 !important;
    }

    /* Kártya design a tartalmi elemeknek (.bor) */
    .bor {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
        background-color: #fff !important;
        border: none !important;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.05);
        padding: 20px !important;
        margin-bottom: 25px !important;
        overflow: hidden;
    }

    /* Címsorok stílusa a kártyákon belül */
    .bor h3, .bor h4 {
        background: none !important;
        color: #222 !important;
        border-bottom: 2px solid #701212;
        padding-bottom: 10px;
        margin-bottom: 15px;
        font-size: 18px;
        text-align: left !important;
        width: 100% !important;
        height: auto !important;
        font-weight: 600;
    }

    /* Képek automatikus méretezése */
    img {
        max-width: 100% !important;
        height: auto !important;
        border-radius: 4px;
    }
    
    /* Footer */
    #footer {
        background-color: #222 !important;
        color: #aaa;
        padding: 30px 15px;
        height: auto !important;
        text-align: center;
        margin-top: 20px;
    }
    #footer p {
        color: #aaa;
        line-height: 1.6;
    }
    #footer a {
        color: #fff;
        text-decoration: underline;
    }
}

/* SimpleViewer Galéria Feliratok (Captions) */
.sv-caption {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    width: 100% !important;
    background-color: rgba(0, 0, 0, 0.75) !important;
    padding: 12px !important;
    box-sizing: border-box;
    text-align: left !important;
    margin-top: -5px; /* Hogy közelebb legyen a képhez */
    z-index: 100;
}

.sv-caption, .sv-title, .sv-description, .sv-index {
    font-size: 15px !important;
    line-height: 1.6 !important;
    color: #fff !important;
    text-shadow: none !important;
    white-space: normal !important; /* Engedélyezi a sortörést */
    word-wrap: break-word; /* Tördeli a hosszú szavakat */
}

.sv-title, .sv-description {
    display: block;
    padding-right: 45px; /* Hely a számlálónak */
}

/* Modern Galéria Stílusok (SimpleViewer helyett) */
.modern-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    padding: 10px 0;
}

.gallery-item {
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 4px;
    box-sizing: border-box;
}

.gallery-item img {
    width: 100% !important;
    height: auto !important;
    display: block;
    border-radius: 2px;
}

.gallery-caption {
    margin-top: 10px;
    font-size: 14px;
    color: #555;
    text-align: center;
    line-height: 1.4;
    font-weight: normal;
}

/* Asztali nézetben 2 oszlopos elrendezés */
@media screen and (min-width: 769px) {
    .gallery-item {
        width: calc(50% - 15px);
    }
}