/* Insights list + article detail — Thai Solar Power */

:root {
  --insight-ink: #121212;
  --insight-muted: #5c5c5c;
  --insight-line: rgba(21, 21, 21, 0.08);
  --insight-surface: #f7f6f3;
  --insight-card: #ffffff;
  --insight-gold: var(--accent-color, #ffc451);
  --insight-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- List hub ---------- */

.insights-page .insights-page-title .heading {
  padding: 110px 0 70px;
  background:
    linear-gradient(135deg, rgba(18, 18, 18, 0.92) 0%, rgba(34, 28, 16, 0.88) 55%, rgba(18, 18, 18, 0.9) 100%),
    url('../img/hero-bg.jpg') center/cover no-repeat;
  border-top: 0;
  color: #fff;
}

.insights-page .insights-page-title .heading h1 {
  color: #fff;
}

.insights-page .insights-page-title .heading p {
  color: rgba(255, 255, 255, 0.78);
}

.insights-page .insights-kicker {
  display: inline-block;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--insight-gold);
  margin-bottom: 0.75rem;
}

.insights-hub {
  padding-top: 2.5rem;
}

.insights-featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  overflow: hidden;
  background: var(--insight-ink);
  color: #fff;
  text-decoration: none;
  margin-bottom: 2.5rem;
  min-height: 420px;
  position: relative;
  transition: transform 0.55s var(--insight-ease), box-shadow 0.55s var(--insight-ease);
}

.insights-featured:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.22);
  color: #fff;
}

.insights-featured__media {
  position: relative;
  overflow: hidden;
  min-height: 280px;
}

.insights-featured__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 1s var(--insight-ease);
}

.insights-featured:hover .insights-featured__media img {
  transform: scale(1.1);
}

.insights-featured__glow {
  position: absolute;
  inset: auto -20% -30% auto;
  width: 55%;
  height: 70%;
  background: radial-gradient(circle, rgba(255, 196, 81, 0.35), transparent 70%);
  pointer-events: none;
}

.insights-featured__body {
  padding: 2.75rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.insights-featured__body h2 {
  color: #fff;
  font-size: clamp(1.55rem, 2.4vw, 2.15rem);
  margin: 0.85rem 0 1rem;
  line-height: 1.25;
}

.insights-featured__body p {
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 1.25rem;
}

.insights-featured__cta {
  margin-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--insight-gold);
  transition: gap 0.35s var(--insight-ease);
}

.insights-featured:hover .insights-featured__cta {
  gap: 0.75rem;
}

.insights-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.35rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 196, 81, 0.12);
  color: #d0d0d0;
  border: 1px solid rgba(255, 196, 81, 0.55);
}

.insights-chip--light {
  background: rgba(255, 196, 81, 0.12);
  color: #d0d0d0;
  border-color: rgba(255, 196, 81, 0.45);
}

.insights-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  font-size: 0.88rem;
  color: var(--insight-muted);
}

.insights-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.insights-meta--light {
  color: rgba(255, 255, 255, 0.72);
}

.insights-filters {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.15rem;
  padding: 0;
  margin: 0 0 1.75rem;
  list-style: none;
}

.insights-filters__glider {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 0;
  height: 0;
  border-radius: 4px;
  background-color: var(--accent-color, #ffc451);
  pointer-events: none;
  transition:
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, width, height;
}

.insights-filters.is-glider-ready .insights-filters__glider {
  opacity: 1;
}

.insights-filters:not(.is-glider-ready) .insights-filters__glider {
  transition: none;
}

.insights-filter {
  position: relative;
  z-index: 1;
  cursor: pointer;
  display: inline-block;
  border: 0;
  background: transparent;
  color: var(--default-color, #444444);
  padding: 8px 20px 10px;
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  border-radius: 4px;
  font-family: var(--heading-font, "Raleway", sans-serif);
  transition: color 0.25s ease;
}

.insights-filter::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 5px;
  height: 2px;
  background-color: var(--accent-color, #ffc451);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.insights-filter:hover {
  color: var(--heading-color, #151515);
  background: transparent;
}

.insights-filter:hover:not(.is-active)::after {
  transform: scaleX(1);
}

.insights-filter.is-active {
  color: var(--contrast-color, #151515);
  background: transparent;
}

.insights-filter.is-active::after {
  transform: scaleX(0);
}

@media (max-width: 575px) {
  .insights-filter {
    font-size: 14px;
    padding: 8px 14px 10px;
  }

  .insights-filter::after {
    left: 14px;
    right: 14px;
  }
}

.insights-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--insight-card);
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--insight-line);
  overflow: hidden;
  transition: transform 0.45s var(--insight-ease), box-shadow 0.45s var(--insight-ease), border-color 0.45s;
}

.insights-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.1);
  border-color: rgba(255, 196, 81, 0.55);
  color: inherit;
}

