/* =========================================================================
   Holdeinhak Community – Styling
   FARBEN: Nur diese Variablen ändern, dann passt sich alles an euer Design an.
   ========================================================================= */
:root {
    --hdh-primary:      #16a34a;
    --hdh-primary-dark: #15803d;
    --hdh-accent:       #f59e0b;
    --hdh-ink:          #1f2430;
    --hdh-muted:        #6b7280;
    --hdh-surface:      #f6f7f9;
    --hdh-border:       #e5e7eb;
    --hdh-radius:       14px;
    --hdh-shadow:       0 4px 18px rgba(20,30,50,.07);
}

.hdh-wrap { max-width: 1040px; margin: 0 auto; padding: 28px 18px; color: var(--hdh-ink); }
.hdh-panel, .hdh-form, .hdh-leaderboard, .hdh-feed, .hdh-card { color: var(--hdh-ink); }
.hdh-card { background: var(--hdh-surface); border: 1px solid var(--hdh-border); border-radius: var(--hdh-radius); padding: 18px 20px; }
.hdh-notice { padding: 12px 16px; border-radius: 10px; margin: 0 0 16px; font-weight: 600; }
.hdh-notice.ok { background: #e7f6ec; color: var(--hdh-primary-dark); }
.hdh-empty { color: var(--hdh-muted); }
.hdh-section-title { margin: 22px 0 12px; font-size: 18px; font-weight: 800; }

/* ---- Buttons ---- */
.hdh-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
    font-weight: 700; font-size: 14px; line-height: 1; border: 2px solid var(--hdh-primary);
    color: var(--hdh-primary); background: transparent; cursor: pointer; text-decoration: none; transition: all .15s ease; }
