/* Softtech Post Cards - base */
.stpc-wrap,
.stpc-wrap * { box-sizing: border-box; }
.stpc-wrap a { text-decoration: none; color: inherit; }
.stpc-empty { padding: 20px; text-align: center; color: #6b7280; }

.stpc-grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
.stpc-item { position: relative; min-width: 0; background: #fff; }

.stpc-thumb { display: block; overflow: hidden; flex-shrink: 0; }
.stpc-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.stpc-ph { display: block; width: 100%; height: 100%; min-height: 70px; background: #e5e7eb; }

.stpc-cat { display: inline-block; margin-bottom: 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #0f2a5e; }
.stpc-title { margin: 0 0 8px; font-size: 20px; line-height: 1.3; }
.stpc-title a { color: #0f2a5e; }
.stpc-title a:hover { color: #d90000; }
.stpc-excerpt { margin: 0 0 12px; font-size: 15px; line-height: 1.55; color: #4b5563; }
.stpc-meta { font-size: 12px; font-weight: 600; color: #6b7280; }
.stpc-sep { margin: 0 6px; }

.stpc-num { display: inline-block; flex-shrink: 0; padding: 3px 14px 3px 10px; font-size: 14px; font-weight: 800; line-height: 1.4; color: #fff; background: #d90000; clip-path: polygon(0 0, 100% 0, 82% 100%, 0 100%); }

/* Divider (list templates) */
.stpc-has-divider .stpc-item:not(:last-child) { padding-bottom: 16px; border-bottom: 1px solid #e5e7eb; }

/* 1. Card - image top */
.stpc-tpl-card-top .stpc-item { display: flex; flex-direction: column; border: 1px solid #e5e7eb; border-radius: 6px; overflow: hidden; }
.stpc-tpl-card-top .stpc-thumb { width: 100%; height: 220px; }
.stpc-tpl-card-top .stpc-body { padding: 20px; }
.stpc-tpl-card-top .stpc-title { font-family: Georgia, "Times New Roman", serif; font-size: 21px; font-weight: 700; }

/* 2. Card - horizontal */
.stpc-tpl-card-horizontal .stpc-item { display: flex; flex-direction: row; align-items: stretch; border: 1px solid #e5e7eb; border-radius: 6px; overflow: hidden; }
.stpc-tpl-card-horizontal .stpc-thumb { width: 45%; min-height: 240px; }
.stpc-tpl-card-horizontal .stpc-body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 24px; }
.stpc-tpl-card-horizontal .stpc-title { font-family: Georgia, "Times New Roman", serif; font-size: 22px; font-weight: 700; }

/* 3. List - small thumb left */
.stpc-tpl-list-thumb-left .stpc-grid { gap: 16px; }
.stpc-tpl-list-thumb-left .stpc-item { display: flex; align-items: center; gap: 14px; background: transparent; }
.stpc-tpl-list-thumb-left .stpc-thumb { width: 90px; height: 70px; border-radius: 6px; }
.stpc-tpl-list-thumb-left .stpc-title { margin-bottom: 4px; font-size: 16px; font-weight: 700; }

/* 4. List - thumb right + divider */
.stpc-tpl-list-thumb-right .stpc-grid { gap: 16px; }
.stpc-tpl-list-thumb-right .stpc-item { display: flex; flex-direction: row-reverse; align-items: flex-start; justify-content: space-between; gap: 18px; background: transparent; }
.stpc-tpl-list-thumb-right .stpc-thumb { width: 150px; height: 100px; }
.stpc-tpl-list-thumb-right .stpc-body { flex: 1; }
.stpc-tpl-list-thumb-right .stpc-title { font-size: 18px; font-weight: 600; }

/* 5. Overlay - top stories */
.stpc-tpl-overlay .stpc-item { display: flex; align-items: flex-end; min-height: 380px; overflow: hidden; color: #fff; background: #111; }
.stpc-tpl-overlay .stpc-thumb { position: absolute; inset: 0; width: 100%; height: 100%; }
.stpc-tpl-overlay .stpc-item::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(0, 0, 0, .85) 0%, transparent 70%); }
.stpc-tpl-overlay .stpc-body { position: relative; z-index: 2; width: 100%; padding: 24px; }
.stpc-tpl-overlay .stpc-title { font-size: 24px; font-weight: 700; }
.stpc-tpl-overlay .stpc-title a,
.stpc-tpl-overlay .stpc-cat,
.stpc-tpl-overlay .stpc-excerpt,
.stpc-tpl-overlay .stpc-meta { color: #fff; }
.stpc-badge { position: absolute; top: 0; left: 0; z-index: 3; padding: 8px 14px; font-size: 14px; font-weight: 700; color: #fff; background: #d90000; }

/* 6. Numbered list - thumb left */
.stpc-tpl-numbered-thumb-left .stpc-grid { gap: 16px; }
.stpc-tpl-numbered-thumb-left .stpc-item { display: flex; align-items: center; gap: 14px; background: transparent; }
.stpc-tpl-numbered-thumb-left .stpc-num { padding: 0; font-size: 32px; background: none; clip-path: none; color: #d92b2b; min-width: 30px; text-align: center; }
.stpc-tpl-numbered-thumb-left .stpc-thumb { width: 90px; height: 90px; }
.stpc-tpl-numbered-thumb-left .stpc-title { margin-bottom: 4px; font-size: 17px; font-weight: 600; }

/* 7. Numbered feature + side list */
.stpc-feature-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.stpc-feature,
.stpc-side { align-self: start; background: #fff; border: 1px dotted #bdbdbd; box-shadow: 18px 18px 0 #faff4d; }
.stpc-feature .stpc-item { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; column-gap: 16px; }
.stpc-feature .stpc-thumb { grid-column: 1 / -1; height: 380px; }
.stpc-feature .stpc-num { margin-top: 22px; }
.stpc-feature .stpc-body { padding: 18px 18px 22px 0; }
.stpc-feature .stpc-title { font-size: 26px; font-weight: 600; }
.stpc-side { display: flex; flex-direction: column; gap: 22px; padding: 18px 20px; }
.stpc-side .stpc-item { display: flex; align-items: flex-start; gap: 14px; background: transparent; }
.stpc-side .stpc-num { order: 1; }
.stpc-side .stpc-body { order: 2; flex: 1; }
.stpc-side .stpc-thumb { order: 3; width: 110px; height: 110px; }
.stpc-side .stpc-title { margin-bottom: 6px; font-size: 17px; font-weight: 600; }

/* Responsive */
@media (min-width: 768px) {
	.stpc-tpl-card-top .stpc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.stpc-tpl-overlay .stpc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.stpc-feature-wrap { grid-template-columns: 1.7fr 1fr; }
}

@media (max-width: 767px) {
	.stpc-tpl-card-horizontal .stpc-item { flex-direction: column; }
	.stpc-tpl-card-horizontal .stpc-thumb { width: 100%; min-height: 200px; }
	.stpc-feature .stpc-thumb { height: 240px; }
	.stpc-tpl-list-thumb-right .stpc-thumb { width: 110px; height: 80px; }
}
