/* ==========================================================================
   HAMCO Sports News - Homepage Styles
   ========================================================================== */

/* ---- Main Content Area ---- */
.hn-main {
  padding-top: var(--hn-space-8);
  padding-bottom: var(--hn-space-16);
  min-height: 60vh;
}

/* ---- Section Title (shared heading style) ---- */
.hn-section-title {
  font-family: var(--hn-font-headline);
  font-size: var(--hn-text-2xl);
  color: var(--hn-text);
  margin: 0 0 var(--hn-space-6);
  padding-bottom: var(--hn-space-3);
  border-bottom: 3px solid var(--hn-red);
  display: inline-block;
}

/* ---- Hero Section ---- */
.hn-hero-section {
  margin-bottom: var(--hn-space-10);
}

.hn-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--hn-space-4);
}

.hn-hero-grid__primary .hn-card-hero {
  height: 100%;
}

.hn-hero-grid__primary .hn-card-hero-title {
  font-size: var(--hn-text-4xl);
}

.hn-hero-grid__secondary {
  display: flex;
  flex-direction: column;
  gap: var(--hn-space-4);
}

/* ---- Hero Card (article-hero.php) ---- */
.hn-card-hero {
  position: relative;
  border-radius: var(--hn-radius-lg);
  overflow: hidden;
  background-color: var(--hn-black);
  background-size: cover;
  background-position: center;
  min-height: 280px;
}

.hn-card-hero-link {
  display: block;
  position: relative;
  height: 100%;
  text-decoration: none;
}

.hn-card-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--hn-transition-slow);
}

.hn-card-hero:hover img {
  transform: scale(1.03);
}

.hn-card-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 60%);
  z-index: var(--hn-z-base);
}

.hn-card-hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--hn-space-6);
  z-index: 2;
  color: var(--hn-white);
}

.hn-card-hero-title {
  font-family: var(--hn-font-headline);
  font-size: var(--hn-text-2xl);
  line-height: 1.1;
  margin: 0 0 var(--hn-space-2);
  color: var(--hn-white);
}

.hn-card-hero-excerpt {
  font-size: var(--hn-text-sm);
  color: var(--hn-gray-300);
  line-height: 1.5;
  margin: 0 0 var(--hn-space-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Shared Card Elements ---- */
.hn-card-badge {
  display: inline-block;
  background-color: var(--hn-red);
  color: var(--hn-white);
  font-family: var(--hn-font-ui);
  font-size: var(--hn-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--hn-space-1) var(--hn-space-3);
  border-radius: var(--hn-radius-sm);
  margin-bottom: var(--hn-space-3);
}

.hn-card-meta {
  font-family: var(--hn-font-ui);
  font-size: var(--hn-text-xs);
  color: var(--hn-text-light);
  display: flex;
  align-items: center;
  gap: var(--hn-space-3);
}

.hn-card-hero-content .hn-card-meta {
  font-size: var(--hn-text-sm);
  color: var(--hn-gray-300);
  gap: var(--hn-space-2);
}

.hn-card-meta span::before {
  content: "\00B7";
  margin-right: var(--hn-space-2);
}

.hn-card-meta span:first-child::before {
  display: none;
}

.hn-card-bookmark {
  position: absolute;
  top: var(--hn-space-3);
  right: var(--hn-space-3);
  z-index: 3;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: var(--hn-radius-full);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hn-white);
  cursor: pointer;
  transition: background-color var(--hn-transition-fast);
}

.hn-card-bookmark:hover {
  background: rgba(0, 0, 0, 0.8);
}

.hn-card-standard .hn-card-bookmark {
  color: var(--hn-text-muted);
  background: rgba(255, 255, 255, 0.85);
}

.hn-card-standard .hn-card-bookmark:hover {
  background: var(--hn-white);
  color: var(--hn-red);
}

.hn-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--hn-transition-slow);
}

.hn-card-play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* ---- Sport Tabs ---- */
.hn-tab-bar {
  display: flex;
  gap: var(--hn-space-2);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: var(--hn-space-3) 0;
  margin-bottom: var(--hn-space-8);
  border-bottom: 2px solid var(--hn-border);
}

.hn-tab-bar::-webkit-scrollbar {
  display: none;
}

.hn-tab {
  flex-shrink: 0;
  font-family: var(--hn-font-ui);
  font-size: var(--hn-text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--hn-text-muted);
  background: none;
  border: none;
  padding: var(--hn-space-2) var(--hn-space-4);
  border-radius: var(--hn-radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--hn-transition-color);
}

