/* Resource pages — hero uses global .site-hero default (250px) */

/* ============================================================
   Resource Center Module
   ============================================================ */

/* Category tabs */
.res-cat-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 30px; overflow-x: auto; }
.res-cat-tab { padding: 12px 24px; font-size: 14px; font-weight: 500; color: var(--text-light); border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap; transition: .2s; }
.res-cat-tab:hover { color: var(--primary); }
.res-cat-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* Featured grid (2 large cards) */
.res-featured-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 40px; }
.res-featured-card { display: block; text-decoration: none; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: .3s; }
.res-featured-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.res-featured-img { height: 200px; background: var(--bg-light); position: relative; overflow: hidden; }
.res-featured-img img { width: 100%; height: 100%; object-fit: cover; }
.res-featured-img .cat-tag { position: absolute; top: 12px; left: 12px; background: var(--primary); color: #fff; padding: 3px 10px; border-radius: 3px; font-size: 12px; }
.res-featured-body { padding: 20px; }
.res-featured-body h3 { font-size: 18px; color: var(--text); margin-bottom: 8px; line-height: 1.4; }
.res-featured-body p { font-size: 14px; color: var(--text-light); line-height: 1.6; margin-bottom: 8px; }
.res-featured-body .date { font-size: 12px; color: var(--text-muted); }

/* Section */
.res-section { margin-bottom: 40px; }
.res-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--border); }
.res-section-header h2 { font-size: 22px; }
.res-more { font-size: 14px; color: var(--primary); font-weight: 500; }
.res-more:hover { color: var(--primary-light); }

