/* ==========================================================================
   Tiki Blog — post cards, hero, promo banner, topic section
   (Figma "D-Blog Homepage": body 1200px, 40px gutters, 3×351px card grid)
   ========================================================================== */

/* ----- Shared card pieces ----- */
.amlab-tk-card a { color: inherit; text-decoration: none; }
.amlab-tk-card__title { margin: 0; color: #1d2636; font-weight: 700; letter-spacing: -0.02em; }
.amlab-tk-card__title a:hover { color: #0a68ff; }
.amlab-tk-thumb { display: block; overflow: hidden; background: #f5f5fa; }
.amlab-tk-thumb img, .amlab-tk-thumb__empty { display: block; width: 100%; height: 100%; object-fit: cover; }
.amlab-tk-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; font-size: 14px; line-height: 1.5; color: #a3a3a3; letter-spacing: -0.02em; }
.amlab-tk-meta__cat { color: #5c9aff; font-weight: 500; }
.amlab-tk-meta__cat:hover { text-decoration: underline; }
.amlab-tk-meta__views { display: inline-flex; align-items: center; gap: 4px; }
.amlab-tk-eye { display: inline-block; vertical-align: middle; }

/* Big card (hero left, 600px) */
.amlab-tk-card--big { display: flex; flex-direction: column; gap: 12px; }
.amlab-tk-thumb--big { aspect-ratio: 800 / 420; border-radius: 12px; }
.amlab-tk-card--big .amlab-tk-card__title { font-size: 24px; line-height: 32px; max-height: 68px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Medium card (hero right list) */
.amlab-tk-card--medium { display: flex; gap: 12px; align-items: flex-start; }
.amlab-tk-thumb--medium { flex: 0 0 180px; width: 180px; height: 95px; border-radius: 4px; }
.amlab-tk-card--medium .amlab-tk-card__body { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.amlab-tk-card--medium .amlab-tk-card__title { font-size: 16px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.amlab-tk-card--medium .amlab-tk-meta { gap: 4px 12px; }
.amlab-tk-card--medium .amlab-tk-meta__cat { flex: 1 0 100%; font-weight: 400; }

/* Grid card (topic sections, archives) */
.amlab-tk-card--grid { display: flex; flex-direction: column; gap: 16px; padding: 12px; border-radius: 16px; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); min-height: 368px; }
.amlab-tk-thumb--grid { aspect-ratio: 342 / 179; border-radius: 4px; }
.amlab-tk-card--grid .amlab-tk-card__body { display: flex; flex-direction: column; gap: 8px; }
.amlab-tk-card__cat { font-size: 16px; line-height: 20px; font-weight: 500; color: #5c9aff; letter-spacing: -0.02em; }
.amlab-tk-card__cat:hover { text-decoration: underline; }
.amlab-tk-card--grid .amlab-tk-card__title { font-size: 16px; line-height: 1.3; font-weight: 600; color: #000; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.amlab-tk-card--grid .amlab-tk-meta { justify-content: space-between; }
.amlab-tk-card__excerpt { margin: 0; font-size: 14px; line-height: 1.5; color: #333; letter-spacing: -0.02em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ----- Page rhythm (body column = 1200px incl. 40px padding) ----- */
/* Spacing uses padding: WP layout styles zero the first child margin and add
   1.5rem between siblings; explicit margin:0 keeps the rhythm ours. */
.amlab-tk-hero, .amlab-tk-banner, .amlab-tk-topic { width: min(100% - 2rem, 1200px); margin: 0 auto; padding-top: 40px; }
.amlab-tk-topic { padding-left: 40px; padding-right: 40px; }
.amlab-tk-topic:last-child { padding-bottom: 24px; }

/* ----- Hero ----- */
.amlab-tk-hero { display: flex; gap: 24px; align-items: flex-start; }
.amlab-tk-hero__big { flex: 0 0 600px; max-width: 600px; }
.amlab-tk-hero__list { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

/* ----- Promo banner ----- */
.amlab-tk-banner { position: relative; }
.amlab-tk-banner__box { display: flex; flex-direction: column; gap: 12px; padding: 12px; border-radius: 24px; background: #f2f7ff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); }
.amlab-tk-banner__viewport { overflow: hidden; border-radius: 12px; }
.amlab-tk-banner__track { display: flex; transition: transform 0.45s ease; }
.amlab-tk-banner__slide { flex: 0 0 100%; display: flex; gap: 12px; }
.amlab-tk-banner__img { flex: 1 1 0; min-width: 0; display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 750 / 422; }
.amlab-tk-banner__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.amlab-tk-banner__dots { display: flex; justify-content: center; align-items: center; gap: 4px; height: 8px; }
.amlab-tk-banner__dot { width: 16px; height: 2px; padding: 0; border: 0; border-radius: 4px; background: #e5e5e5; cursor: pointer; transition: width 0.2s ease, background 0.2s ease; }
.amlab-tk-banner__dot.is-active { width: 24px; background: #0a68ff; }
.amlab-tk-banner__arrow { position: absolute; top: calc(50% + 20px); transform: translateY(-50%); width: 32px; height: 32px; border: 0; border-radius: 100px; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; z-index: 2; }
.amlab-tk-banner__arrow--prev { left: -40px; }
.amlab-tk-banner__arrow--prev img { transform: rotate(180deg); }
.amlab-tk-banner__arrow--next { right: -40px; }
.amlab-tk-banner__arrow:hover { background: #f2f7ff; }

/* ----- Topic section ----- */
.amlab-tk-topic { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.amlab-tk-topic__title { margin: 0; width: 100%; text-align: center; font-size: 55px; line-height: 76px; font-weight: 700; color: #333; letter-spacing: -0.02em; }
.amlab-tk-topic__title a { color: inherit; text-decoration: none; }
.amlab-tk-topic__title a:hover { color: #0a68ff; }

.amlab-tk-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; }
.amlab-tk-chip { padding: 8px 24px; border: 1px solid #0a68ff; border-radius: 1000px; background: #fff; color: #0a68ff; font: inherit; font-size: 14px; font-weight: 600; letter-spacing: -0.02em; text-transform: uppercase; cursor: pointer; transition: background 0.15s ease, color 0.15s ease; }
.amlab-tk-chip:hover { background: #f2f7ff; }
.amlab-tk-chip.is-active { background: #0a68ff; color: #fff; }

.amlab-tk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px 16px; width: 100%; max-width: 1085px; }
.amlab-tk-grid.is-loading { opacity: 0.55; pointer-events: none; }

.amlab-tk-more { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.amlab-tk-more__btn { padding: 13px 40px; border: 1px solid #3381ff; border-radius: 1000px; background: #f2f7ff; color: #0a68ff; font: inherit; font-size: 16px; font-weight: 600; letter-spacing: -0.02em; text-transform: uppercase; cursor: pointer; }
.amlab-tk-more__btn:hover { background: #0a68ff; color: #fff; }
.amlab-tk-more__btn[disabled] { opacity: 0.6; cursor: wait; }
.amlab-tk-more__note { margin: 0; font-size: 14px; line-height: 20px; color: #737373; letter-spacing: -0.02em; }

/* ----- Responsive ----- */
@media (max-width: 1023px) {
	.amlab-tk-hero { flex-direction: column; }
	.amlab-tk-hero__big { flex-basis: auto; max-width: none; width: 100%; }
	.amlab-tk-hero__list { width: 100%; }
	.amlab-tk-topic { padding-left: 0; padding-right: 0; }
	.amlab-tk-topic__title { font-size: 40px; line-height: 1.2; }
	.amlab-tk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.amlab-tk-banner__arrow--prev { left: 4px; }
	.amlab-tk-banner__arrow--next { right: 4px; }
}
@media (max-width: 781px) {
	.amlab-tk-hero, .amlab-tk-banner, .amlab-tk-topic { padding-top: 24px; }
	.amlab-tk-card--big .amlab-tk-card__title { font-size: 20px; line-height: 28px; max-height: none; }
	.amlab-tk-thumb--medium { flex-basis: 120px; width: 120px; height: 72px; }
	.amlab-tk-card--medium .amlab-tk-card__title { font-size: 14px; }
	.amlab-tk-banner__box { padding: 8px; border-radius: 16px; }
	.amlab-tk-banner__slide { gap: 8px; }
	.amlab-tk-topic__title { font-size: 28px; }
	.amlab-tk-chips { gap: 8px; }
	.amlab-tk-chip { padding: 6px 14px; font-size: 12px; }
	.amlab-tk-grid { grid-template-columns: minmax(0, 1fr); }
	.amlab-tk-card--grid { min-height: 0; }
}