.hn-tab:hover {
  color: var(--hn-text);
  background-color: var(--hn-gray-100);
}

.hn-tab--active {
  color: var(--hn-white);
  background-color: var(--hn-red);
}

/* ---- News Section ---- */
.hn-news-section {
  margin-bottom: var(--hn-space-10);
}

/* ---- News Grid (standard article cards) ---- */
.hn-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--hn-space-6);
  margin-bottom: var(--hn-space-10);
}

.hn-card-standard {
  position: relative;
  background-color: var(--hn-card-bg);
  border-radius: var(--hn-radius-md);
  overflow: hidden;
  box-shadow: var(--hn-shadow-card);
  transition: box-shadow var(--hn-transition-base), transform var(--hn-transition-base);
}

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

.hn-card-standard-image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.hn-card-standard-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--hn-transition-slow);
}

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

.hn-card-standard-image .hn-card-badge {
  position: absolute;
  top: var(--hn-space-3);
  left: var(--hn-space-3);
  margin-bottom: 0;
}

.hn-card-standard-content {
  padding: var(--hn-space-4);
}

.hn-card-standard-title {
  font-family: var(--hn-font-headline);
  font-size: var(--hn-text-xl);
  line-height: 1.15;
  margin: 0 0 var(--hn-space-2);
}

.hn-card-standard-title a {
  color: var(--hn-text);
  text-decoration: none;
}

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

.hn-card-standard-excerpt {
  font-size: var(--hn-text-sm);
  color: var(--hn-text-muted);
  line-height: 1.5;
  margin: 0 0 var(--hn-space-3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Load More ---- */
.hn-load-more-wrap {
  text-align: center;
  margin: var(--hn-space-6) 0;
}

.hn-load-more {
  display: inline-block;
  padding: var(--hn-space-3) var(--hn-space-8);
  font-family: var(--hn-font-ui);
  font-size: var(--hn-text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--hn-red);
  background: none;
  border: 2px solid var(--hn-red);
  border-radius: var(--hn-radius-full);
  cursor: pointer;
  transition: var(--hn-transition-color);
}

.hn-load-more:hover {
  color: var(--hn-white);
  background-color: var(--hn-red);
}

.hn-load-more:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---- Trending + Spotlight Row ---- */
.hn-trending-spotlight {
  margin-bottom: var(--hn-space-10);
}

.hn-trending-spotlight__grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--hn-space-8);
}

/* ---- Sport Spotlight ---- */
.hn-sport-spotlight {
  min-width: 0;
}

.hn-spotlight-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--hn-space-4);
}

/* ---- Trending Sidebar ---- */
.hn-trending-sidebar {
  min-width: 0;
}

.hn-trending-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--hn-space-4);
}

.hn-trending-item {
  display: flex;
  align-items: flex-start;
  gap: var(--hn-space-4);
}

.hn-trending-item__rank {
  font-family: var(--hn-font-headline);
  font-size: var(--hn-text-3xl);
  line-height: 1;
  color: var(--hn-red);
  flex-shrink: 0;
  min-width: 2.5rem;
  text-align: center;
}

.hn-trending-item__thumb {
  width: 80px;
  height: 60px;
  border-radius: var(--hn-radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.hn-trending-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hn-trending-item__content {
  flex: 1;
  min-width: 0;
}

.hn-trending-item__title {
  font-family: var(--hn-font-subheading);
  font-size: var(--hn-text-md);
  font-weight: 600;
  line-height: 1.2;
  color: var(--hn-text);
  text-decoration: none;
  display: block;
}

.hn-trending-item__title:hover {
  color: var(--hn-red);
}

/* ---- Fan Poll Section ---- */
.hn-poll-section {
  margin-bottom: var(--hn-space-10);
}

.hn-poll {
  background-color: var(--hn-card-bg);
  border-radius: var(--hn-radius-lg);
  padding: var(--hn-space-6);
  box-shadow: var(--hn-shadow-card);
}

.hn-poll__question {
  font-family: var(--hn-font-headline);
  font-size: var(--hn-text-xl);
  color: var(--hn-text);
  margin: 0 0 var(--hn-space-5);
}

.hn-poll__options {
  display: flex;
  flex-direction: column;
  gap: var(--hn-space-3);
}

.hn-poll__option {
  display: block;
  width: 100%;
  padding: var(--hn-space-3) var(--hn-space-5);
  font-family: var(--hn-font-ui);
  font-size: var(--hn-text-md);
  font-weight: 600;
  color: var(--hn-text);
  background: var(--hn-gray-100);
  border: 2px solid var(--hn-border);
  border-radius: var(--hn-radius-md);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--hn-transition-fast), background-color var(--hn-transition-fast);
}

.hn-poll__option:hover {
  border-color: var(--hn-red);
  background-color: var(--hn-white);
}

.hn-poll__option.is-selected {
  border-color: var(--hn-red);
  background-color: var(--hn-red);
  color: var(--hn-white);
}

.hn-poll__results {
  margin-top: var(--hn-space-5);
  font-family: var(--hn-font-ui);
  font-size: var(--hn-text-sm);
  color: var(--hn-text-muted);
}

/* ---- Upcoming Section ---- */
.hn-upcoming-section {
  margin-bottom: var(--hn-space-10);
}

.hn-upcoming-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--hn-space-2);
}

