/* =====================================================================
   Vorlage 4 «Portal Modern» – gleicher Aufbau wie «Portal mit Seitenleiste»,
   aber ruhiger: mehr Weissraum, weiche Karten, klare Schrift, dunkle Leisten.
   Wird nur geladen, wenn im Admin das Design «moderno» gewählt ist.
   Body-Klassen: theme-portal theme-moderno (alle Portal-Regeln gelten weiter).
   ===================================================================== */
body.theme-moderno{
  --font:'Plus Jakarta Sans','Inter',system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --display:var(--font);
  --bg:#F5F7FA; --card:#fff; --ink:#0F172A; --text:#475569; --muted:#8A94A6; --line:#E6EAF0;
  --accent:#0B7BC4; --accent-2:#2D93D8; --accent-dark:#09659F; --accent-soft:#EAF4FB; --accent-line:rgba(11,123,196,.25);
  --kp-red:#E2231A;
  --md-navy:#0F172A; --md-r:16px; --md-r-sm:12px;
  --md-sh:0 1px 2px rgba(15,23,42,.04),0 4px 14px rgba(15,23,42,.05);
  --md-sh-h:0 10px 30px rgba(15,23,42,.12);
  background:var(--bg); color:var(--ink); font-family:var(--font); font-size:15px; line-height:1.5;
}
body.theme-moderno h1,body.theme-moderno h2,body.theme-moderno h3,body.theme-moderno .logo,
body.theme-moderno .btn,body.theme-moderno input,body.theme-moderno select,body.theme-moderno textarea{font-family:var(--font)}
body.theme-moderno .container{max-width:1200px;padding:0 20px}

