/* =========================================================
   MOD AJAXNEWS — HANGA/DZEN EDITORIAL FEED
========================================================= */
.ajaxnews-wrap {
  width: 100%;
}

.ajaxnews-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  width: 100%;
}

.ajaxnews-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 22px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.06);
  transform: translateZ(0);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.ajaxnews-grid--dzen {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}


.ajaxnews-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit !important;
  text-decoration: none !important;
}

.ajaxnews-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #151515;
}

.ajaxnews-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0));
  pointer-events: none;
}

.ajaxnews-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 0.45s ease, filter 0.45s ease;
}

.ajaxnews-card__badge,
.ajaxnews-overlay .badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  width: auto;
  max-width: calc(100% - 28px);
  padding: 6px 10px;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #fff !important;
  background: linear-gradient(135deg, #f10808, #d21212) !important;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 6px 14px rgba(241, 8, 8, 0.34);
}

.ajaxnews-card__body,
.ajaxnews-overlay {
  position: static;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: flex-start;
  padding: 18px 18px 16px;
  color: #222;
  background: #fff;
  text-shadow: none;
}

.ajaxnews-card__title,
.ajaxnews-overlay h6 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  font-size: 1.03rem;
  font-weight: 800;
  line-height: 1.25;
  color: #232323 !important;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ajaxnews-card__intro {
  display: -webkit-box;
  overflow: hidden;
  margin: 10px 0 0;
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.34;
  color: #666;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ajaxnews-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: auto;
  padding-top: 13px;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.2;
  color: #666;
}

.ajaxnews-card:hover {
  border-color: rgba(241, 8, 8, 0.18);
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
}

.ajaxnews-card:hover .ajaxnews-card__media img {
  transform: scale(1.07);
  filter: saturate(1.08) contrast(1.04);
}

.ajaxnews-actions {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.ajaxnews-load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  padding: 12px 26px;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  color: #fff !important;
  background: linear-gradient(135deg, #f10808, #d21212);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(241, 8, 8, 0.26);
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.ajaxnews-load-more:hover,
.ajaxnews-load-more:focus {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(241, 8, 8, 0.34);
}

.ajaxnews-load-more:disabled,
.ajaxnews-load-more.is-loading {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.ajaxnews-load-more.is-hidden {
  display: none !important;
}

@media (max-width: 1199.98px) {
  .ajaxnews-grid {
    gap: 18px;
  }

  .ajaxnews-card__title,
  .ajaxnews-overlay h6 {
    font-size: 0.98rem;
  }
}

@media (max-width: 991.98px) {
  .ajaxnews-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 575.98px) {
  .ajaxnews-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .ajaxnews-card--mobile-hidden {
    display: none !important;
  }

  .ajaxnews-card {
    border-radius: 16px;
  }

  .ajaxnews-card__media {
    aspect-ratio: 1 / 0.86;
  }

  .ajaxnews-card__badge,
  .ajaxnews-overlay .badge {
    left: 9px;
    bottom: 9px;
    max-width: calc(100% - 18px);
    padding: 4px 7px;
    font-size: 0.56rem;
    border-radius: 6px;
  }

  .ajaxnews-card__body,
  .ajaxnews-overlay {
    padding: 11px 11px 10px;
  }

  .ajaxnews-card__title,
  .ajaxnews-overlay h6 {
    font-size: 0.78rem;
    line-height: 1.14;
    letter-spacing: -0.01em;
    -webkit-line-clamp: 3;
  }

  .ajaxnews-card__intro {
    display: none;
  }

  .ajaxnews-card__meta {
    padding-top: 8px;
    font-size: 0.62rem;
  }

  .ajaxnews-actions {
    margin-top: 20px;
  }

  .ajaxnews-load-more {
    min-width: 170px;
    padding: 10px 20px;
    font-size: 0.88rem;
  }
}

@media (max-width: 380px) {
  .ajaxnews-card__title,
  .ajaxnews-overlay h6 {
    font-size: 0.74rem;
    line-height: 1.1;
  }

  .ajaxnews-card__meta {
    font-size: 0.58rem;
  }
}



/* Skeleton loader for AJAX loading state */
.ajaxnews-card--skeleton {
  pointer-events: none;
  overflow: hidden;
}

.ajaxnews-skeleton {
  display: block;
  position: relative;
  overflow: hidden;
  background: #eeeeee;
  border-radius: 10px;
}

.ajaxnews-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.62), transparent);
  animation: ajaxnews-skeleton-shimmer 1.15s infinite;
}

.ajaxnews-skeleton--media {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 20px 20px 0 0;
}

.ajaxnews-skeleton--title {
  height: 18px;
  width: 92%;
  margin-bottom: 10px;
}

.ajaxnews-skeleton--line {
  height: 14px;
  width: 74%;
  margin-bottom: 14px;
}

.ajaxnews-skeleton--meta {
  height: 12px;
  width: 48%;
}

@keyframes ajaxnews-skeleton-shimmer {
  100% {
    transform: translateX(100%);
  }
}

@media (max-width: 575.98px) {
  .ajaxnews-skeleton--media {
    aspect-ratio: 1 / 0.86;
    border-radius: 16px 16px 0 0;
  }

  .ajaxnews-skeleton--title {
    height: 14px;
  }

  .ajaxnews-skeleton--line {
    height: 11px;
  }

  .ajaxnews-skeleton--meta {
    height: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ajaxnews-card,
  .ajaxnews-card__media img,
  .ajaxnews-load-more,
  .ajaxnews-skeleton::after {
    transition: none !important;
    animation: none !important;
  }
}
