/* ============================================
   Blog Detail Page Styles - hourlytomonthlysalary
   ============================================ */

/* --- Hero --- */
.blog-detail-hero {
    padding: 140px 0 60px;
    background: linear-gradient(135deg, #0f172a 0%, #0f766e 50%, #14b8a6 100%);
    position: relative;
    overflow: hidden;
}
.blog-detail-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: .6;
}
.blog-detail-hero .container { position: relative; z-index: 1; }

/* Breadcrumb */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; font-size: 14px; }
.breadcrumb a { color: rgba(255,255,255,.8); text-decoration: none; transition: color .2s; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb span { color: rgba(255,255,255,.55); }

/* Category Badge */
.blog-detail-hero .category-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 16px; background: rgba(255,255,255,.15);
    border-radius: 999px; font-size: 12px; font-weight: 600;
    color: #e0f2f1; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px;
}

.blog-detail-hero h1 {
    font-family: 'DM Sans', sans-serif; font-size: 40px; font-weight: 700;
    color: #fff; line-height: 1.2; margin-bottom: 18px; max-width: 820px;
}

/* Meta row */
.blog-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 18px; color: rgba(226,232,240,.9); font-size: 14px; }
.blog-meta .meta-item { display: inline-flex; align-items: center; gap: 6px; }

/* --- Layout --- */
.blog-content-section { padding: 70px 0; background: var(--bg-section); }

.blog-layout {
    display: grid;
    grid-template-columns: minmax(0,2.6fr) minmax(280px,1fr);
    gap: 36px;
    align-items: flex-start;
}

/* --- Main Content --- */
.blog-main-content {
    background: var(--bg-white); border-radius: var(--radius-2xl);
    padding: 40px 36px; box-shadow: var(--shadow-md);
}

/* Featured Image */
.blog-main-content .featured-image { margin: -4px -4px 28px; }
.blog-main-content .featured-image img { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius-xl); }
.blog-main-content .featured-image .image-credit { margin-top: 8px; font-size: 12px; color: var(--text-light); text-align: right; }
.blog-main-content .featured-image .image-credit a { color: var(--text-light); text-decoration: none; }

/* Typography */
.blog-main-content h2 { font-family: 'DM Sans', sans-serif; font-size: 26px; font-weight: 700; color: var(--text-dark); margin: 36px 0 14px; padding-bottom: 10px; border-bottom: 2px solid var(--primary-color); }
.blog-main-content h2:first-of-type { margin-top: 0; }
.blog-main-content h3 { font-family: 'DM Sans', sans-serif; font-size: 20px; font-weight: 600; color: var(--text-dark); margin: 28px 0 10px; }
.blog-main-content p  { font-size: 16px; line-height: 1.85; color: var(--text-medium); margin-bottom: 18px; }
.blog-main-content ul, .blog-main-content ol { padding-left: 22px; margin: 12px 0 18px; }
.blog-main-content li { font-size: 15px; line-height: 1.85; color: var(--text-medium); margin-bottom: 8px; }
.blog-main-content strong { color: var(--text-dark); }
.blog-main-content a { color: var(--primary-color); text-decoration: underline; }

