:root{
    --bg:#f6f7f9;
    --panel:#ffffff;
    --text:#111827;
    --muted:#6b7280;
    --border:#e5e7eb;
    --shadow: 0 8px 24px rgba(0,0,0,.06);
}

*{ box-sizing:border-box; }
body{
    margin:0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color:var(--text);
    background:var(--bg);
}

.topnav{
    position: sticky;
    top:0;
    z-index: 50;
    display:flex;
    align-items:center;
    gap:14px;
    padding:10px 16px;
    background:var(--panel);
    border-bottom:1px solid var(--border);
    box-shadow: var(--shadow);
}

.topnav .brand{
    font-weight:700;
    text-decoration:none;
    color:var(--text);
    margin-right: 8px;
}

.nav-link{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:8px 10px;
    border-radius:10px;
    text-decoration:none;
    color:var(--text);
    border:1px solid transparent;
}
.nav-link:hover{
    background:#f3f4f6;
    border-color: var(--border);
}

.has-dropdown{
    position: relative;
}

/* hover “híd” a gomb és a dropdown között, de NEM növeli a menüpont magasságát */
.has-dropdown::after{
    content:"";
    position:absolute;
    left:0;
    top:100%;
    width:100%;
    height:8px;
}

.dropdown{
    display:none;
    position:absolute;
    left:0;
    top:100%;
    min-width: 240px;
    margin:0;            /* nincs rés */
    padding:8px;
    list-style:none;
    background:var(--panel);
    border:1px solid var(--border);
    border-radius:12px;
    box-shadow: var(--shadow);
}

.has-dropdown:hover .dropdown{
    display:block;
}

.dropdown li a{
    display:block;
    padding:8px 10px;
    border-radius:10px;
    text-decoration:none;
    color:var(--text);
}
.dropdown li a:hover{
    background:#f3f4f6;
}

.page{
    max-width: 980px;
    margin: 18px auto;
    padding: 0 16px;
}

.panel{
    background:var(--panel);
    border:1px solid var(--border);
    border-radius:14px;
    padding:16px;
    box-shadow: var(--shadow);
}

hr{
    border:0;
    border-top:1px solid var(--border);
    margin:16px 0;
}

input, select, textarea, button{
    font: inherit;
}

button{
    padding:8px 12px;
    border-radius:10px;
    border:1px solid var(--border);
    background: var(--panel);
    cursor:pointer;
}
button:hover{
    background:#f3f4f6;
}

