/* ===================================================================
   HemdoMania Blog – Stylesheet
   Im Stil der Hauptseite: dunkler Hintergrund, Orangerot als Akzent
   =================================================================== */

:root {
    --orange: #fc6e51;
    --orange-light: #ff8a70;
    --bg: #0e0e10;
    --bg-card: rgba(255,255,255,0.04);
    --bg-card-hover: rgba(255,255,255,0.07);
    --border: rgba(255,255,255,0.08);
    --text: #fff;
    --text-dim: rgba(255,255,255,0.7);
    --text-mute: rgba(255,255,255,0.5);
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 Oxygen, Ubuntu, Cantarell, sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.55;
}

a { color: var(--orange); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--orange-light); }

img, video { max-width: 100%; display: block; }

/* ===== HEADER ===== */
.hm-blog-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 2rem 1rem;
}

.hm-blog-logo img {
    max-width: 280px;
    height: auto;
    display: block;
}

.hm-blog-title-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.hm-blog-title {
    font-size: 1.8rem;
    margin: 0;
    color: #fc6e51;
}

.hm-blog-tagline {
    font-size: 1rem;
    opacity: 0.85;
    margin: 0;
}

.hm-blog-nav-link {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    border: 1px solid #fc6e51;
    border-radius: 999px;
    color: #fc6e51;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}

.hm-blog-nav-link:hover {
    background: #fc6e51;
    color: #000;
}

/* ===== MAIN ===== */
.hm-blog-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 60px 24px;
}

/* ===== POST GRID (Übersicht) ===== */
.hm-post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}
.hm-post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.22,1,0.36,1),
                border-color 0.2s, background 0.2s, box-shadow 0.25s;
}
.hm-post-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    border-color: rgba(252,110,81,0.35);
    box-shadow: 0 12px 32px rgba(0,0,0,0.4),
                0 0 0 1px rgba(252,110,81,0.15);
}
.hm-post-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    height: 100%;
}
.hm-post-card-media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #1a1a1d 0%, #0e0e10 100%);
    overflow: hidden;
}
.hm-post-card-media img,
.hm-post-card-media video {
    width: 100%; height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}
.hm-post-card:hover .hm-post-card-media img,
.hm-post-card:hover .hm-post-card-media video {
    transform: scale(1.05);
}
.hm-post-card-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(252,110,81,0.12), rgba(0,0,0,0.4));
}
.hm-post-card-placeholder img {
    width: 60%; max-width: 180px;
    opacity: 0.7;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
}
.hm-media-badge {
    position: absolute;
    top: 12px; left: 12px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    backdrop-filter: blur(6px);
}
.hm-post-card-body {
    padding: 18px 20px 20px 20px;
}
.hm-post-card-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hm-post-card-excerpt {
    margin: 0 0 14px 0;
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hm-post-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}
.hm-post-card-date { color: var(--text-mute); }
.hm-post-card-read {
    color: var(--orange);
    font-weight: 600;
    transition: transform 0.2s;
}
.hm-post-card:hover .hm-post-card-read { transform: translateX(3px); }

/* ===== EMPTY STATE ===== */
.hm-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-dim);
}
.hm-empty h2 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--text);
}

/* ===== PAGINATION ===== */
.hm-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 50px;
}
.hm-page-link {
    padding: 10px 18px;
    border: 1px solid var(--border);
    border-radius: 22px;
    color: var(--text);
    font-weight: 600;
    transition: all 0.2s;
}
.hm-page-link:hover {
    background: rgba(252,110,81,0.12);
    border-color: var(--orange);
    color: var(--orange-light);
}
.hm-page-info {
    font-size: 13px;
    color: var(--text-mute);
}

/* ===== POST DETAIL ===== */
.hm-post-detail {
    max-width: 760px;
    margin: 0 auto;
}
.hm-post-detail-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.hm-post-detail-date {
    font-size: 13px;
    color: var(--orange);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}