.insights-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #1a1a1a;
}

.insights-card__media img,
.insights-card__placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s var(--insight-ease);
}

.insights-card__placeholder {
  background: linear-gradient(135deg, #2a2a2a, #111);
}

.insights-card:hover .insights-card__media img {
  transform: scale(1.08);
}

.insights-card__cat {
  position: absolute;
  left: 0.9rem;
  bottom: 0.9rem;
  background: rgba(18, 18, 18, 0.82);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  backdrop-filter: blur(6px);
}

.insights-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3rem;
  height: 3rem;
  margin: -1.5rem 0 0 -1.5rem;
  border-radius: 50%;
  background: rgba(255, 196, 81, 0.95);
  color: #111;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transform: scale(0.92);
  transition: transform 0.35s var(--insight-ease);
}

.insights-card:hover .insights-card__play {
  transform: scale(1);
}

.insights-card__body {
  padding: 1.35rem 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.insights-card__body h3 {
  font-size: 1.15rem;
  line-height: 1.35;
  margin-bottom: 0.65rem;
  color: var(--heading-color, #151515);
}

.insights-card__body p {
  color: var(--insight-muted);
  font-size: 0.94rem;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.insights-card__link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--insight-ink);
}

.insights-card__link i {
  transition: transform 0.35s var(--insight-ease);
}

.insights-card:hover .insights-card__link i {
  transform: translate(3px, -3px);
}

.insights-card--compact .insights-card__body h3 {
  font-size: 1.05rem;
}

.insights-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  border: 1px dashed var(--insight-line);
  background: var(--insight-surface);
}

.insights-hub-cta {
  margin-top: 3rem;
  padding: 1.75rem 2rem;
  background: linear-gradient(120deg, #151515 0%, #2a2418 55%, #1a150c 100%);
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  justify-content: space-between;
}

.insights-hub-cta h3 {
  color: #fff;
  margin-bottom: 0.35rem;
}

.insights-hub-cta p {
  color: rgba(255, 255, 255, 0.72);
}

.insights-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.4rem;
  background: var(--insight-gold);
  color: #151515;
  font-weight: 600;
  text-decoration: none;
  border: none;
  transition: transform 0.3s var(--insight-ease), background 0.3s, color 0.3s;
}

.insights-btn:hover {
  background: #fff;
  color: #151515;
  transform: translateY(-2px);
}

/* ---------- Detail ---------- */

.insight-hero {
  position: relative;
  color: #fff;
  min-height: 58vh;
  display: flex;
  align-items: flex-end;
  padding: 7.5rem 0 3.5rem;
  overflow: hidden;
}

.insight-hero__bg {
  position: absolute;
  inset: 0;
}

.insight-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  animation: insightKenBurns 18s ease-in-out infinite alternate;
}

.insight-hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 10, 10, 0.55) 0%, rgba(10, 10, 10, 0.72) 45%, rgba(10, 10, 10, 0.92) 100%),
    linear-gradient(90deg, rgba(255, 196, 81, 0.12), transparent 40%);
}

.insight-hero__content {
  max-width: 820px;
  padding-bottom: 0.5rem;
}

.insight-hero__content h1 {
  color: #fff;
  font-size: clamp(2rem, 4.2vw, 3.15rem);
  line-height: 1.15;
  margin: 1rem 0 1rem;
}

.insight-hero__excerpt {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.82);
  max-width: 42rem;
  margin-bottom: 1.25rem;
}

.insight-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.88rem;
  margin-bottom: 1.75rem;
  color: rgba(255, 255, 255, 0.65);
}

.insight-breadcrumbs a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.insight-breadcrumbs a:hover {
  color: var(--insight-gold);
}

.insight-breadcrumbs .current {
  color: var(--insight-gold);
}

.insight-hero__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
}

