/* ==========================================================================
   Article Card Component — HAMCO Sports News
   Variants: hero, standard, compact, sidebar, video
   ========================================================================== */

/* ---------- Card Base ---------- */
.hn-card {
  --hn-red: #FE0000;
  --hn-black: #111111;
  --hn-white: #FFFFFF;
  --hn-gray-100: #F5F5F5;
  --hn-gray-200: #E5E5E5;
  --hn-gray-400: #9E9E9E;
  --hn-gray-600: #616161;
  --hn-gray-800: #333333;
  --hn-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --hn-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.14);
  --hn-radius: 8px;
  --hn-transition: 0.25s ease;

  position: relative;
  background: var(--hn-white);
  border-radius: var(--hn-radius);
  box-shadow: var(--hn-shadow);
  overflow: hidden;
  transition: transform var(--hn-transition), box-shadow var(--hn-transition);
}

.hn-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--hn-shadow-hover);
}

/* ---------- Shared Image (hn-card-img) ---------- */
.hn-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

/* ---------- Card Category Badge ---------- */
.hn-card-badge {
  display: inline-block;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hn-white);
  background: var(--hn-red);
  padding: 3px 10px;
  border-radius: 3px;
  line-height: 1.3;
  margin-bottom: 8px;
  transition: background var(--hn-transition);
}

.hn-card-badge:hover {
  background: var(--hn-black);
}

.hn-card-badge--small {
  font-size: 11px;
  padding: 2px 7px;
  margin-bottom: 4px;
}

/* ---------- Card Meta ---------- */
.hn-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--hn-gray-400);
}

.hn-card-meta-author {
  font-weight: 600;
  color: var(--hn-gray-600);
}

.hn-card-meta-time {
  color: var(--hn-gray-400);
}

/* ---------- Card Bookmark ---------- */
.hn-card-bookmark {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  border: none;
  border-radius: 50%;
  color: var(--hn-white);
  cursor: pointer;
  transition: background var(--hn-transition), transform var(--hn-transition);
  z-index: 2;
}

.hn-card-bookmark:hover {
  background: var(--hn-red);
  transform: scale(1.1);
}

.hn-card-bookmark.is-bookmarked {
  background: var(--hn-red);
}

.hn-card-bookmark.is-bookmarked svg path {
  fill: currentColor;
}

.hn-card-bookmark svg {
  width: 16px;
  height: 16px;
}

.hn-card-bookmark--small {
  width: 26px;
  height: 26px;
  top: 8px;
  right: 8px;
}

.hn-card-bookmark--small svg {
  width: 12px;
  height: 12px;
}

/* ---------- Play Icon Overlay ---------- */
.hn-card-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hn-card:hover .hn-card-play-icon {
  transform: translate(-50%, -50%) scale(1.1);
}

.hn-card-play-icon svg {
  display: block;
}

/* ==========================================================================
   STANDARD Card — Medium card (3-col grid)
   ========================================================================== */
.hn-card-standard-image {
  position: relative;
  overflow: hidden;
  background: var(--hn-gray-200);
  aspect-ratio: 16 / 10;
}

.hn-card-standard-image a {
  display: block;
  width: 100%;
  height: 100%;
}

.hn-card-standard-image .hn-card-img {
  transition: transform 0.4s ease;
}

.hn-card:hover .hn-card-standard-image .hn-card-img {
  transform: scale(1.04);
}

.hn-card-standard-image .hn-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  margin-bottom: 0;
  z-index: 1;
}

.hn-card-standard-content {
  padding: 16px 20px 20px;
}

.hn-card-standard-title {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--hn-black);
  margin: 0 0 8px;
  transition: color var(--hn-transition);
}

.hn-card-standard-title a {
  color: inherit;
  text-decoration: none;
}

.hn-card-standard-title a:hover,
.hn-card-standard-title a:focus-visible {
  color: var(--hn-red);
}

.hn-card-standard-excerpt {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--hn-gray-600);
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   HERO Card — Large featured card with full background image
   ========================================================================== */
.hn-card-hero {
  grid-column: 1 / -1;
  min-height: 400px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
}

.hn-card-hero:hover {
  transform: none;
}

.hn-card-hero-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.hn-card-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
  z-index: 1;
  transition: background 0.4s ease;
}

.hn-card-hero:hover .hn-card-hero-overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 60%, transparent 100%);
}

.hn-card-hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 60px 32px 28px;
  z-index: 2;
}