/* --- Info Box --- */
.info-box {
    background: linear-gradient(135deg, rgba(15,118,110,.06), rgba(45,212,191,.1));
    border-left: 4px solid var(--primary-color);
    padding: 20px 24px; border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: 24px 0;
}
.info-box h4 { font-size: 16px; font-weight: 600; color: var(--primary-dark); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.info-box p { margin-bottom: 0; font-size: 15px; }

/* --- Formula Box --- */
.formula-box {
    background: #020617; color: #e5e7eb; padding: 24px;
    border-radius: var(--radius-lg); margin: 24px 0; font-family: 'DM Sans', monospace;
}
.formula-box .formula { font-size: 17px; text-align: center; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.15); margin-bottom: 14px; }
.formula-box .formula-legend { font-size: 14px; line-height: 1.9; color: #9ca3af; }
.formula-box .formula-legend strong { color: #e5e7eb; }

/* --- Data Table --- */
.data-table { width: 100%; border-collapse: collapse; margin: 24px 0; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.data-table th { background: var(--primary-color); color: #fff; padding: 13px 16px; text-align: left; font-weight: 600; font-size: 14px; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--bg-section); font-size: 14px; color: var(--text-medium); }
.data-table tr:nth-child(even) { background: #f8fafc; }
.data-table tr:hover { background: rgba(15,118,110,.04); }

/* --- FAQ Section --- */
.blog-faq { margin-top: 36px; }
.blog-faq h2 { border-bottom-color: var(--secondary-color); }
.faq-item { background: var(--bg-section); border-radius: var(--radius-md); margin-bottom: 12px; overflow: hidden; }
.faq-question { padding: 18px 22px; font-weight: 600; color: var(--text-dark); cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: background .2s; font-size: 15px; }
.faq-question:hover { background: rgba(15,118,110,.06); }
.faq-question i { transition: transform .3s; font-size: 13px; color: var(--text-light); }
.faq-item.active .faq-question i { transform: rotate(180deg); }
.faq-answer { padding: 0 22px; max-height: 0; overflow: hidden; transition: max-height .35s ease, padding .35s ease; }
.faq-item.active .faq-answer { padding: 0 22px 18px; max-height: 600px; }
.faq-answer p { font-size: 15px; margin-bottom: 6px; }

/* --- CTA Box inside article --- */
.article-cta {
    background: var(--primary-gradient); color: #fff; border-radius: var(--radius-xl);
    padding: 32px 28px; margin: 32px 0; text-align: center;
}
.article-cta h3 { font-family: 'DM Sans', sans-serif; font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.article-cta p { color: rgba(255,255,255,.85); margin-bottom: 18px; font-size: 15px; }
.article-cta .btn { display: inline-block; background: #fff; color: var(--primary-dark); padding: 12px 28px; border-radius: var(--radius-full); font-weight: 600; text-decoration: none; transition: transform .2s, box-shadow .2s; font-size: 15px; }
.article-cta .btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* --- Info Cards Grid --- */
.info-cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 18px; margin: 24px 0; }
.info-card-sm { background: var(--bg-section); border-radius: var(--radius-lg); padding: 22px 18px; border: 1px solid rgba(0,0,0,.04); }
.info-card-sm .ic-icon { width: 44px; height: 44px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff; margin-bottom: 12px; background: var(--primary-gradient); }
.info-card-sm h4 { font-size: 15px; font-weight: 600; color: var(--text-dark); margin-bottom: 6px; }
.info-card-sm p { font-size: 13px; color: var(--text-medium); line-height: 1.6; margin: 0; }

/* =====================
   SIDEBAR
   ===================== */
.blog-sidebar { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 22px; }

/* Sidebar Card */
.sidebar-card { background: var(--bg-white); border-radius: var(--radius-xl); padding: 22px 20px; box-shadow: var(--shadow-sm); }
.sidebar-card h3 { font-family: 'DM Sans', sans-serif; font-size: 17px; font-weight: 700; color: var(--text-dark); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; padding-bottom: 12px; border-bottom: 2px solid var(--bg-section); }
.sidebar-card h3 i { color: var(--primary-color); font-size: 16px; }

/* Calculator CTA Card */
.sidebar-cta { background: var(--primary-gradient); color: #fff; text-align: center; }
.sidebar-cta h3 { color: #fff; border-color: rgba(255,255,255,.25); }
.sidebar-cta h3 i { color: #fff; }
.sidebar-cta p { font-size: 14px; color: rgba(255,255,255,.85); margin-bottom: 16px; }
.sidebar-cta .cta-btn { display: inline-block; background: #fff; color: var(--primary-dark); padding: 11px 24px; border-radius: var(--radius-full); font-weight: 600; text-decoration: none; font-size: 14px; transition: transform .2s; }
.sidebar-cta .cta-btn:hover { transform: translateY(-2px); }

/* Recent Posts Cards */
.recent-posts-list { display: flex; flex-direction: column; gap: 14px; }
.recent-post-card { display: flex; gap: 12px; align-items: flex-start; text-decoration: none; color: inherit; transition: transform .15s; }
.recent-post-card:hover { transform: translateX(3px); }
.recent-post-card img { width: 72px; height: 54px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.recent-post-info { flex: 1; min-width: 0; }
.recent-post-info h4 { font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--text-dark); margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.recent-post-card:hover .recent-post-info h4 { color: var(--primary-color); }
.recent-post-meta { font-size: 11px; color: var(--text-light); display: flex; gap: 10px; }

/* Tags */
.tags-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { background: var(--bg-section); color: var(--text-medium); padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 500; text-decoration: none; transition: background .2s, color .2s; }
.tag:hover { background: var(--primary-color); color: #fff; }

/* Quick Links */
.sidebar-card.quick-links ul { list-style: none; padding: 0; margin: 0; }
.sidebar-card.quick-links li + li { margin-top: 4px; }
.sidebar-card.quick-links a { font-size: 14px; color: var(--text-medium); text-decoration: none; display: flex; align-items: center; gap: 8px; padding: 6px 0; transition: color .2s; }
.sidebar-card.quick-links a:hover { color: var(--primary-color); }

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 1024px) {
    .blog-layout { grid-template-columns: 1fr; }
    .blog-sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
    .blog-sidebar .sidebar-card { flex: 1 1 280px; }
}

@media (max-width: 768px) {
    .blog-detail-hero { padding: 120px 0 40px; }
    .blog-detail-hero h1 { font-size: 28px; }
    .blog-main-content { padding: 26px 20px; }
    .blog-main-content h2 { font-size: 22px; }
    .info-cards-grid { grid-template-columns: 1fr; }
    .blog-sidebar { flex-direction: column; }
}