/* ---------- Schmale dunkle Leiste oben ---------- */
.md-top{background:var(--md-navy);color:#94A3B8;font-size:.78rem}
.md-top-in{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:34px}
.md-top-in span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.md-top nav{display:flex;gap:18px;flex:none}
.md-top a{color:#CBD5E1}
.md-top a:hover{color:#fff}

/* ---------- Kopfzeile ---------- */
body.theme-moderno .site-header{background:rgba(255,255,255,.96);backdrop-filter:saturate(1.4) blur(10px);-webkit-backdrop-filter:saturate(1.4) blur(10px);border-bottom:1px solid var(--line);box-shadow:0 1px 0 rgba(15,23,42,.02)}
body.theme-moderno .hdr{height:72px;gap:18px}
body.theme-moderno .logo,body.theme-moderno .logo span{color:var(--accent);font-weight:800;letter-spacing:-.02em}
body.theme-moderno .hdr-search{max-width:600px;border:1px solid var(--line);border-radius:var(--md-r-sm);background:#F8FAFC;padding:4px;transition:border-color .15s,box-shadow .15s,background .15s}
body.theme-moderno .hdr-search:focus-within{background:#fff;border-color:var(--accent);box-shadow:0 0 0 4px var(--accent-soft)}
body.theme-moderno .hdr-search input{padding:8px 12px;font-size:.92rem;color:var(--ink)}
body.theme-moderno .hdr-search button{background:var(--accent);color:#fff;border-radius:9px;padding:0 16px}
body.theme-moderno .hdr-search button:hover{background:var(--accent-dark)}
body.theme-moderno .hdr-nav{gap:4px}
body.theme-moderno .hdr-nav a:not(.btn),body.theme-moderno .loc-btn{color:var(--text);font-weight:600;border-radius:10px}
body.theme-moderno .hdr-nav a:not(.btn):hover,body.theme-moderno .loc-btn:hover{background:#F1F5F9;color:var(--ink)}
body.theme-moderno .loc-btn{background:transparent;border:1px solid var(--line);padding:8px 12px}

/* ---------- Knöpfe ---------- */
body.theme-moderno .btn{border-radius:999px;font-weight:600;box-shadow:none;border-color:var(--line)}
body.theme-moderno .btn-primary,body.theme-moderno .hdr-nav .btn-primary{background:var(--kp-red);border-color:var(--kp-red);color:#fff;border-radius:999px;font-weight:700;box-shadow:0 6px 16px rgba(226,35,26,.22)}
body.theme-moderno .btn-primary:hover{background:#C41C14;border-color:#C41C14;color:#fff;transform:translateY(-1px);box-shadow:0 10px 22px rgba(226,35,26,.28)}
body.theme-moderno .hdr-post{height:42px;padding:0 20px}

/* ---------- Seitenleiste mit Kategorien ---------- */
body.theme-moderno .pt-wrap{grid-template-columns:250px minmax(0,1fr);gap:24px;padding-top:24px;padding-bottom:48px}
body.theme-moderno .pt-box{background:#fff;border:1px solid var(--line);border-radius:var(--md-r);padding:18px 14px;box-shadow:var(--md-sh)}
body.theme-moderno .pt-box h3{font-size:.72rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);margin:0 6px 10px}
body.theme-moderno .pt-cats li>a{margin:0;padding:7px 8px;border-radius:10px;color:#334155;font-size:.86rem;font-weight:500;gap:10px}
body.theme-moderno .pt-cats li:hover>a{background:var(--accent-soft);color:var(--accent-dark)}
body.theme-moderno .pt-box li a:hover{text-decoration:none}
body.theme-moderno .pt-ico{width:28px;height:28px;flex:none;display:grid;place-items:center;border-radius:8px;background:#F1F5F9;color:var(--accent)}
body.theme-moderno .pt-ico svg{width:16px;height:16px}
body.theme-moderno .pt-cats li:hover .pt-ico{background:#fff}
body.theme-moderno .pt-cats li.has-sub>a::after{color:#CBD5E1}
body.theme-moderno .pt-cats li:hover.has-sub>a::after{color:var(--accent)}
body.theme-moderno .pt-box .pt-fly{border-radius:var(--md-r);border:1px solid var(--line);box-shadow:var(--md-sh-h)}
body.theme-moderno .pt-cta{background:var(--md-navy);border:0;color:#fff;padding:22px 18px;position:relative;overflow:hidden}
body.theme-moderno .pt-cta::after{content:"";position:absolute;right:-40px;bottom:-40px;width:130px;height:130px;border-radius:50%;border:18px solid rgba(255,255,255,.06)}
body.theme-moderno .pt-cta b{color:#fff;font-size:1.05rem}
body.theme-moderno .pt-cta p{color:#94A3B8;margin:6px 0 14px}

/* ---------- Kacheln oben (zwei Kategorien) ---------- */
body.theme-moderno .pt-tile{border-radius:var(--md-r);border:1px solid var(--line);box-shadow:var(--md-sh);background:#fff;overflow:hidden;transition:box-shadow .2s,transform .2s}
body.theme-moderno .pt-tile:hover{box-shadow:var(--md-sh-h);transform:translateY(-2px)}
body.theme-moderno .pt-tile-t b{font-size:1.1rem;font-weight:800;color:var(--ink)}
body.theme-moderno .pt-tile-t span{color:var(--muted)}
body.theme-moderno .pt-tile-t em{background:var(--accent-soft);color:var(--accent-dark);border-radius:999px;font-weight:700;font-style:normal}
body.theme-moderno .pt-count{color:var(--muted);font-size:.85rem;margin:6px 2px 14px}

/* ---------- Abschnitte (Najnoviji oglasi, Kategorie-Reihen) ---------- */
body.theme-moderno .pt-sec{background:#fff;border:1px solid var(--line);border-radius:20px;padding:24px;margin-bottom:22px;box-shadow:var(--md-sh)}
body.theme-moderno .pt-h{margin-bottom:18px;align-items:flex-end}
body.theme-moderno .pt-h h2{font-size:1.2rem;font-weight:800;letter-spacing:-.01em;color:var(--ink);display:flex;flex-direction:column;gap:6px}
body.theme-moderno .pt-h h2::before{content:"";width:28px;height:3px;border-radius:3px;background:var(--kp-red)}
body.theme-moderno .pt-h a{background:var(--accent-soft);color:var(--accent-dark);font-weight:700;font-size:.8rem;padding:6px 12px;border-radius:999px;white-space:nowrap}
body.theme-moderno .pt-h a:hover{background:var(--accent);color:#fff}

/* ---------- Inserat-Karten ---------- */
body.theme-moderno .pt-grid{gap:20px}
body.theme-moderno .pt-grid .card{border-radius:14px;padding:0;transition:transform .2s ease}
body.theme-moderno .pt-grid .card:hover{transform:translateY(-3px);box-shadow:none}
body.theme-moderno .pt-grid .card-img,body.theme-moderno .pt-grid .card-img img{border-radius:14px}
body.theme-moderno .pt-grid .card-img{background:#EEF2F6;box-shadow:0 1px 2px rgba(15,23,42,.06)}
body.theme-moderno .pt-grid .card:hover .card-img{box-shadow:var(--md-sh-h)}
body.theme-moderno .pt-grid .card-body{padding:10px 2px 0}
body.theme-moderno .pt-grid .card-title{font-size:.86rem;font-weight:600;color:var(--ink);line-height:1.35}
body.theme-moderno .pt-grid .card:hover .card-title{color:var(--accent-dark)}
body.theme-moderno .pt-grid .chip-price{font-size:1rem;font-weight:800;color:var(--kp-red);padding-top:6px}
body.theme-moderno .pt-grid .chip-price.txt{font-size:.82rem;font-weight:600;color:var(--muted)}
body.theme-moderno .pt-grid .card-loc{font-size:.74rem;color:var(--muted);margin-top:2px}
body.theme-moderno .card-img .noimg{border-radius:14px;background:#EEF2F6;color:#C3CBD6}
body.theme-moderno .badge-feat{background:var(--kp-red);color:#fff;border-radius:999px;font-weight:700}
body.theme-moderno .sold{border-radius:999px}

/* Karten in Suche / Kategorien (Raster und Liste) */
body.theme-moderno .cards .card{border:1px solid var(--line);border-radius:var(--md-r);box-shadow:var(--md-sh)}
body.theme-moderno .cards .card:hover{border-color:var(--accent-line);box-shadow:var(--md-sh-h)}
body.theme-moderno .cards .card-title{color:var(--ink)}
body.theme-moderno .card-price,body.theme-moderno .chip-price{color:var(--kp-red)}

/* ---------- Suche, Filter, Seitennavigation ---------- */
body.theme-moderno .pt-search,body.theme-moderno .filters{background:#fff;border:1px solid var(--line);border-radius:var(--md-r);box-shadow:var(--md-sh)}
body.theme-moderno .sform input,body.theme-moderno .sform select,body.theme-moderno .pt-search input{border-radius:var(--md-r-sm);border-color:var(--line);background:#F8FAFC}
body.theme-moderno .sform input:focus,body.theme-moderno .sform select:focus{background:#fff;border-color:var(--accent);box-shadow:0 0 0 4px var(--accent-soft);outline:0}
body.theme-moderno .pager a{border-radius:10px;border-color:var(--line);font-weight:600}
body.theme-moderno .pager a.on{background:var(--accent);border-color:var(--accent)}
body.theme-moderno .crumbs a{color:var(--accent)}

/* ---------- Inseratsseite ---------- */
body.theme-moderno .im-card,body.theme-moderno .side-card,body.theme-moderno .gallery{background:#fff;border:1px solid var(--line);border-radius:var(--md-r);box-shadow:var(--md-sh)}
body.theme-moderno .item-title{font-weight:800;color:var(--ink);letter-spacing:-.01em}
body.theme-moderno .item-price-mobile{color:var(--kp-red);font-weight:800}
body.theme-moderno .g-thumbs button{border-radius:10px}
body.theme-moderno .g-thumbs button.on{border-color:var(--accent)}
body.theme-moderno .side-card .btn-primary{background:var(--accent);border-color:var(--accent);box-shadow:0 6px 16px rgba(11,123,196,.22)}
body.theme-moderno .side-card .btn-primary:hover{background:var(--accent-dark);border-color:var(--accent-dark)}

/* ---------- Formulare & Konto ---------- */
body.theme-moderno .form-box,body.theme-moderno .my-item,body.theme-moderno .stat{border-radius:var(--md-r);border-color:var(--line);box-shadow:var(--md-sh)}
body.theme-moderno .form input[type=text],body.theme-moderno .form input[type=email],body.theme-moderno .form input[type=password],body.theme-moderno .form input[type=tel],body.theme-moderno .form input[type=number],body.theme-moderno .form select,body.theme-moderno .form textarea{border-radius:var(--md-r-sm);border-color:var(--line)}
body.theme-moderno .notice{border-radius:var(--md-r-sm)}

/* ---------- Fusszeile (dunkel) ---------- */
body.theme-moderno .site-footer{margin-top:40px;background:var(--md-navy);border-top:0;color:#94A3B8;padding:52px 0 26px}
body.theme-moderno .site-footer .logo,body.theme-moderno .site-footer .logo span{color:#fff}
body.theme-moderno .site-footer .logo span{color:#5FB6EC}
body.theme-moderno .ft-brand p{color:#94A3B8}
body.theme-moderno .ft-col h4{color:#fff;font-size:.78rem;letter-spacing:.08em;text-transform:uppercase;font-weight:800;position:relative;padding-bottom:10px}
body.theme-moderno .ft-col h4::after{content:"";position:absolute;left:0;bottom:0;width:22px;height:3px;border-radius:3px;background:var(--kp-red)}
body.theme-moderno .ft-col a{color:#CBD5E1}
body.theme-moderno .ft-col a:hover{color:#fff}
body.theme-moderno .foot-bottom{border-top:1px solid rgba(255,255,255,.08);padding-top:18px;margin-top:28px;color:#64748B}
body.theme-moderno .foot-bottom a{color:#94A3B8}
body.theme-moderno .foot-bottom a.on{color:#fff}

/* ---------- Mobil ---------- */
body.theme-moderno .mnav{background:rgba(255,255,255,.97);border-top:1px solid var(--line)}
body.theme-moderno .mnav-post i{background:var(--kp-red);box-shadow:0 6px 16px rgba(226,35,26,.3)}
@media (max-width:900px){
  .md-top{display:none}
  body.theme-moderno .pt-wrap{grid-template-columns:minmax(0,1fr);gap:16px;padding-top:14px}
  body.theme-moderno .hdr{height:auto;padding:10px 0}
  body.theme-moderno .pt-sec{padding:16px;border-radius:16px}
  body.theme-moderno .pt-grid{gap:14px}
  body.theme-moderno .container{padding:0 14px}
}
@media (max-width:560px){
  body.theme-moderno .pt-h h2{font-size:1.05rem}
  body.theme-moderno .site-footer{padding-top:36px}
}
@media (prefers-reduced-motion:reduce){body.theme-moderno *{transition:none !important}}
body.theme-moderno .crumbs{padding-top:16px}