.hm-post-detail-title {
    margin: 0 0 8px 0;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.5px;
    color: var(--text);
}
.hm-post-detail-views {
    font-size: 13px;
    color: var(--text-mute);
    margin-top: 6px;
}
.hm-post-detail-media {
    margin: 0 0 28px 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.hm-post-detail-media img,
.hm-post-detail-media video {
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #000;
}
.hm-post-detail-content {
    font-size: 17px;
    line-height: 1.7;
    color: rgba(255,255,255,0.92);
}
.hm-post-detail-content p { margin: 0 0 18px 0; }
.hm-post-detail-content h2,
.hm-post-detail-content h3 {
    margin: 32px 0 14px 0;
    color: var(--orange-light);
    font-weight: 700;
}
.hm-post-detail-content h2 { font-size: 24px; }
.hm-post-detail-content h3 { font-size: 19px; }
.hm-post-detail-content img,
.hm-post-detail-content video {
    border-radius: 12px;
    margin: 18px 0;
}
.hm-post-detail-content a {
    border-bottom: 1px dashed rgba(252,110,81,0.4);
}
.hm-post-detail-content a:hover {
    border-bottom-color: var(--orange-light);
}
.hm-post-detail-content blockquote {
    margin: 22px 0;
    padding: 14px 18px;
    border-left: 4px solid var(--orange);
    background: rgba(252,110,81,0.06);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--text-dim);
}
.hm-post-detail-content code {
    background: rgba(255,255,255,0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.hm-source-link {
    display: inline-block;
    margin-top: 30px;
    padding: 10px 18px;
    background: rgba(252,110,81,0.1);
    border: 1px solid rgba(252,110,81,0.3);
    border-radius: 22px;
    font-weight: 600;
    transition: all 0.2s;
}
.hm-source-link:hover {
    background: rgba(252,110,81,0.18);
    border-color: var(--orange);
}

/* ===== POST NAV ===== */
.hm-post-nav {
    max-width: 760px;
    margin: 50px auto 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.hm-post-nav-link {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 18px;
    color: var(--text);
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 70px;
}
.hm-post-nav-link:hover {
    background: var(--bg-card-hover);
    border-color: var(--orange);
}
.hm-post-nav-link.next { text-align: right; align-items: flex-end; }
.hm-post-nav-dir {
    font-size: 12px;
    color: var(--orange);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.hm-post-nav-title {
    font-size: 14px;
    color: var(--text);
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ===== FOOTER ===== */
.hm-blog-footer {
    margin-top: 80px;
    padding: 30px 24px calc(env(safe-area-inset-bottom, 0px) + 24px) 24px;
    border-top: 1px solid var(--border);
    background: rgba(0,0,0,0.4);
    text-align: center;
    font-size: 13px;
    color: var(--text-mute);
}
.hm-blog-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 22px;
    margin-bottom: 12px;
}
.hm-blog-footer-links a {
    color: var(--text-dim);
    font-weight: 500;
}
.hm-blog-footer-links a:hover { color: var(--orange); }
.hm-blog-footer-copy {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.3px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 720px) {
    .hm-blog-header {
        padding: 24px 16px;
        gap: 14px;
    }
    .hm-blog-logo img { max-width: 220px; }
    .hm-blog-title { font-size: 1.5rem; }
    .hm-blog-tagline { font-size: 0.95rem; }
    .hm-blog-nav-link { padding: 0.55rem 1.2rem; font-size: 14px; }
    .hm-blog-main { padding: 24px 16px 60px 16px; }
    .hm-post-grid { gap: 18px; }
    .hm-post-detail-content { font-size: 16px; }
    .hm-post-nav { grid-template-columns: 1fr; }
    .hm-post-nav-link.next { text-align: left; align-items: flex-start; }
}

@media (max-width: 420px) {
    .hm-blog-header { padding: 20px 12px; gap: 12px; }
    .hm-blog-logo img { max-width: 180px; }
    .hm-blog-title { font-size: 1.3rem; }
    .hm-blog-tagline { font-size: 0.9rem; }
    .hm-blog-nav-link { padding: 0.5rem 1.1rem; font-size: 13px; }
    .hm-post-card-body { padding: 14px 16px 16px 16px; }
    .hm-post-card-title { font-size: 16px; }
    .hm-post-card-excerpt { font-size: 13px; -webkit-line-clamp: 2; }
}