/* Card grid */
.res-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.res-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: .2s; }
.res-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.res-card-img { height: 150px; background: var(--bg-light); overflow: hidden; }
.res-card-img img { width: 100%; height: 100%; object-fit: cover; }
.res-card-body { padding: 16px; }
.res-card-body h4 { font-size: 15px; margin-bottom: 6px; line-height: 1.4; }
.res-card-body h4 a { color: var(--text); }
.res-card-body h4 a:hover { color: var(--primary); }
.res-card-body p { font-size: 13px; color: var(--text-light); line-height: 1.5; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.res-card-body .date { font-size: 12px; color: var(--text-muted); }

/* 3-column card grid */
.res-card-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.res-card { display: block; text-decoration: none; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: .3s; }
.res-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: transparent; }
.res-card-img { height: 180px; background: var(--bg-light); overflow: hidden; position: relative; }
.res-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.res-card:hover .res-card-img img { transform: scale(1.05); }
.res-card-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #f0f4f8, #e8edf2); }
.res-card-body { padding: 18px; }
.res-card-body h4 { font-size: 16px; line-height: 1.4; margin-bottom: 8px; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.res-card:hover .res-card-body h4 { color: var(--primary); }
.res-card-body p { font-size: 13px; color: var(--text-light); line-height: 1.5; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.res-card-meta { display: flex; justify-content: space-between; align-items: center; }
.res-card-cat { font-size: 11px; color: var(--primary); background: rgba(0,85,166,0.06); padding: 2px 8px; border-radius: 3px; }
.res-card-date { font-size: 11px; color: var(--text-muted); }

/* ── Article detail: left content + right sticky sidebar ── */
.res-detail-layout { display: grid; grid-template-columns: 1fr 280px; gap: 40px; align-items: start; }
.res-detail-main { min-width: 0; }
.res-detail-content { line-height: 1.9; font-size: 16px; color: var(--text); }
.res-detail-content p { margin-bottom: 16px; }
.res-detail-content img { max-width: 100%; border-radius: var(--radius); margin: 20px auto; display: block; }
.res-detail-content h2, .res-detail-content h3 { margin: 28px 0 14px; color: var(--primary-dark); }
.res-detail-content blockquote { border-left: 4px solid var(--primary); padding: 12px 20px; margin: 20px 0; background: var(--bg-light); color: var(--text-light); border-radius: 0 var(--radius) var(--radius) 0; }

/* Tags */
.res-detail-tags { display: flex; gap: 8px; flex-wrap: wrap; padding: 20px 0; border-top: 1px solid var(--border); margin-top: 30px; }
.res-tag { padding: 4px 12px; background: var(--bg-light); border-radius: 3px; font-size: 12px; color: var(--text-light); }

/* Share */
.res-detail-share { display: flex; align-items: center; gap: 10px; padding: 16px 0; border-top: 1px solid var(--border); }
.res-detail-share .share-label { font-size: 13px; color: var(--text-muted); }
.share-icon { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--bg-light); transition: .2s; }
.share-icon:hover { background: var(--primary); }
.share-icon svg { width: 16px; height: 16px; fill: var(--text-light); }
.share-icon:hover svg { fill: #fff; }

/* Prev/Next */
.res-detail-prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 20px; border-top: 1px solid var(--border); }
.prevnext-item { display: block; padding: 14px 16px; background: var(--bg-light); border-radius: var(--radius); transition: .2s; text-decoration: none; }
.prevnext-item:hover { background: rgba(0,85,166,0.05); }
.pn-label { font-size: 12px; color: var(--text-muted); display: block; margin-bottom: 4px; }
.pn-title { font-size: 14px; color: var(--text); line-height: 1.4; }
.prevnext-next { text-align: right; }

/* Sticky sidebar */
.res-detail-sidebar { position: sticky; top: 80px; }
.res-sidebar-inner { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.res-sidebar-inner h3 { font-size: 16px; font-weight: 600; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--primary); }
.res-sidebar-list { display: flex; flex-direction: column; gap: 14px; }
.res-sidebar-item { display: flex; gap: 12px; text-decoration: none; transition: .2s; }
.res-sidebar-item:hover .res-sidebar-text h5 { color: var(--primary); }
.res-sidebar-thumb { width: 60px; height: 44px; border-radius: 4px; overflow: hidden; flex-shrink: 0; background: var(--bg-light); }
.res-sidebar-thumb img { width: 100%; height: 100%; object-fit: cover; }
.res-sidebar-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.res-sidebar-text { flex: 1; min-width: 0; }
.res-sidebar-text h5 { font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.4; margin: 0 0 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.res-sidebar-text span { font-size: 11px; color: var(--text-muted); }

@media (max-width: 768px) {
    .res-detail-layout { grid-template-columns: 1fr; }
    .res-detail-sidebar { position: static; }
    .res-detail-prevnext { grid-template-columns: 1fr; }
}

/* Case study detail */
.case-hero { background: linear-gradient(135deg, #0a2647, var(--primary)); padding: 60px 0; text-align: center; color: #fff; }
.case-hero .case-tag { display: inline-block; padding: 4px 12px; border-radius: 3px; background: var(--accent); color: #fff; font-size: 12px; margin-bottom: 14px; }
.case-hero h1 { font-size: 30px; margin-bottom: 14px; }
.case-hero p { font-size: 15px; opacity: 0.8; max-width: 700px; margin: 0 auto; line-height: 1.7; }
.case-content { max-width: 800px; margin: 0 auto; }
.case-content .content { line-height: 1.9; font-size: 16px; }
.case-content .content img { max-width: 100%; border-radius: var(--radius); margin: 20px auto; display: block; }
.case-cta { text-align: center; padding: 40px; background: var(--bg-light); border-radius: var(--radius); margin: 40px auto; max-width: 500px; }
.case-cta h3 { margin-bottom: 16px; font-size: 20px; }

/* Section article block (about sub-pages) */
.section-article-block { margin-bottom: 40px; }
.section-article-block .section-article-img { border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; max-height: 300px; }
.section-article-block .section-article-img img { width: 100%; height: 100%; object-fit: cover; }
.section-article-block h3 { font-size: 22px; margin-bottom: 16px; color: var(--primary-dark); }
.section-article-block .content { line-height: 1.9; font-size: 15px; }
.section-article-block .content img { max-width: 100%; border-radius: var(--radius); margin: 15px 0; }

@media (max-width: 1200px) {
    .res-card-grid { grid-template-columns: repeat(2, 1fr); }
    .res-card-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .res-featured-grid { grid-template-columns: 1fr; }
    .res-card-grid { grid-template-columns: 1fr; }
    .res-card-grid-3 { grid-template-columns: 1fr; }
    .case-hero h1 { font-size: 22px; }
}
