/*
 Theme Name:   Astra Child
 Theme URI:    https://wpastra.com/
 Description:  Astra Child Theme — Horizon Tax & Law
 Author:       Horizon Tax & Law
 Author URI:   https://horizontaxlaw.com
 Template:     astra
 Version:      1.0.1
 Text Domain:  astra-child
*/

/* ===================================================
   NEWS SECTION — Archive & Single Post Styles
   =================================================== */

/* --- Page Header --- */
.htl-news-header {
    background: linear-gradient(135deg, #0a1628 0%, #1a2f5e 60%, #1e3a8a 100%);
    padding: 70px 30px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.htl-news-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 200%;
    background: radial-gradient(ellipse at 60% 40%, rgba(99,179,237,0.08) 0%, transparent 70%);
    pointer-events: none;
}
.htl-news-header h1 {
    color: #fff;
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}
.htl-news-header p {
    color: rgba(255,255,255,0.72);
    font-size: 1.1rem;
    max-width: 560px;
    margin: 0 auto 28px;
    line-height: 1.6;
}

/* --- Category Filter Pills --- */
.htl-news-filter {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 24px;
}
.htl-news-filter a {
    display: inline-block;
    padding: 8px 22px;
    border-radius: 999px;
    border: 1.5px solid rgba(255,255,255,0.35);
    color: rgba(255,255,255,0.85);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.22s ease;
    letter-spacing: 0.3px;
}
.htl-news-filter a:hover,
.htl-news-filter a.active {
    background: #f59e0b;
    border-color: #f59e0b;
    color: #0a1628;
    font-weight: 600;
}

/* --- Main Layout --- */
.htl-news-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px 80px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 50px;
    align-items: start;
}
@media (max-width: 900px) {
    .htl-news-wrap { grid-template-columns: 1fr; }
    .htl-news-sidebar { order: -1; }
}

/* --- Article Cards Grid --- */
.htl-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}
@media (max-width: 900px) {
    .htl-news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .htl-news-grid { grid-template-columns: 1fr; }
}