.hn-upcoming-arrow {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hn-card-bg);
  border: 1px solid var(--hn-border);
  border-radius: 50%;
  color: var(--hn-text);
  cursor: pointer;
  transition: all 0.2s;
  z-index: 2;
  box-shadow: var(--hn-shadow-sm);
}

.hn-upcoming-arrow:hover {
  background: var(--hn-red);
  border-color: var(--hn-red);
  color: #fff;
}

.hn-upcoming-scroll {
  display: flex;
  gap: var(--hn-space-4);
  overflow-x: auto;
  flex: 1;
  min-width: 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--hn-space-4);
}

.hn-upcoming-scroll::-webkit-scrollbar {
  display: none;
}

.hn-upcoming-card {
  flex: 0 0 240px;
  background-color: var(--hn-card-bg);
  border-radius: var(--hn-radius-md);
  padding: var(--hn-space-5);
  box-shadow: var(--hn-shadow-card);
  text-align: center;
  transition: box-shadow var(--hn-transition-base);
}

.hn-upcoming-card:hover {
  box-shadow: var(--hn-shadow-card-hover);
}

.hn-upcoming-card__sport {
  font-family: var(--hn-font-ui);
  font-size: var(--hn-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--hn-red);
  margin-bottom: var(--hn-space-3);
}

.hn-upcoming-card__teams {
  font-family: var(--hn-font-subheading);
  font-size: var(--hn-text-lg);
  font-weight: 600;
  color: var(--hn-text);
  margin-bottom: var(--hn-space-2);
}

.hn-upcoming-card__vs {
  color: var(--hn-text-light);
  font-size: var(--hn-text-sm);
  margin: 0 var(--hn-space-1);
}

.hn-upcoming-card__time {
  font-family: var(--hn-font-ui);
  font-size: var(--hn-text-sm);
  color: var(--hn-text-muted);
}

.hn-upcoming-card__date {
  font-size: var(--hn-text-xs);
  color: var(--hn-text-light);
  margin-top: var(--hn-space-1);
}

/* ---- Responsive ---- */
@media (max-width: 1280px) {
  .hn-trending-spotlight__grid {
    grid-template-columns: 1fr 280px;
  }
}

@media (max-width: 1024px) {
  .hn-news-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hn-trending-spotlight__grid {
    grid-template-columns: 1fr;
  }

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

  .hn-hero-grid__primary .hn-card-hero-title {
    font-size: var(--hn-text-3xl);
  }
}

@media (max-width: 768px) {
  .hn-hero-grid {
    grid-template-columns: 1fr;
  }

  .hn-hero-grid__secondary {
    flex-direction: row;
  }

  .hn-hero-grid__primary .hn-card-hero-title {
    font-size: var(--hn-text-2xl);
  }

  .hn-card-hero-title {
    font-size: var(--hn-text-lg);
  }

  .hn-news-grid {
    grid-template-columns: 1fr;
    gap: var(--hn-space-4);
  }

  .hn-tab-bar {
    margin-bottom: var(--hn-space-6);
  }

  .hn-trending-spotlight__grid {
    padding: var(--hn-space-4);
  }

  .hn-spotlight-grid {
    grid-template-columns: 1fr;
  }

  .hn-upcoming-card {
    flex: 0 0 200px;
  }

  .hn-hero-grid__secondary {
    flex-direction: column;
  }

  .hn-poll__options {
    gap: var(--hn-space-2);
  }
}
