/* =============================================================
   TEMPLATE PPTX – ARCHIVE / TAXONOMY / SINGLE
   Compatible with Flatsome 3.2+  |  Requires Font Awesome 6
   File: template-style.css (child theme root)
   ============================================================= */

:root {
    --tpl-primary:    #1E6FE8;
    --tpl-primary-dk: #1558C7;
    --tpl-accent:     #FF4136;
    --tpl-hot:        #FF6B00;
    --tpl-green:      #27ae60;
    --tpl-text:       #1a1a2e;
    --tpl-muted:      #666;
    --tpl-border:     #e4eaf4;
    --tpl-bg:         #f2f5fb;
    --tpl-white:      #fff;
    --tpl-radius:     10px;
    --tpl-shadow:     0 3px 16px rgba(30,111,232,.09);
    --tpl-shadow-hov: 0 8px 28px rgba(30,111,232,.18);
    --tpl-ease:       all .24s cubic-bezier(.4,0,.2,1);
}

#tpl-wrapper * { box-sizing: border-box; }
#tpl-wrapper { background: var(--tpl-bg); padding-bottom: 64px; }

/* ===================== CATEGORY ICONS ===================== */
.tpl-cats-section {
    background: var(--tpl-white);
    padding: 30px 0 26px;
    border-bottom: 1px solid var(--tpl-border);
}

.tpl-cat-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}
@media (max-width: 992px) { .tpl-cat-grid { grid-template-columns: repeat(4,1fr); } }
@media (max-width: 600px) { .tpl-cat-grid { grid-template-columns: repeat(3,1fr); gap: 7px; } }

.tpl-cat-item {
    display: flex; flex-direction: column; align-items: center;
    padding: 13px 6px 11px; border-radius: 10px;
    border: 2px solid transparent; text-decoration: none !important;
    transition: var(--tpl-ease);
}
.tpl-cat-item:hover,
.tpl-cat-item.active {
    border-color: var(--tpl-primary);
    background: rgba(30,111,232,.04);
}
.tpl-cat-icon {
    width: 58px; height: 58px; border-radius: 50%;
    background: var(--tpl-primary);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 9px;
    box-shadow: 0 4px 12px rgba(30,111,232,.22);
    transition: var(--tpl-ease);
}
.tpl-cat-item:hover .tpl-cat-icon,
.tpl-cat-item.active .tpl-cat-icon {
    background: var(--tpl-primary-dk);
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(30,111,232,.3);
}
.tpl-cat-icon i { color: #fff; font-size: 22px; }
.tpl-cat-name { font-size: 12.5px; font-weight: 600; color: var(--tpl-text); text-align: center; line-height: 1.3; margin-bottom: 3px; }
.tpl-cat-count { font-size: 11px; color: var(--tpl-primary); font-weight: 500; }

/* ===================== SECTION HEADER ===================== */
.tpl-section { padding: 44px 0 20px; }
.tpl-section-hot { background: var(--tpl-white); padding: 44px 0 40px; margin-top: 36px; }

.tpl-section-header { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 7px; }
.tpl-section-title { font-size: 21px !important; font-weight: 800 !important; color: var(--tpl-primary) !important; letter-spacing: 1.5px; margin: 0 !important; }
.tpl-diamond,.tpl-icon-heart,.tpl-icon-fire { font-size: 15px; color: var(--tpl-primary); opacity: .75; }
.tpl-icon-fire i { color: var(--tpl-hot); }
.tpl-section-sub { text-align: center; color: var(--tpl-muted); font-size: 13px; margin-bottom: 26px !important; }

/* ===================== CARD GRID ===================== */
.tpl-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 20px;
}
.tpl-grid-6 { grid-template-columns: repeat(6,1fr); gap: 16px; }
@media (max-width: 1200px) { .tpl-grid-6 { grid-template-columns: repeat(4,1fr); } }
@media (max-width: 1000px) { .tpl-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 720px)  { .tpl-grid,.tpl-grid-6 { grid-template-columns: repeat(2,1fr); gap: 12px; } }
@media (max-width: 420px)  { .tpl-grid,.tpl-grid-6 { grid-template-columns: 1fr; } }

.tpl-card {
    background: var(--tpl-white); border-radius: var(--tpl-radius);
    box-shadow: var(--tpl-shadow); overflow: hidden; position: relative;
    display: flex; flex-direction: column;
    transition: var(--tpl-ease);
}
.tpl-card:hover { box-shadow: var(--tpl-shadow-hov); transform: translateY(-4px); }

