/* ============================================================
   a_style_blog.css — HuskyDev Blog Styles
   ============================================================ */

:root {
    --hd-accent: #FC3737;
    --hd-accent2: #ff6b6b;
    --hd-card-bg: #1a1a1a;
    --hd-border: rgba(255,255,255,0.07);
    --hd-radius: 16px;
    --hd-radius-sm: 10px;
    --hd-transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
}

/* ----------------------------------------------------------
   PAGE HEADER
---------------------------------------------------------- */
.hd-page-header {
    position: relative;
    background: linear-gradient(135deg, #0d0d0d 0%, #1a0505 50%, #0d0d0d 100%);
    padding: 100px 0 70px;
    overflow: hidden;
}
.hd-page-header-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(252,55,55,0.12) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 30%, rgba(252,55,55,0.08) 0%, transparent 50%);
}
.hd-page-title { color: #fff; font-size: clamp(32px,5vw,52px); margin-top: 16px; }

/* ----------------------------------------------------------
   FILTER BAR
---------------------------------------------------------- */
.hd-blog-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
}
.hd-blog-search {
    display: flex;
    background: #f8f8f8;
    border: 1px solid #e8e8e8;
    border-radius: 50px;
    overflow: hidden;
    flex-shrink: 0;
}
.hd-blog-search input {
    border: none;
    background: transparent;
    padding: 10px 18px;
    font-size: 14px;
    outline: none;
    width: 220px;
}
.hd-blog-search button {
    background: var(--hd-accent);
    border: none;
    color: #fff;
    padding: 10px 18px;
    cursor: pointer;
    transition: var(--hd-transition);
}
.hd-blog-search button:hover { background: #d42020; }
.hd-cat-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.hd-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 16px;
    border-radius: 50px;
    font-size: 13px;
    background: #f5f5f5;
    color: #555;
    text-decoration: none;
    border: 1px solid #eee;
    transition: var(--hd-transition);
    white-space: nowrap;
}
.hd-cat-pill span { font-size: 11px; opacity: 0.6; }
.hd-cat-pill:hover { background: rgba(252,55,55,0.08); border-color: rgba(252,55,55,0.3); color: var(--hd-accent); }
.hd-cat-pill.active {
    background: var(--hd-accent);
    color: #fff;
    border-color: var(--hd-accent);
    box-shadow: 0 4px 14px rgba(252,55,55,0.3);
}
.hd-cat-pill.active span { opacity: 0.8; }