.hn-card-hero-content .hn-card-badge {
  margin-bottom: 12px;
}

.hn-card-hero-title {
  font-family: 'Source Sans 3', sans-serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--hn-white);
  margin: 0 0 10px;
  transition: color var(--hn-transition);
}

.hn-card-hero:hover .hn-card-hero-title {
  color: var(--hn-red);
}

.hn-card-hero-excerpt {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  max-width: 640px;
  margin: 0 0 12px;
}

.hn-card-hero .hn-card-meta {
  color: rgba(255, 255, 255, 0.6);
}

.hn-card-hero .hn-card-meta-author {
  color: var(--hn-white);
}

.hn-card-hero .hn-card-meta-time {
  color: rgba(255, 255, 255, 0.6);
}

.hn-card-hero .hn-card-bookmark {
  top: 16px;
  right: 16px;
}

/* ==========================================================================
   COMPACT Card — Horizontal layout (small thumb + content)
   ========================================================================== */
.hn-card-compact {
  display: flex;
  flex-direction: row;
  align-items: stretch;
}

.hn-card-compact-link {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  flex: 1;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.hn-card-compact-thumb {
  position: relative;
  flex: 0 0 160px;
  min-height: 120px;
  overflow: hidden;
  background: var(--hn-gray-200);
}

.hn-card-compact-thumb .hn-card-img {
  transition: transform 0.4s ease;
}

.hn-card:hover .hn-card-compact-thumb .hn-card-img {
  transform: scale(1.04);
}

.hn-card-compact-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 16px;
  min-width: 0;
}

.hn-card-compact-content .hn-card-badge {
  align-self: flex-start;
}

.hn-card-compact-title {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--hn-black);
  margin: 0 0 6px;
  transition: color var(--hn-transition);
}

.hn-card-compact:hover .hn-card-compact-title {
  color: var(--hn-red);
}

.hn-card-compact .hn-card-meta-time {
  font-size: 12px;
}

.hn-card-compact .hn-card-bookmark--small {
  top: 8px;
  right: 8px;
}

/* ==========================================================================
   SIDEBAR Card — Minimal (tiny thumbnail + title)
   ========================================================================== */
.hn-card-sidebar {
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: none;
  border-radius: 0;
  background: transparent;
  padding: 10px 0;
  border-bottom: 1px solid var(--hn-gray-200);
}

.hn-card-sidebar:hover {
  transform: none;
  box-shadow: none;
}

.hn-card-sidebar:last-child {
  border-bottom: none;
}

.hn-card-sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.hn-card-sidebar-thumb {
  flex: 0 0 72px;
  width: 72px;
  height: 56px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--hn-gray-200);
}

.hn-card-sidebar-thumb .hn-card-img {
  transition: transform 0.4s ease;
}

.hn-card-sidebar:hover .hn-card-sidebar-thumb .hn-card-img {
  transform: scale(1.06);
}

.hn-card-sidebar-content {
  flex: 1;
  min-width: 0;
}

.hn-card-sidebar-title {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--hn-black);
  margin: 0;
  transition: color var(--hn-transition);
}

.hn-card-sidebar:hover .hn-card-sidebar-title {
  color: var(--hn-red);
}

.hn-card-sidebar .hn-card-meta-time {
  font-size: 11px;
  margin-top: 4px;
  display: block;
}

/* ==========================================================================
   VIDEO Card — Play button overlay + duration badge
   ========================================================================== */
.hn-card-video .hn-card-play-icon {
  pointer-events: none;
}

.hn-card-video .hn-card-play-icon svg circle {
  transition: fill 0.3s ease;
}

.hn-card-video:hover .hn-card-play-icon svg circle {
  fill: rgba(254, 0, 0, 0.9);
}

.hn-card-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: var(--hn-white);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  z-index: 2;
  line-height: 1.4;
}

/* ==========================================================================
   Grid Layout Helpers
   ========================================================================== */
.hn-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .hn-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .hn-card-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hn-card-hero {
    min-height: 280px;
  }

  .hn-card-hero-content {
    padding: 40px 20px 20px;
  }

  .hn-card-hero-excerpt {
    display: none;
  }

  .hn-card-compact {
    flex-direction: column;
  }

  .hn-card-compact-link {
    flex-direction: column;
  }

  .hn-card-compact-thumb {
    flex: none;
    aspect-ratio: 16 / 9;
    min-height: auto;
  }

  .hn-card-standard-title {
    font-size: 20px;
  }
}