.htl-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 16px rgba(10,22,40,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    border: 1px solid #eef2f8;
}
.htl-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 32px rgba(10,22,40,0.13);
}
.htl-card-img {
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    text-decoration: none;
}
.htl-card-img-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #e8edf5 0%, #d0daea 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    text-decoration: none;
}
.htl-card-body {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.htl-card-cat {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #1e3a8a;
    background: #eff6ff;
    border-radius: 6px;
    padding: 3px 10px;
    margin-bottom: 10px;
    text-decoration: none;
}
.htl-card-cat.cat-pajak  { background:#fef3c7; color:#92400e; }
.htl-card-cat.cat-hukum  { background:#eff6ff; color:#1e3a8a; }
.htl-card-cat.cat-other  { background:#f0fdf4; color:#166534; }
.htl-card-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 10px;
    color: #0a1628;
}
.htl-card-title a { color: inherit; text-decoration: none; }
.htl-card-title a:hover { color: #1e3a8a; }
.htl-card-excerpt {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.htl-read-more {
    font-size: 0.85rem;
    font-weight: 700;
    color: #f59e0b;
    text-decoration: none;
    margin-bottom: 16px;
    display: inline-block;
    transition: color 0.2s;
}
.htl-read-more:hover {
    color: #1e3a8a;
}
.htl-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: auto;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
}
.htl-card-meta a { color: #1e3a8a; text-decoration: none; font-weight: 600; }
.htl-card-meta a:hover { text-decoration: underline; }

/* No posts message */
.htl-no-posts {
    grid-column: 1/-1;
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

/* --- Pagination --- */
.htl-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
    grid-column: 1;
}
.htl-pagination .page-numbers {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    color: #1e3a8a;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    transition: all 0.18s;
}
.htl-pagination .page-numbers.current,
.htl-pagination .page-numbers:hover {
    background: #1e3a8a;
    border-color: #1e3a8a;
    color: #fff;
}

/* ===================================================
   SIDEBAR
   =================================================== */
.htl-news-sidebar { font-size: 0.9rem; }
.htl-sidebar-widget {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(10,22,40,0.07);
    border: 1px solid #eef2f8;
    margin-bottom: 28px;
}
.htl-sidebar-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #94a3b8;
    border-bottom: 1.5px solid #f1f5f9;
    padding-bottom: 10px;
    margin-bottom: 16px;
}
.htl-recent-posts { list-style: none; padding: 0; margin: 0; }
.htl-recent-posts li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}
.htl-recent-posts li:last-child { border-bottom: none; }
.htl-recent-posts .rp-num {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    background: #eff6ff;
    color: #1e3a8a;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}
.htl-recent-posts a { color: #0a1628; text-decoration: none; font-weight: 500; line-height: 1.4; font-size: 0.87rem; }
.htl-recent-posts a:hover { color: #1e3a8a; }
.htl-categories-list { list-style: none; padding: 0; margin: 0; }
.htl-categories-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid #f1f5f9;
}
.htl-categories-list li:last-child { border-bottom: none; }
.htl-categories-list a { color: #334155; text-decoration: none; font-weight: 500; }
.htl-categories-list a:hover { color: #1e3a8a; }
.htl-categories-list .cat-count {
    font-size: 0.75rem;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 20px;
    padding: 2px 9px;
    font-weight: 600;
}
.htl-sidebar-cta {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    border-radius: 14px;
    padding: 26px;
    color: #fff;
    text-align: center;
    margin-bottom: 28px;
}
.htl-sidebar-cta h3 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 8px;
}
.htl-sidebar-cta p { font-size: 0.85rem; color: rgba(255,255,255,0.8); margin-bottom: 18px; }
.htl-sidebar-cta a {
    display: inline-block;
    background: #f59e0b;
    color: #0a1628;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    transition: background 0.18s;
}
.htl-sidebar-cta a:hover { background: #fbbf24; }

/* ===================================================
   SINGLE POST
   =================================================== */
.htl-single-header {
    background: linear-gradient(135deg, #0a1628 0%, #1a2f5e 100%);
    padding: 60px 30px 50px;
}
.htl-single-header-inner {
    max-width: 800px;
    margin: 0 auto;
}
.htl-single-breadcrumb {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.55);
    margin-bottom: 18px;
}
.htl-single-breadcrumb a { color: rgba(255,255,255,0.7); text-decoration: none; }
.htl-single-breadcrumb a:hover { color: #f59e0b; }
.htl-single-breadcrumb span { margin: 0 6px; }
.htl-single-header h1 {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
}
.htl-single-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.65);
}
.htl-single-meta .meta-cat {
    background: #f59e0b;
    color: #0a1628;
    padding: 4px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
}
.htl-single-meta .meta-author a { color: #93c5fd; text-decoration: none; font-weight: 600; }
.htl-single-meta .meta-author a:hover { color: #f59e0b; }

/* Content Area */
.htl-single-body {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto;
    padding: 50px 20px 60px;
    box-sizing: border-box;
}
.htl-single-body .entry-content h2 {
    font-size: 1.45rem;
    color: #0a1628;
    margin-top: 36px;
    margin-bottom: 14px;
    border-left: 4px solid #1e3a8a;
    padding-left: 14px;
}
.htl-single-body .entry-content h3 {
    font-size: 1.15rem;
    color: #1e3a8a;
    margin-top: 24px;
    margin-bottom: 10px;
}
.htl-single-body .entry-content p {
    line-height: 1.8;
    color: #334155;
    font-size: 1rem;
    margin-bottom: 16px;
}
.htl-single-body .entry-content ul,
.htl-single-body .entry-content ol {
    padding-left: 22px;
    color: #334155;
    line-height: 1.8;
    margin-bottom: 16px;
}
.htl-single-body .entry-content blockquote {
    background: #eff6ff;
    border-left: 4px solid #1e3a8a;
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    color: #1e3a8a;
    font-style: normal;
    margin: 24px 0;
}
.htl-single-body .entry-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin: 24px 0;
}
.htl-single-body .entry-content th {
    background: #0a1628;
    color: #fff;
    padding: 10px 14px;
    text-align: left;
}
.htl-single-body .entry-content td {
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}
.htl-single-body .entry-content tr:nth-child(even) td { background: #f8fafc; }

/* Author Box */
.htl-author-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 26px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 50px;
}
.htl-author-box img {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 3px solid #1e3a8a;
}
.htl-author-box-info h4 { margin-bottom: 4px; font-size: 1rem; color: #0a1628; }
.htl-author-box-info h4 a { color: #1e3a8a; text-decoration: none; }
.htl-author-box-info p { font-size: 0.87rem; color: #64748b; margin: 0; line-height: 1.6; }

/* Related Posts */
.htl-related {
    max-width: 100%;
    margin: 0 auto 60px;
    padding: 0 20px;
}
.htl-related h3 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 20px;
}
.htl-related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
@media (max-width: 540px) { .htl-related-grid { grid-template-columns: 1fr; } }

/* Comments */
.htl-comments-wrap {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px 80px;
}

/* ===================================================
   AUTHOR PAGE
   =================================================== */
.htl-author-header {
    background: linear-gradient(135deg, #0a1628 0%, #1a2f5e 100%);
    padding: 60px 30px;
}
.htl-author-header-inner {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    gap: 28px;
    align-items: center;
}
.htl-author-header img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.25);
    flex-shrink: 0;
}
.htl-author-header h1 { color: #fff; font-size: 1.8rem; margin-bottom: 6px; }
.htl-author-header .author-role {
    color: #f59e0b;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 10px;
}
.htl-author-header .author-bio { color: rgba(255,255,255,0.75); font-size: 0.95rem; line-height: 1.6; margin: 0; }
.htl-author-posts-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 50px 20px 80px;
}
.htl-author-posts-wrap h2 {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 28px;
}

/* ===================================================
   SINGLE POST — FULL WIDTH OVERRIDE
   Override Astra's ast-narrow-container on single posts
   =================================================== */
body.single-post .ast-container,
body.single-post .entry-content .ast-container,
body.single-post #primary.content-area {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Remove the narrow-container max-width restriction */
body.single-post.ast-narrow-container .ast-container {
    max-width: 100% !important;
}

/* Make the main site-content wrapper full width */
body.single-post #content.site-content,
body.single-post .ast-separate-container #content.site-content {
    padding: 0 !important;
}

/* Outer wrapper full width */
body.single-post .ast-separate-container .ast-article-single,
body.single-post .ast-article-single {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* The htl full-width content blocks */
body.single-post .htl-single-header,
body.single-post .htl-single-body,
body.single-post .htl-related,
body.single-post .htl-comments-wrap {
    max-width: 100% !important;
    box-sizing: border-box;
}

/* Inner readable content — limit width for readability */
body.single-post .htl-single-body .entry-content,
body.single-post .htl-single-body > * {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

/* Bottom row: comments + related articles side by side — full width override */
body.single-post .htl-single-body > .htl-bottom-row {
    max-width: 100% !important;
    width: 100%;
    box-sizing: border-box;
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
    .htl-bottom-row {
        flex-direction: column;
    }
}

/* ===================================================
   ALL PAGES — Hide Astra entry-header (avoid duplicate)
   =================================================== */
body:not(.single-post) header.entry-header,
body:not(.single-post) .ast-single-entry-banner {
    display: none !important;
}

/* ===================================================
   REDUCE WHITESPACE — Pages (menu to content)
   =================================================== */
body:not(.single-post) #content.site-content,
body:not(.single-post) .ast-container {
    padding-top: 0 !important;
}

/* ===================================================
   HOMEPAGE — Artikel Terbaru Section
   =================================================== */
.htl-home-latest {
    background: #f8fafc;
    padding: 60px 20px 70px;
    border-top: 1px solid #e8edf5;
}
.htl-home-latest-inner {
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
}
.htl-home-latest-title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 32px;
    position: relative;
    display: inline-block;
}
.htl-home-latest-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: linear-gradient(90deg, #1e3a8a, #f59e0b);
    border-radius: 2px;
    margin: 10px auto 0;
}
.htl-home-latest-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
    text-align: left;
}
.htl-home-latest-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eef2f8;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(10,22,40,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.htl-home-latest-item:hover {
    transform: translateX(4px);
    box-shadow: 0 6px 20px rgba(10,22,40,0.10);
    border-color: #c7d8f8;
}
.htl-home-latest-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}
.htl-home-latest-link {
    color: #0a1628;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.97rem;
    line-height: 1.45;
    transition: color 0.18s;
    flex: 1;
}
.htl-home-latest-link:hover {
    color: #1e3a8a;
}
.htl-home-latest-more {
    display: inline-block;
    padding: 11px 28px;
    background: transparent;
    border: 2px solid #1e3a8a;
    color: #1e3a8a;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}
.htl-home-latest-more:hover {
    background: #1e3a8a;
    color: #fff;
}
@media (max-width: 600px) {
    .htl-home-latest-item {
        padding: 14px 16px;
    }
    .htl-home-latest-title {
        font-size: 1rem;
    }
}