.app{
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page{
    flex: 1; /* kitolja a láblécet az aljára */
}

.footer{
    border-top: 1px solid var(--border);
    background: var(--panel);
    color: var(--muted);
    padding: 12px 16px;
    background-color: black;
}

.footer .inner{
    max-width: 980px;
    margin: 0 auto;
    padding: 0 16px;
    display:flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.gallery-grid{
    display:grid;
    grid-template-columns: repeat(5, minmax(0, 1fr)); /* alap: 5 egy sorban */
    gap:14px;
    margin-top: 12px;
}

@media (max-width: 1100px){
    .gallery-grid{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 820px){
    .gallery-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px){
    .gallery-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px){
    .gallery-grid{ grid-template-columns: repeat(1, minmax(0, 1fr)); }
}

.gallery-card{
    display:block;
    text-decoration:none;
    color: inherit;
    border:1px solid var(--border);
    border-radius:14px;
    background: var(--panel);
    overflow:hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,.05);
}

.gallery-card:hover{
    background:#f9fafb;
}

.gallery-thumb{
    width:100%;
    height:120px;
    display:block;
    object-fit: contain;
    background:#f3f4f6;
}

.gallery-meta{
    padding:10px 10px 12px;
}

.gallery-desc{
    font-size: 13px;
    color: var(--text);
    line-height: 1.3;
    margin:0;
    word-break: break-word;
}

.gallery-desc.muted{
    color: var(--muted);
}

/* --- Common UI helpers --- */
.stack{ display:flex; flex-direction:column; gap:12px; }
.row{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }

.msg{
    padding:10px 12px;
    border:1px solid var(--border);
    border-radius:12px;
    background:#f9fafb;
}

.form{
    display:flex;
    flex-direction:column;
    gap:12px;
    margin-top: 10px;
}

.field label{
    display:block;
    font-size: 13px;

    color: var(--muted);
    margin-bottom: 6px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="number"],
.field select,
.field textarea{
    width:100%;
    padding:10px 12px;
    border-radius:12px;
    border:1px solid var(--border);
    background:#fff;
    outline:none;
}

.field textarea{ min-height: 90px; resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus{
    border-color:#c7d2fe;
    box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}

.actions{
    display:flex;
    gap:10px;
    align-items:center;
    flex-wrap:wrap;
    margin-top: 4px;
}

.btn{
    padding:10px 12px;
    border-radius:12px;
    border:1px solid var(--border);
    background: #939191;
    cursor:pointer;
}

.btn:hover{ background: #5c5c5e; }

.btn-primary{
    border-color:#c7d2fe;
    background:#eef2ff;
}

.btn-danger{
    border-color:#fecaca;
    background:#fef2f2;
}

.list{
    list-style:none;
    padding:0;
    margin: 0;
    display:flex;
    flex-direction:column;
    gap:10px;
}

.list-item{
    display:flex;
    justify-content: space-between;
    align-items:center;
    gap:12px;
    padding:10px 12px;
    border:1px solid var(--border);
    border-radius:12px;
    background:#fff;
}

.muted{ color: var(--muted); font-size: 13px; }

/* --- Mobile hamburger nav --- */
.nav-toggle{
    display:none;
    margin-left:auto;
    padding:8px 10px;
    border-radius:12px;
    border:1px solid var(--border);
    background:#fff;
    cursor:pointer;
}

.nav-toggle:hover{ background:#f3f4f6; }

.nav-items{
    display:flex;
    gap:10px;
    align-items:center;
}

/* Mobil: összecsukható menü */
@media (max-width: 820px){
    .topnav{
        flex-wrap:wrap;
        gap:10px;
    }

    .nav-toggle{ display:inline-flex; }

    .nav-items{
        width:100%;
        flex-direction:column;
        align-items:stretch;
        gap:8px;
        display:none;              /* alapból csukva */
    }

    /* ha nyitva van */
    .nav-open .nav-items{
        display:flex;
    }

    /* mobilon a dropdown legyen “normál lista” (nem absolute hover) */
    .dropdown{
        position: static;
        display: block;
        min-width: unset;
        margin: 0;
        padding: 6px 0 0 12px;
        border: 0;
        box-shadow: none;
        background: transparent;
    }

    /* hover-nyitás mobilon ne számítson */
    .has-dropdown:hover .dropdown{
        display:block;
    }
}

/* --- Image modal --- */
.modal-backdrop{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 16px;
}

.modal-backdrop.open{ display:flex; }

.modal{
    width: min(1000px, 95vw);
    max-height: 90vh;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.modal-header{
    display:flex;
    justify-content: space-between;
    align-items:center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

.modal-title{
    margin:0;
    font-size: 14px;
    color: var(--muted);
}

.modal-close{
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 12px;
    padding: 6px 10px;
    cursor:pointer;
}
.modal-close:hover{ background:#f3f4f6; }

.modal-body{
    padding: 12px;
}

.modal-img{
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    background: #111;
    border-radius: 12px;
}

.modal-desc{
    margin: 10px 0 0 0;
    color: var(--text);
    font-size: 14px;
    word-break: break-word;
}

/* --- Confirm modal actions --- */
.modal.modal-sm{
    width: min(520px, 95vw);
}

.modal-actions{
    display:flex;
    justify-content:flex-end;
    gap:10px;
    padding:12px;
    border-top:1px solid var(--border);
}