/* Badge */
.tpl-card-badge {
    position: absolute; top: 0; left: 0; z-index: 10;
    background: var(--tpl-primary); color: #fff;
    font-size: 10px; font-weight: 800; letter-spacing: .7px;
    padding: 5px 13px 5px 8px;
    clip-path: polygon(0 0,100% 0,82% 100%,0 100%);
}
.tpl-badge-hot { background: var(--tpl-hot) !important; }

/* Thumb – 16:9 */
.tpl-card-thumb {
    display: block; position: relative;
    padding-top: 56.25%;          /* 16:9 */
    overflow: hidden; background: #dde6f7; text-decoration: none !important;
}
.tpl-thumb-img {
    position: absolute !important; inset: 0;
    width: 100% !important; height: 100% !important;
    object-fit: cover; display: block;
    transition: transform .4s ease;
}
.tpl-card:hover .tpl-thumb-img { transform: scale(1.04); }
.tpl-thumb-ph {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg,#dce8fa,#b8d0f7);
}
.tpl-thumb-ph i { font-size: 36px; color: rgba(30,111,232,.25); }

.tpl-thumb-overlay {
    position: absolute; inset: 0;
    background: rgba(30,111,232,.5);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: var(--tpl-ease);
}
.tpl-card:hover .tpl-thumb-overlay { opacity: 1; }
.tpl-thumb-overlay i { font-size: 28px; color: #fff; }

/* Card body */
.tpl-card-body { padding: 12px 12px 13px; flex: 1; display: flex; flex-direction: column; gap: 7px; }
.tpl-card-title {
    margin: 0 !important; font-size: 13px !important; font-weight: 600 !important; line-height: 1.35 !important;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tpl-card-title a { color: var(--tpl-text) !important; text-decoration: none !important; transition: color .2s; }
.tpl-card-title a:hover { color: var(--tpl-primary) !important; }

.tpl-card-meta { display: flex; gap: 10px; font-size: 11.5px; color: var(--tpl-muted); flex-wrap: wrap; }
.tpl-card-meta i { color: var(--tpl-primary); margin-right: 2px; }

.tpl-btn-dl {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    background: var(--tpl-white); color: var(--tpl-primary) !important;
    border: 1.5px solid var(--tpl-primary); border-radius: 6px;
    padding: 7px 10px; font-size: 12px; font-weight: 700;
    text-decoration: none !important; transition: var(--tpl-ease); margin-top: auto;
}
.tpl-btn-dl:hover { background: var(--tpl-primary); color: #fff !important; }

/* View all */
.tpl-view-all { text-align: center; margin-top: 32px; }
.tpl-btn-viewall {
    display: inline-block; background: var(--tpl-primary); color: #fff !important;
    font-size: 13.5px; font-weight: 700; padding: 12px 34px; border-radius: 40px;
    text-decoration: none !important; transition: var(--tpl-ease);
    box-shadow: 0 4px 14px rgba(30,111,232,.26);
}
.tpl-btn-viewall:hover { background: var(--tpl-primary-dk); transform: translateY(-2px); }

/* ===================== TAXONOMY HEADER ===================== */
.tpl-tax-header { background: var(--tpl-white); padding: 20px 0 16px; border-bottom: 1px solid var(--tpl-border); }
.tpl-tax-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tpl-tax-title { font-size: 22px !important; font-weight: 800 !important; color: var(--tpl-text) !important; margin: 0 !important; }
.tpl-result-count { background: var(--tpl-primary); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 11px; border-radius: 20px; }
.tpl-tax-desc { color: var(--tpl-muted); font-size: 13.5px; margin: 7px 0 0 !important; }

/* Breadcrumb */
.tpl-breadcrumb { font-size: 13px; color: var(--tpl-muted); margin-bottom: 10px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.tpl-breadcrumb a { color: var(--tpl-primary); text-decoration: none !important; }
.tpl-breadcrumb a:hover { text-decoration: underline !important; }
.tpl-bc-cur { color: var(--tpl-text); font-weight: 600; }

/* Pagination */
.tpl-pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 5px; margin-top: 36px; }
.tpl-pagination .page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 9px; border-radius: 7px;
    font-size: 13.5px; font-weight: 600; background: var(--tpl-white);
    color: var(--tpl-text) !important; border: 1.5px solid var(--tpl-border);
    text-decoration: none !important; transition: var(--tpl-ease);
}
.tpl-pagination .page-numbers:hover,
.tpl-pagination .page-numbers.current { background: var(--tpl-primary); color: #fff !important; border-color: var(--tpl-primary); }

/* No posts */
.tpl-no-posts { text-align: center; padding: 56px 20px; color: var(--tpl-muted); }
.tpl-no-posts i { font-size: 44px; color: #c5d5ed; display: block; margin-bottom: 14px; }
.tpl-no-posts p { font-size: 14px; margin-bottom: 18px; }

/* ===================== SINGLE PAGE ===================== */
.tpl-single-page { padding: 24px 0 60px; background: var(--tpl-bg); }

.tpl-single-wrap {
    display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px;
    background: var(--tpl-white); border-radius: var(--tpl-radius);
    box-shadow: var(--tpl-shadow); padding: 28px; margin-bottom: 28px;
}
@media (max-width: 860px) { .tpl-single-wrap { grid-template-columns: 1fr; gap: 22px; padding: 18px; } }

/* Main image */
.tpl-main-img-wrap { position: relative; border-radius: 8px; overflow: hidden; line-height: 0; margin-bottom: 12px; }
.tpl-main-img { width: 100%; height: auto; max-height: 400px; object-fit: cover; display: block; border-radius: 8px; }
.tpl-single-img-ph { height: 260px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg,#dce8fa,#b8d0f7); border-radius: 8px; }
.tpl-single-img-ph i { font-size: 48px; color: rgba(30,111,232,.22); }

/* Thumb strip */
.tpl-thumb-strip-wrap {
    display: flex; align-items: center; gap: 6px;
    background: var(--tpl-white); margin-bottom: 14px;
}
.tpl-strip-arrow {
    width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--tpl-border);
    background: var(--tpl-white); cursor: pointer; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 12px; color: var(--tpl-primary); transition: var(--tpl-ease);
}
.tpl-strip-arrow:hover { background: var(--tpl-primary); color: #fff; border-color: var(--tpl-primary); }

.tpl-thumb-strip { display: flex; gap: 7px; overflow-x: auto; flex: 1; scroll-behavior: smooth; scrollbar-width: none; }
.tpl-thumb-strip::-webkit-scrollbar { display: none; }

.tpl-strip-item {
    flex-shrink: 0; width: 90px; height: 56px; border-radius: 5px; overflow: hidden;
    border: 2px solid transparent; cursor: pointer; transition: var(--tpl-ease);
    opacity: .75;
}
.tpl-strip-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tpl-strip-item.active,
.tpl-strip-item:hover { border-color: var(--tpl-primary); opacity: 1; }

/* Features row */
.tpl-features {
    display: grid; grid-template-columns: repeat(2,1fr); gap: 10px;
    border-top: 1px solid var(--tpl-border); padding-top: 14px;
}
.tpl-feat-item { display: flex; align-items: flex-start; gap: 10px; }
.tpl-feat-icon {
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(30,111,232,.1); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.tpl-feat-icon i { color: var(--tpl-primary); font-size: 15px; }
.tpl-feat-item strong { display: block; font-size: 12.5px; font-weight: 700; color: var(--tpl-text); line-height: 1.3; }
.tpl-feat-item span  { font-size: 11px; color: var(--tpl-muted); }

/* Right info */
.tpl-single-right { display: flex; flex-direction: column; gap: 14px; }
.tpl-single-title { font-size: 22px !important; font-weight: 800 !important; color: var(--tpl-text) !important; margin: 0 !important; line-height: 1.3 !important; }
.tpl-single-sub { font-size: 14px; color: var(--tpl-muted); margin: 0 !important; }

.tpl-single-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.tpl-pill { background: #eef3fc; color: var(--tpl-primary); font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 20px; display: inline-flex; align-items: center; gap: 5px; }
.tpl-pill i { font-size: 11px; }

/* Buttons */
.tpl-btn-primary {
    display: flex; align-items: center; justify-content: center; gap: 9px;
    background: var(--tpl-primary); color: #fff !important; border: none;
    font-size: 15px; font-weight: 800; padding: 15px 20px; border-radius: 8px;
    text-decoration: none !important; cursor: pointer; transition: var(--tpl-ease);
    box-shadow: 0 4px 16px rgba(30,111,232,.28); letter-spacing: .3px;
}
.tpl-btn-primary:hover { background: var(--tpl-primary-dk); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(30,111,232,.32); }

.tpl-btn-secondary {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: #fff; color: var(--tpl-muted) !important;
    border: 1.5px solid var(--tpl-border); border-radius: 8px;
    font-size: 14px; font-weight: 600; padding: 12px 20px; cursor: pointer;
    transition: var(--tpl-ease); width: 100%;
}
.tpl-btn-secondary:hover { border-color: var(--tpl-accent); color: var(--tpl-accent) !important; }
.tpl-btn-secondary i { color: var(--tpl-accent); }

/* Detail table */
.tpl-detail-table { border: 1px solid var(--tpl-border); border-radius: 8px; overflow: hidden; }
.tpl-detail-row { display: flex; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--tpl-border); font-size: 13.5px; }
.tpl-detail-row:last-child { border-bottom: none; }
.tpl-detail-label { width: 100px; flex-shrink: 0; color: var(--tpl-muted); font-weight: 500; }
.tpl-detail-val { color: var(--tpl-text); font-weight: 600; }
.tpl-green { color: var(--tpl-green) !important; }
.tpl-link { color: var(--tpl-primary) !important; text-decoration: none !important; font-weight: 600; }
.tpl-link:hover { text-decoration: underline !important; }

/* Trust badge */
.tpl-trust {
    display: flex; align-items: flex-start; gap: 12px;
    background: #f0f7ff; border: 1px solid #c8dff8; border-radius: 8px; padding: 14px;
}
.tpl-trust > i { font-size: 26px; color: var(--tpl-primary); flex-shrink: 0; margin-top: 2px; }
.tpl-trust strong { display: block; font-size: 13.5px; color: var(--tpl-text); margin-bottom: 3px; }
.tpl-trust span { font-size: 12.5px; color: var(--tpl-muted); line-height: 1.5; }

/* ===================== TABS ===================== */
.tpl-single-tabs { background: var(--tpl-white); border-radius: var(--tpl-radius); box-shadow: var(--tpl-shadow); overflow: hidden; margin-bottom: 36px; }
.tpl-tab-nav { display: flex; border-bottom: 2px solid var(--tpl-border); background: #f7faff; }
.tpl-tab-btn {
    background: none; border: none; padding: 14px 22px; font-size: 14px; font-weight: 600;
    color: var(--tpl-muted); cursor: pointer; border-bottom: 3px solid transparent;
    margin-bottom: -2px; transition: var(--tpl-ease);
}
.tpl-tab-btn:hover { color: var(--tpl-primary); }
.tpl-tab-btn.active { color: var(--tpl-primary); border-bottom-color: var(--tpl-primary); background: var(--tpl-white); }

.tpl-tab-content { display: none; }
.tpl-tab-content.active { display: block; }
.tpl-tab-inner { padding: 26px 28px; }
@media (max-width: 600px) { .tpl-tab-inner { padding: 18px 16px; } }

.tpl-tab-body { font-size: 14.5px; line-height: 1.8; color: #333; }
.tpl-tab-body h2 { font-size: 19px !important; font-weight: 700 !important; margin: 22px 0 9px !important; padding-bottom: 6px; border-bottom: 2px solid var(--tpl-border); }
.tpl-tab-body h3 { font-size: 15px !important; font-weight: 700 !important; margin: 16px 0 7px !important; }
.tpl-tab-body ul { padding-left: 20px; }
.tpl-tab-body ul li { margin-bottom: 4px; }

/* Suitable tags */
.tpl-suitable { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--tpl-border); }
.tpl-suitable strong { display: block; font-size: 14px; margin-bottom: 10px; color: var(--tpl-text); }
.tpl-tag-list { display: flex; flex-wrap: wrap; gap: 7px; }
.tpl-tag {
    background: #eef3fc; color: var(--tpl-primary); font-size: 12px; font-weight: 600;
    padding: 4px 12px; border-radius: 20px; text-decoration: none !important; transition: var(--tpl-ease);
}
a.tpl-tag:hover { background: var(--tpl-primary); color: #fff !important; }

/* Preview grid */
.tpl-preview-title { font-size: 16px !important; font-weight: 700 !important; margin: 0 0 14px !important; }
.tpl-preview-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 10px; }
@media (max-width: 900px) { .tpl-preview-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 560px) { .tpl-preview-grid { grid-template-columns: repeat(2,1fr); } }
.tpl-preview-item { border-radius: 6px; overflow: hidden; border: 1.5px solid var(--tpl-border); transition: var(--tpl-ease); }
.tpl-preview-item:hover { border-color: var(--tpl-primary); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(30,111,232,.12); }
.tpl-preview-item img { width: 100%; height: auto; display: block; }

.tpl-preview-view-all { text-align: center; margin-top: 20px; }
.tpl-btn-outline {
    display: inline-flex; align-items: center; gap: 8px;
    border: 2px solid var(--tpl-primary); color: var(--tpl-primary) !important;
    font-size: 13px; font-weight: 700; padding: 10px 28px; border-radius: 40px;
    text-decoration: none !important; transition: var(--tpl-ease);
}
.tpl-btn-outline:hover { background: var(--tpl-primary); color: #fff !important; }

/* Related */
.tpl-related { margin-top: 4px; }
.tpl-related-title { font-size: 19px !important; font-weight: 800 !important; color: var(--tpl-text) !important; margin-bottom: 18px !important; padding-bottom: 10px; border-bottom: 2px solid var(--tpl-border); }

/* ── Main image fade transition ── */
#tpl-main-preview {
    transition: opacity 0.2s ease;
}