.hdh-btn:hover { background: var(--hdh-primary); color: #fff; }
.hdh-btn-primary { background: var(--hdh-primary); color: #fff; }
.hdh-btn-primary:hover { background: var(--hdh-primary-dark); border-color: var(--hdh-primary-dark); }
.hdh-follow-btn.is-following { background: var(--hdh-muted); border-color: var(--hdh-muted); color: #fff; }

/* ---- Profil-Panel (in UM eingebettet) ---- */
.hdh-panel { background: var(--hdh-surface); border: 1px solid var(--hdh-border); border-radius: var(--hdh-radius); padding: 20px; margin: 20px 0; }
.hdh-panel-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.hdh-badge-rank { background: var(--hdh-primary); color: #fff; font-weight: 700; font-size: 13px; padding: 4px 12px; border-radius: 999px; }
.hdh-points { color: var(--hdh-muted); font-weight: 600; font-size: 14px; }
.hdh-panel-follow { margin-left: auto; }

.hdh-progress { position: relative; height: 24px; background: #fff; border: 1px solid var(--hdh-border);
    border-radius: 999px; overflow: hidden; margin: 14px 0; }
.hdh-progress-bar { height: 100%; background: linear-gradient(90deg, var(--hdh-primary), var(--hdh-accent)); transition: width .4s ease; }
.hdh-progress-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }

.hdh-stats { list-style: none; margin: 16px 0; padding: 0; display: grid; grid-template-columns: repeat(5,1fr); gap: 10px; }
.hdh-stats li { background: #fff; border: 1px solid var(--hdh-border); border-radius: 12px; padding: 12px 6px; text-align: center; }
.hdh-stats strong { display: block; font-size: 20px; font-weight: 800; color: var(--hdh-primary); }
.hdh-stats span { font-size: 12px; color: var(--hdh-muted); }

.hdh-badges { display: flex; flex-wrap: wrap; gap: 9px; margin: 16px 0; }
.hdh-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
    font-size: 13px; font-weight: 600; border: 1px solid var(--hdh-border); }
.hdh-badge.earned { background: #fff7e6; border-color: var(--hdh-accent); color: #92600a; }
.hdh-badge.locked { opacity: .4; filter: grayscale(1); }

/* ---- Deal-Grid + Karten ---- */
.hdh-deal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 14px; }
.hdh-deal-grid-lg { grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); }
.hdh-deal-card { position: relative; display: flex; flex-direction: column; background: #fff;
    border: 1px solid var(--hdh-border); border-radius: 12px; overflow: hidden; text-decoration: none;
    color: var(--hdh-ink); box-shadow: var(--hdh-shadow); transition: transform .15s ease; }
.hdh-deal-card:hover { transform: translateY(-3px); }
.hdh-deal-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.hdh-deal-title { padding: 10px 12px 4px; font-weight: 700; font-size: 14px; }
.hdh-deal-foot { display: flex; justify-content: space-between; padding: 0 12px 12px; font-size: 13px; }
.hdh-deal-hak { color: var(--hdh-accent); font-weight: 800; }
.hdh-deal-author { color: var(--hdh-muted); }
.hdh-flag-hot { position: absolute; top: 8px; left: 8px; background: var(--hdh-accent); color: #fff;
    font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; z-index: 2; }

/* ---- HAK-Button ---- */
.hdh-hak-wrap { margin: 22px 0; }
.hdh-hak-btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: 999px;
    cursor: pointer; background: #fff; border: 2px solid var(--hdh-accent); color: #92600a; font-weight: 800; font-size: 17px; transition: all .15s ease; }
.hdh-hak-btn:hover { transform: scale(1.04); }
.hdh-hak-btn.is-active { background: var(--hdh-accent); color: #fff; }
.hdh-hak-icon { font-size: 20px; }
.hdh-hak-count { background: rgba(0,0,0,.08); padding: 2px 10px; border-radius: 999px; min-width: 26px; text-align: center; font-size: 14px; }
.hdh-hak-btn.is-active .hdh-hak-count { background: rgba(255,255,255,.3); }
.hdh-hak-pop { animation: hdhpop .35s ease; }
@keyframes hdhpop { 0%{transform:scale(1)} 40%{transform:scale(1.25)} 100%{transform:scale(1)} }

/* ---- Einzel-Deal ---- */
.hdh-single { max-width: 760px; margin: 0 auto; }
.hdh-single-title { font-size: 30px; font-weight: 800; margin: 0 0 12px; }
.hdh-single-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--hdh-muted); font-size: 14px; margin-bottom: 18px; }
.hdh-author { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; color: var(--hdh-ink); font-weight: 700; }
.hdh-author img { border-radius: 50%; }
.hdh-dot { opacity: .5; }
.hdh-single-follow { margin-left: auto; }
.hdh-single-image img { width: 100%; border-radius: var(--hdh-radius); margin-bottom: 18px; }
.hdh-single-content { font-size: 16px; line-height: 1.7; }

/* ---- Archiv ---- */
.hdh-archive-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.hdh-archive-head h1 { font-size: 28px; font-weight: 800; margin: 0; }
.hdh-sort { display: flex; gap: 8px; }
.hdh-sort-btn { padding: 7px 15px; border-radius: 999px; border: 1px solid var(--hdh-border);
    text-decoration: none; color: var(--hdh-ink); font-weight: 700; font-size: 14px; }
.hdh-sort-btn.is-active { background: var(--hdh-primary); color: #fff; border-color: var(--hdh-primary); }
.hdh-pagination { margin-top: 26px; display: flex; gap: 6px; justify-content: center; }
.hdh-pagination .page-numbers { padding: 7px 12px; border: 1px solid var(--hdh-border); border-radius: 8px; text-decoration: none; color: var(--hdh-ink); }
.hdh-pagination .current { background: var(--hdh-primary); color: #fff; border-color: var(--hdh-primary); }

/* ---- Feed ---- */
.hdh-feed { display: flex; flex-direction: column; gap: 4px; }
.hdh-feed-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px solid var(--hdh-border); }
.hdh-feed-item img.avatar { border-radius: 50%; flex-shrink: 0; }
.hdh-feed-body { flex: 1; min-width: 0; }
.hdh-feed-line { font-size: 15px; }
.hdh-feed-line a { color: var(--hdh-primary); font-weight: 700; text-decoration: none; }
.hdh-feed-time { font-size: 12px; color: var(--hdh-muted); margin-top: 2px; }
.hdh-feed-thumb img { border-radius: 8px; }

/* ---- Leaderboard ---- */
.hdh-lb-list { list-style: none; margin: 0; padding: 0; }
.hdh-lb-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--hdh-border); }
.hdh-lb-item img { border-radius: 50%; width: 36px; height: 36px; }
.hdh-lb-pos { font-weight: 800; width: 28px; text-align: center; }
.hdh-lb-name { font-weight: 700; text-decoration: none; color: var(--hdh-ink); flex: 1; }
.hdh-lb-name:hover { color: var(--hdh-primary); }
.hdh-lb-rank { font-size: 12px; color: var(--hdh-muted); }
.hdh-lb-pts { font-weight: 800; color: var(--hdh-primary); }
.hdh-lb-item.rank-1 { background: linear-gradient(90deg, #fff7e6, transparent); }

/* ---- Formulare ---- */
.hdh-form { display: flex; flex-direction: column; gap: 14px; max-width: 620px; }
.hdh-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 14px; }
.hdh-form input, .hdh-form textarea { border: 1px solid var(--hdh-border); border-radius: 10px; padding: 11px 13px; font-size: 15px; font-family: inherit; width: 100%; }
.hdh-form input:focus, .hdh-form textarea:focus { outline: none; border-color: var(--hdh-primary); box-shadow: 0 0 0 3px rgba(22,163,74,.12); }

/* ---- Leichte Anpassung der Ultimate-Member-Seiten an die Markenfarbe ---- */
.um .um-button,
.um a.um-button,
.um .um-profile-nav-item.active a { background: var(--hdh-primary) !important; border-color: var(--hdh-primary) !important; }
.um .um-name a, .um a { color: var(--hdh-primary); }

/* ---- Mobile ---- */
@media (max-width: 600px) {
    .hdh-stats { grid-template-columns: repeat(3,1fr); }
    .hdh-panel-follow, .hdh-single-follow { margin-left: 0; }
}

/* ---- Merken / Favoriten ---- */
.hdh-fav-btn{display:inline-grid;place-items:center;width:32px;height:32px;padding:0;background:none;
  border:0;border-radius:50%;cursor:pointer;color:#6b7785;transition:background .15s,color .15s,transform .15s}
.hdh-fav-btn svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round;display:block}
.hdh-fav-btn:hover{background:rgba(255,59,107,.09);color:#ff3b6b}
.hdh-fav-btn.is-active{color:#ff3b6b}
.hdh-fav-btn.is-active svg{fill:#ff3b6b;stroke:#ff3b6b}
.hdh-fav-btn:disabled{opacity:.6;cursor:default}
.hdh-fav-count{font-size:.72rem;font-weight:800;margin-left:4px}
.hdh-fav-pop{animation:hdhfavpop .3s ease}
@keyframes hdhfavpop{0%{transform:scale(1)}45%{transform:scale(1.2)}100%{transform:scale(1)}}

/* ---- Profil-Tabs: Karten ---- */
.hdh-deal-thumb{display:grid;place-items:center;background:#fff;border-bottom:1px solid rgba(19,33,43,.1);
  aspect-ratio:16/10;overflow:hidden;padding:10px}
.hdh-deal-thumb img{width:100%;height:100%;object-fit:contain}
.hdh-deal-ph{font-weight:900;color:rgba(255,59,107,.35);letter-spacing:.06em}
.hdh-deal-meta{display:block;font-size:.76rem;color:#6b7785;padding:0 10px 10px}

/* =======================================================================
   VOLLPROFIL – alles auf einer Seite
   ======================================================================= */
/* UM-Tab-Navigation ausblenden (wir zeigen alles untereinander) */
.um-profile-nav, .um .um-profile-nav { display: none !important; }
.um-profile-body { padding-top: 0 !important; }

.hdh-profile { max-width: 1000px; margin: 0 auto; }

/* Über mich + Social */
.hdh-profile-about{background:#fff;border:1px solid rgba(19,33,43,.1);border-radius:14px;
  box-shadow:0 5px 20px rgba(19,33,43,.06);padding:20px 22px;margin:18px 0}
.hdh-profile-bio{margin:0;font-size:1rem;line-height:1.65;color:#31404a}
.hdh-profile-bio.hdh-muted{color:#6b7785}
.hdh-profile-bio a{color:#ff3b6b;font-weight:700}
.hdh-profile-socials{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
.hdh-social{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;
  border:1.5px solid rgba(19,33,43,.12);background:#fff;transition:all .15s}
.hdh-social svg{width:19px;height:19px;fill:var(--c,#6b7785);display:block}
.hdh-social:hover{border-color:var(--c,#ff3b6b);transform:translateY(-2px);
  box-shadow:0 6px 16px rgba(19,33,43,.12)}

.hdh-section-title{font-weight:800;font-size:1.15rem;margin:26px 0 14px}

/* Karten-Raster im Profil */
.hdh-profile .hdh-deal-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
@media(max-width:900px){.hdh-profile .hdh-deal-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:520px){.hdh-profile .hdh-deal-grid{grid-template-columns:1fr}}

.hdh-profile .hdh-deal-card{display:flex;flex-direction:column;background:#fff;
  border:1px solid rgba(19,33,43,.1);border-radius:12px;overflow:hidden;text-decoration:none;
  color:#13212b;transition:box-shadow .18s,transform .18s}
.hdh-profile .hdh-deal-card:hover{box-shadow:0 14px 40px rgba(19,33,43,.11);transform:translateY(-2px)}

/* Bild: feste Hoehe, kein verschachteltes aspect-ratio */
.hdh-profile .hdh-deal-thumb{display:grid;place-items:center;height:130px;background:#fff;
  border-bottom:1px solid rgba(19,33,43,.08);overflow:hidden;padding:10px;flex:none}
.hdh-profile .hdh-deal-thumb img{max-width:100%;max-height:100%;width:auto;height:auto;
  aspect-ratio:auto;object-fit:contain;display:block}
.hdh-profile .hdh-deal-ph{font-weight:900;color:rgba(255,59,107,.35);letter-spacing:.06em}

/* Titel – immer sichtbar, 2 Zeilen */
.hdh-profile .hdh-deal-card .hdh-deal-title{display:-webkit-box !important;-webkit-line-clamp:2;
  -webkit-box-orient:vertical;overflow:hidden;font-weight:800;font-size:.9rem;line-height:1.35;
  color:#13212b;padding:10px 12px 2px;min-height:2.7em}
.hdh-profile .hdh-deal-card .hdh-deal-meta{display:block;font-size:.74rem;color:#6b7785;padding:0 12px 12px}
.hdh-profile .hdh-deal-card:hover .hdh-deal-title{color:#ff3b6b}

/* UM-Profilkopf in Marken-Look */
.um .um-profile-photo img.um-avatar{border-radius:50% !important;border:4px solid #fff !important;
  box-shadow:0 5px 20px rgba(19,33,43,.14) !important}
.um .um-name, .um .um-name a{font-weight:800 !important}
.um .um-profile-headericon a, .um .um-profile-edit-a{color:#ff3b6b !important}
.um .um-cover-add, .um .um-profile-photo-overlay{border-radius:12px}

/* ---- UM-Titelbild: NICHT per CSS ausblenden ----
   Das zerschiesst den Profilkopf (Avatar rutscht ueber den Namen).
   Richtig abschalten in:
   Ultimate Member -> Einstellungen -> Design -> Profil -> Titelbilder = Aus  */

/* Karten-Titel im Profil sicher sichtbar halten */
.hdh-profile .hdh-deal-card .hdh-deal-title{-webkit-line-clamp:2;min-height:2.6em}
.hdh-profile .hdh-deal-card img{aspect-ratio:16/10;object-fit:contain;background:#fff;padding:8px}

/* ---- UM-Feldliste im Profil ausblenden ----
   Bearbeiten laeuft ueber das Zahnrad oben rechts (Edit-Modus bleibt nutzbar). */
.um-profile.um-viewing .um-profile-body .um-field,
.um-profile.um-viewing .um-profile-body .um-profile-note,
.um-viewing .um-profile-body > .um-form > form > .um-field { display: none !important; }
/* Sicherheitsnetz: im Bearbeiten-Modus wieder anzeigen */
.um-profile.um-editing .um-profile-body .um-field { display: block !important; }