/* ----------------------------------------------------------
   FEATURED POST
---------------------------------------------------------- */
.hd-featured-post { margin-bottom: 48px; }
.hd-featured-inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 40px rgba(0,0,0,0.1);
    text-decoration: none;
    transition: var(--hd-transition);
    min-height: 340px;
}
.hd-featured-inner:hover { transform: translateY(-6px); box-shadow: 0 16px 50px rgba(0,0,0,0.15); }
.hd-featured-img { position: relative; overflow: hidden; min-height: 280px; }
.hd-featured-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.hd-featured-inner:hover .hd-featured-img img { transform: scale(1.04); }
.hd-featured-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(0,0,0,0.1), transparent); }
.hd-featured-badge {
    position: absolute;
    top: 16px; left: 16px;
    background: var(--hd-accent);
    color: #fff;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}
.hd-featured-no-img {
    width: 100%; height: 100%; min-height: 280px;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: rgba(255,255,255,0.1);
}
.hd-featured-content {
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    color: #333;
}
.hd-blog-cat-tag {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}
.hd-featured-title { font-size: clamp(20px,2.5vw,28px); line-height: 1.4; color: #111; margin: 0; }
.hd-featured-excerpt { font-size: 15px; color: #666; line-height: 1.7; margin: 0; }
.hd-featured-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: #888; margin-top: 4px; }
.hd-read-more { color: var(--hd-accent); font-weight: 600; margin-left: auto; }
@media (max-width: 768px) {
    .hd-featured-inner { grid-template-columns: 1fr; }
    .hd-featured-img { min-height: 220px; }
}

/* ----------------------------------------------------------
   BLOG CARDS
---------------------------------------------------------- */
.hd-blog-card-v2 {
    background: #fff;
    border-radius: var(--hd-radius);
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    transition: var(--hd-transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #f0f0f0;
}
.hd-blog-card-v2:hover { transform: translateY(-8px); box-shadow: 0 16px 40px rgba(0,0,0,0.12); }
.hd-blog-img-wrap { position: relative; overflow: hidden; height: 210px; display: block; }
.hd-blog-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.hd-blog-card-v2:hover .hd-blog-img-wrap img { transform: scale(1.06); }
.hd-blog-img-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.15) 0%, transparent 60%); }
.hd-blog-no-img {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #f8f8f8, #eee);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #ddd;
}
.hd-blog-card-body { padding: 22px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.hd-blog-card-top { display: flex; align-items: center; justify-content: space-between; }
.hd-blog-read-time { font-size: 12px; color: #aaa; }
.hd-blog-card-title { font-size: 17px; line-height: 1.5; margin: 0; flex: 1; }
.hd-blog-card-title a { color: #111; text-decoration: none; transition: var(--hd-transition); }
.hd-blog-card-title a:hover { color: var(--hd-accent); }
.hd-blog-card-excerpt { font-size: 14px; color: #777; line-height: 1.65; margin: 0; }
.hd-blog-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 14px; border-top: 1px solid #f5f5f5; }
.hd-blog-card-link { font-size: 13px; color: var(--hd-accent); font-weight: 600; text-decoration: none; transition: var(--hd-transition); }
.hd-blog-card-link:hover { gap: 8px; color: var(--hd-accent); }

/* ----------------------------------------------------------
   PAGINATION
---------------------------------------------------------- */
.hd-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 50px; flex-wrap: wrap; }
.hd-page-btn {
    width: 42px; height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 14px;
    background: #f5f5f5;
    color: #555;
    text-decoration: none;
    transition: var(--hd-transition);
    border: 1px solid #eee;
}
.hd-page-btn:hover { background: rgba(252,55,55,0.08); color: var(--hd-accent); border-color: rgba(252,55,55,0.3); }
.hd-page-btn.active { background: var(--hd-accent); color: #fff; border-color: var(--hd-accent); box-shadow: 0 4px 14px rgba(252,55,55,0.3); }

/* ----------------------------------------------------------
   BLOG DETAIL
---------------------------------------------------------- */
.hd-blog-detail-wrap {}
.hd-detail-hero {
    min-height: 420px;
    background: linear-gradient(135deg, #0d0d0d, #1a0505);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding-bottom: 60px;
    position: relative;
}
.hd-detail-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.3) 100%);
}
.hd-detail-hero-content { position: relative; z-index: 2; max-width: 820px; }
.hd-blog-detail-cat {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 16px;
    backdrop-filter: blur(8px);
}
.hd-detail-title {
    font-size: clamp(24px,4vw,44px);
    line-height: 1.3;
    color: #fff;
    margin-bottom: 20px;
}
.hd-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    color: rgba(255,255,255,0.7);
}

/* Breadcrumb */
.hd-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #888;
    padding: 24px 0 0;
    margin-bottom: 32px;
    flex-wrap: wrap;
}
.hd-breadcrumb a { color: var(--hd-accent); text-decoration: none; }
.hd-breadcrumb i { font-size: 10px; }

/* Article body */
.hd-article-body {
    font-family: 'Sarabun', sans-serif;
    font-size: 17px;
    line-height: 1.9;
    color: #333;
    padding-bottom: 32px;
    border-bottom: 1px solid #eee;
}
.hd-article-body h2 { font-family: 'Kanit', sans-serif; font-size: 24px; font-weight: 700; margin: 36px 0 16px; color: #111; }
.hd-article-body h3 { font-family: 'Kanit', sans-serif; font-size: 20px; font-weight: 600; margin: 28px 0 12px; color: #222; }
.hd-article-body p { margin-bottom: 20px; }
.hd-article-body ul, .hd-article-body ol { padding-left: 24px; margin-bottom: 20px; }
.hd-article-body li { margin-bottom: 8px; }
.hd-article-body img { max-width: 100%; border-radius: 12px; margin: 24px 0; }
.hd-article-body blockquote {
    border-left: 4px solid var(--hd-accent);
    background: rgba(252,55,55,0.04);
    padding: 16px 24px;
    border-radius: 0 12px 12px 0;
    margin: 24px 0;
    font-style: italic;
}
.hd-article-body code {
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
}
.hd-article-body pre {
    background: #1a1a1a;
    color: #e8e8e8;
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 24px 0;
    font-size: 14px;
}

/* Tags */
.hd-article-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 24px 0; border-bottom: 1px solid #eee; }
.hd-tag-pill { padding: 5px 14px; background: #f5f5f5; color: #555; border-radius: 50px; font-size: 13px; text-decoration: none; transition: var(--hd-transition); border: 1px solid #eee; }
.hd-tag-pill:hover { background: rgba(252,55,55,0.08); color: var(--hd-accent); border-color: rgba(252,55,55,0.3); }

/* Share */
.hd-article-share { display: flex; align-items: center; gap: 10px; padding: 24px 0; flex-wrap: wrap; }
.hd-share-btn {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    transition: var(--hd-transition);
    border: none;
    cursor: pointer;
}
.hd-share-btn:hover { transform: translateY(-3px); color: #fff; }
.hd-share-fb { background: #1877F2; }
.hd-share-tw { background: #1DA1F2; }
.hd-share-line { background: #06C755; }
.hd-share-copy { background: #555; }

/* Author box */
.hd-author-box {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 24px;
    margin-top: 32px;
}
.hd-author-avatar {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--hd-accent), var(--hd-accent2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    flex-shrink: 0;
}
.hd-author-name { font-size: 17px; margin-bottom: 6px; }
.hd-author-bio { font-size: 14px; color: #666; line-height: 1.6; margin-bottom: 8px; }

/* Related */
.hd-related-section { margin-top: 60px; padding-top: 40px; border-top: 1px solid #eee; }
.hd-related-title { font-size: 24px; margin-bottom: 28px; }

/* ----------------------------------------------------------
   SIDEBAR
---------------------------------------------------------- */
.hd-sidebar { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 24px; }
.hd-sidebar-cta {
    background: linear-gradient(135deg, #0d0d0d, #1a0505);
    border-radius: 16px;
    padding: 28px;
    text-align: center;
    color: #fff;
    border: 1px solid rgba(252,55,55,0.2);
}
.hd-sidebar-cta-icon { font-size: 32px; color: var(--hd-accent); margin-bottom: 12px; }
.hd-sidebar-cta h4 { font-size: 20px; margin-bottom: 10px; }
.hd-sidebar-cta p { font-size: 14px; color: rgba(255,255,255,0.7); margin-bottom: 18px; }
.hd-sidebar-widget { background: #fff; border: 1px solid #eee; border-radius: 16px; padding: 24px; }
.hd-sidebar-title { font-size: 17px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid #eee; }
.hd-cat-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.hd-cat-list li { display: flex; align-items: center; justify-content: space-between; }
.hd-cat-list a { font-size: 14px; color: #555; text-decoration: none; transition: var(--hd-transition); }
.hd-cat-list a:hover { color: var(--hd-accent); }
.hd-cat-count { font-size: 12px; color: #aaa; background: #f5f5f5; padding: 2px 8px; border-radius: 50px; }
.hd-recent-item { display: flex; gap: 12px; align-items: center; text-decoration: none; padding: 10px 0; border-bottom: 1px solid #f5f5f5; transition: var(--hd-transition); }
.hd-recent-item:last-child { border-bottom: none; }
.hd-recent-item:hover { transform: translateX(4px); }
.hd-recent-item img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.hd-recent-no-img { width: 64px; height: 64px; border-radius: 10px; background: #f5f5f5; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #ccc; flex-shrink: 0; }
.hd-recent-title { font-size: 13px; color: #333; line-height: 1.5; margin-bottom: 4px; }
.hd-recent-date { font-size: 12px; color: #aaa; }

/* ----------------------------------------------------------
   EMPTY STATE
---------------------------------------------------------- */
.hd-blog-empty { padding: 60px 0; }

/* ----------------------------------------------------------
   RESPONSIVE
---------------------------------------------------------- */
@media (max-width: 991px) {
    .hd-sidebar { position: static; }
    .hd-detail-hero { padding-bottom: 40px; }
}
@media (max-width: 576px) {
    .hd-blog-filter-bar { flex-direction: column; align-items: stretch; }
    .hd-blog-search input { width: 100%; }
    .hd-article-share { gap: 8px; }
    .hd-detail-meta { gap: 12px; }
}
