/* ============================================================
   app.css – Publikus oldal stílus (minimális, bővíthető alap)
   ============================================================ */

:root {
    --color-primary:    #2563eb;
    --color-secondary:  #1e40af;
    --color-accent:     #f59e0b;
    --color-success:    #16a34a;
    --color-danger:     #dc2626;
    --color-warning:    #d97706;
    --color-text:       #1f2937;
    --color-muted:      #6b7280;
    --color-border:     #e5e7eb;
    --color-bg:         #f9fafb;
    --color-white:      #ffffff;
    --font-main:        'Segoe UI', system-ui, sans-serif;
    --radius:           8px;
    --shadow:           0 1px 3px rgba(0,0,0,.1);
}

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

body {
    font-family: var(--font-main);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
}

/* ---- Konténer ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* ---- Fejléc ---- */
.site-header { background: var(--color-white); border-bottom: 1px solid var(--color-border); }

/* Banner */
.banner-rotation {
    position: relative;
    overflow: hidden;
    background: #111;
    max-height: 200px;
}
.banner-track { display: flex; gap: 8px; padding: 8px; }
.banner-slide { flex: 0 0 calc(50% - 4px); }
.banner-slide img { width: 100%; height: 120px; object-fit: cover; border-radius: var(--radius); }
.banner-prev, .banner-next {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,.5); color: #fff; border: none;
    font-size: 1.5rem; padding: 4px 12px; cursor: pointer; border-radius: 4px;
}
.banner-prev { left: 4px; }
.banner-next { right: 4px; }

/* Navigáció */
.main-nav {
    display: flex; align-items: center; gap: 1rem;
    padding: .75rem 1rem;
}
.nav-logo img { height: 40px; width: auto; }
.nav-list { display: flex; list-style: none; gap: 1.5rem; margin-left: auto; }
.nav-item > a {
    text-decoration: none; color: var(--color-text); font-weight: 500;
    padding: .25rem 0;
}
.nav-item > a:hover { color: var(--color-primary); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; font-size: 1.5rem; }
.has-dropdown { position: relative; }
.dropdown {
    display: none; position: absolute; top: 100%; left: 0;
    background: var(--color-white); border: 1px solid var(--color-border);
    border-radius: var(--radius); box-shadow: var(--shadow); list-style: none; min-width: 160px;
}
.has-dropdown:hover .dropdown { display: block; }
.dropdown a { display: block; padding: .5rem 1rem; text-decoration: none; color: var(--color-text); }
.dropdown a:hover { background: var(--color-bg); }

/* Kereső sáv */
.search-bar { background: var(--color-primary); padding: .75rem 1rem; }
.search-form { max-width: 1200px; margin: 0 auto; }
.search-fields { display: flex; gap: .5rem; flex-wrap: wrap; }
.search-select {
    flex: 1; min-width: 160px; padding: .5rem .75rem;
    border: 1px solid #93c5fd; border-radius: var(--radius);
    background: var(--color-white); font-size: .95rem;
}

/* ---- Gombok ---- */
.btn {
    display: inline-flex; align-items: center; gap: .25rem;
    padding: .5rem 1.25rem; border-radius: var(--radius);
    font-size: .95rem; font-weight: 500; cursor: pointer;
    text-decoration: none; border: 2px solid transparent; transition: .15s;
}
.btn-primary  { background: var(--color-primary);   color: #fff;                   }
.btn-primary:hover { background: var(--color-secondary); }
.btn-outline  { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: #fff; }
.btn-danger   { background: var(--color-danger);    color: #fff; border-color: var(--color-danger); }
.btn-sm       { padding: .3rem .75rem; font-size: .85rem; }
.btn-lg       { padding: .75rem 2rem; font-size: 1.05rem; }

/* ---- Alert ---- */
.alert {
    padding: 1rem 1.25rem; margin: .5rem 0;
    border-radius: var(--radius); display: flex; align-items: center; gap: 1rem;
}
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-close   { margin-left: auto; background: none; border: none; cursor: pointer; font-size: 1.2rem; }

/* ---- Hirdetés rács ---- */
.ad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.ad-card {
    background: var(--color-white); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
}
.ad-card-img { display: block; height: 180px; overflow: hidden; background: #e5e7eb; }
.ad-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.ad-card-img:hover img { transform: scale(1.03); }
.ad-card-no-img { display: flex; align-items: center; justify-content: center;
                  height: 180px; color: var(--color-muted); font-size: .9rem; }
.ad-card-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; gap: .5rem; }
.ad-card-title { font-size: 1rem; font-weight: 600; }
.ad-card-title a { text-decoration: none; color: var(--color-text); }
.ad-card-title a:hover { color: var(--color-primary); }
.ad-card-partner { color: var(--color-muted); font-size: .85rem; }
.ad-card-desc { font-size: .9rem; color: var(--color-muted); flex: 1; }

/* ---- Lapozó ---- */
.pagination { display: flex; gap: .5rem; justify-content: center; margin-top: 2rem; }
.page-btn {
    padding: .4rem .8rem; border-radius: var(--radius);
    text-decoration: none; color: var(--color-primary);
    border: 1px solid var(--color-border);
}
.page-btn.active { background: var(--color-primary); color: #fff; }

/* ---- Hirdetés részlet ---- */
.ad-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin: 2rem auto; }
.ad-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .5rem; }
.gallery-item img { width: 100%; height: 140px; object-fit: cover; border-radius: var(--radius); }
.badge {
    display: inline-block; padding: .2rem .6rem; border-radius: 20px;
    font-size: .8rem; font-weight: 500;
}
.badge-category { background: #dbeafe; color: #1d4ed8; }
.badge-location  { background: #d1fae5; color: #065f46; }

/* ---- Lábléc ---- */
.site-footer { background: #1f2937; color: #d1d5db; margin-top: 4rem; padding: 2rem 1rem; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer-nav ul { list-style: none; display: flex; gap: 1.5rem; }
.footer-nav a { color: #9ca3af; text-decoration: none; }
.footer-nav a:hover { color: #fff; }

/* ---- Segédosztályok ---- */
.text-center { text-align: center; }
.text-muted  { color: var(--color-muted); }
.text-danger { color: var(--color-danger); }
.mt-4        { margin-top: 1.5rem; }
.section     { padding: 3rem 0; }
.section-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ---- Reszponzív ---- */
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-list   { display: none; flex-direction: column; position: absolute;
                  top: 100%; left: 0; right: 0; background: #fff;
                  border-top: 1px solid var(--color-border); padding: 1rem; z-index: 99; }
    .nav-list.is-open { display: flex; }
    .ad-detail  { grid-template-columns: 1fr; }
    .search-fields { flex-direction: column; }
}
