/**
 * Kulwatha Center — v1.2.2 homepage polish.
 * - Analysis becomes a compact multi-card grid.
 * - Minimum utility/meta text size is 14px.
 * - Dark result/CTA surfaces keep readable contrast.
 */

/* --------------------------------------------------------------------------
   Minimum readable type
   -------------------------------------------------------------------------- */
small,
.kw-eyebrow,
.kw-kicker,
.kw-meta,
.kwd-date,
.kwd-top-menu a,
.kwd-updates-title,
.kwd-ticker-group a,
.kwf-footer,
.kwf-footer a,
.kwf-footer small,
.khn-head > div > span,
.khn-cat,
.khn-type-badge,
.khn-meta,
.khn-side-meta,
.kwsv2-title > span,
.kwsv2-count,
.kwsv2-number,
.kwsv2-latest,
.kwr-head > div > span,
.kwr-cat,
.kwr-item-cat,
.kwr-meta,
.kwr-item-content > span,
.kwres-head > div > span,
.kwres-dashboard-label,
.kwres-dashboard small,
.kwres-feature-kicker,
.kwres-facts small,
.kwres-methodology small,
.kwres-small-cat,
.kwres-timeline-date,
.kwa-head > div > span,
.kwa-card-meta,
.kwa-card-cat,
.kwn-head > div > span,
.kwn-cat,
.kwn-small-cat,
.kwn-meta,
.kwn-feed-content > span,
.kwn-popular-item span,
.kwsvc-intro > span,
.kwabout-label,
.kwcta2-label,
.kwcta2-mini-card span,
.kwcta2-latest small,
.kw-breadcrumbs,
.kw-card__meta,
.kw-archive-meta,
.kw-single__meta,
.kw-page-hero .kw-eyebrow {
  font-size: 14px !important;
}

/* Ensure normal copy never gets visually tiny on dense cards. */
body,
button,
input,
textarea,
select {
  font-size: 16px;
}

/* --------------------------------------------------------------------------
   Analysis: image above, title below, four cards on desktop
   -------------------------------------------------------------------------- */
.kwa-section--cards .kwa-head {
  margin-bottom: 24px;
}

.kwa-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.kwa-card {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--kwd-line, #e8e2d7);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(32, 36, 39, 0.055);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.kwa-card:hover {
  transform: translateY(-3px);
  border-color: rgba(203, 157, 14, .45);
  box-shadow: 0 16px 34px rgba(32, 36, 39, 0.085);
}

.kwa-card-image {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #ece8df;
}

.kwa-card-image::after {
  content: "";
  position: absolute;
  inset: 58% 0 0;
  background: linear-gradient(to bottom, transparent, rgba(16, 20, 22, .12));
  pointer-events: none;
}

.kwa-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.kwa-card:hover .kwa-card-image img {
  transform: scale(1.025);
}

.kwa-card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 17px 18px 19px;
}

.kwa-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  color: var(--kwd-muted, #7b7f81);
  line-height: 1.5;
}

.kwa-card-cat {
  color: var(--kwd-gold-dark, #b48600);
  font-weight: 800;
  text-decoration: none;
}

.kwa-card-meta time {
  flex: 0 0 auto;
  color: var(--kwd-muted, #7b7f81);
  direction: ltr;
  unicode-bidi: isolate;
}

.kwa-card h3 {
  margin: 0;
  color: var(--kwd-charcoal, #202427);
  font-size: 19px;
  line-height: 1.65;
  font-weight: 800;
}

.kwa-card h3 a {
  color: inherit;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kwa-card h3 a:hover {
  color: var(--kwd-gold-dark, #b48600);
}

/* --------------------------------------------------------------------------
   Dark sections: keep body copy and titles readable
   -------------------------------------------------------------------------- */
.kwres-section,
.kwres-section h2,
.kwres-section h3,
.kwres-section h4,
.kwres-section h2 a,
.kwres-section h3 a,
.kwres-section h4 a,
.kwcta2-box,
.kwcta2-box h2,
.kwcta2-box h3,
.kwcta2-box strong,
.kwcta2-box a {
  color: #fff;
}

.kwres-head p,
.kwres-dashboard p,
.kwres-feature-content > p,
.kwres-methodology p,
.kwcta2-content > p,
.kwcta2-mini-card span,
.kwcta2-latest small {
  color: rgba(255,255,255,.76) !important;
}

.kwres-timeline-card h4,
.kwres-timeline-card h4 a {
  color: #f7f7f4 !important;
}

.kwres-timeline-card {
  background: rgba(255,255,255,.055);
}

.kwres-timeline-card:hover {
  background: rgba(255,255,255,.085);
}

/* Homepage hero overlay text must stay light over photography. */
.khn-featured-overlay h2,
.khn-featured-overlay h2 a,
.khn-featured-overlay p,
.khn-featured-overlay .khn-meta,
.khn-featured-overlay .khn-meta span,
.khn-side-overlay h3,
.khn-side-overlay h3 a,
.khn-side-overlay .khn-side-meta,
.khn-side-overlay .khn-side-meta span {
  color: #fff !important;
  text-shadow: 0 1px 12px rgba(0,0,0,.34);
}

/* --------------------------------------------------------------------------
   Responsive analysis grid
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .kwa-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .kwa-cards-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .kwa-card-image {
    aspect-ratio: 16 / 9;
  }

  .kwa-card-content {
    padding: 15px 16px 17px;
  }

  .kwa-card h3 {
    font-size: 18px;
  }

  .kwd-updates-title,
  .kwd-ticker-group a {
    font-size: 14px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kwa-card,
  .kwa-card-image img {
    transition: none;
  }
}