.insight-hero__progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--insight-gold);
  transition: width 0.1s linear;
}

.insight-article {
  padding-top: 3rem;
}

.insight-article__content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #2b2b2b;
}

.insight-article__content h2 {
  margin-top: 2.25rem;
  margin-bottom: 0.85rem;
  font-size: 1.55rem;
  color: var(--heading-color, #151515);
}

.insight-article__content p {
  margin-bottom: 1.15rem;
}

.insight-article__content ul {
  margin: 0 0 1.35rem;
  padding-left: 1.2rem;
}

.insight-article__content li {
  margin-bottom: 0.45rem;
}

.insight-article__content .insight-figure {
  margin: 2rem 0;
  opacity: 0;
  animation: insightReveal 0.9s var(--insight-ease) forwards;
}

.insight-article__content .insight-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.insight-article__content .insight-figure figcaption {
  margin-top: 0.65rem;
  font-size: 0.88rem;
  color: var(--insight-muted);
  font-style: italic;
}

.insight-media-row {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 1.5rem 1.75rem;
  align-items: start;
  margin: 2rem 0 2.35rem;
  opacity: 0;
  animation: insightReveal 0.9s var(--insight-ease) forwards;
}

.insight-media-row--image-text {
  grid-template-columns: 0.9fr 1.35fr;
}

.insight-media-row__text h2 {
  margin-top: 0;
}

.insight-media-row__text p:last-child {
  margin-bottom: 0;
}

.insight-media-row__media {
  margin: 0;
  max-width: 280px;
  justify-self: center;
}

.insight-media-row--text-image .insight-media-row__media {
  justify-self: end;
}

.insight-media-row--image-text .insight-media-row__media {
  justify-self: start;
}

.insight-media-row__media img {
  width: 100%;
  max-width: 280px;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 3 / 4;
}

.insight-media-row__media figcaption {
  margin-top: 0.55rem;
  font-size: 0.82rem;
  color: var(--insight-muted);
  font-style: italic;
  line-height: 1.4;
}

@media (max-width: 767px) {
  .insight-media-row,
  .insight-media-row--image-text {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .insight-media-row--image-text .insight-media-row__media {
    order: -1;
  }

  .insight-media-row__media,
  .insight-media-row--text-image .insight-media-row__media,
  .insight-media-row--image-text .insight-media-row__media {
    justify-self: center;
    max-width: 220px;
  }

  .insight-media-row__media img {
    max-width: 220px;
  }
}

.insight-media-block--top {
  margin-top: 0;
  margin-bottom: 2.5rem;
  padding-top: 0;
  border-top: 0;
}

.insight-media-block__head h2 {
  font-size: 1.45rem;
  margin-bottom: 0.35rem;
}

.insight-media-block__head p {
  color: var(--insight-muted);
  margin-bottom: 1.25rem;
}

.insight-video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.18);
}

.insight-video iframe,
.insight-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.insight-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.insight-gallery__item {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #111;
}

.insight-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--insight-ease), filter 0.4s;
}

.insight-gallery__zoom {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  opacity: 0;
  transition: opacity 0.35s;
  font-size: 1.35rem;
}

.insight-gallery__item:hover img {
  transform: scale(1.08);
  filter: brightness(0.85);
}

.insight-gallery__item:hover .insight-gallery__zoom {
  opacity: 1;
}

.insight-article__footer {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--insight-line);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.insight-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--insight-ink);
  font-weight: 600;
  text-decoration: none;
}

.insight-back:hover {
  color: color-mix(in srgb, var(--insight-gold), #000 35%);
}

.insight-related {
  padding-top: 1rem;
}

@keyframes insightKenBurns {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.12) translate3d(-1.5%, -1%, 0); }
}

@keyframes insightReveal {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 991px) {
  .insights-featured {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .insights-featured__media {
    min-height: 240px;
    aspect-ratio: 16 / 10;
  }

  .insights-featured__body {
    padding: 1.75rem 1.5rem 2rem;
  }

  .insight-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575px) {
  .insight-hero {
    min-height: 70vh;
    padding-top: 6.5rem;
  }

  .insight-gallery {
    grid-template-columns: 1fr;
  }

  .insights-hub-cta {
    padding: 1.5rem;
  }
}

/* Livewire filter transitions */
.insights-grid {
  animation: insightReveal 0.55s var(--insight-ease);
}
