/* =========================================
   HERO SECTION CSS
   File: css/frontpage.css
========================================= */

.hero-section-wrapper {
  padding: var(--space-6) 0;
}

.hero-section-wrapper .container {
  width: var(--global-width-percent);
  max-width: var(--global-max-width);
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

.hero-section {
  display: grid;
  grid-template-columns: 2.25fr 1fr;
  gap: var(--space-8);
  margin-bottom: 0;
}

/* Featured Article (Left Side) */
.hero-main-grid {
  display: flex;
  flex-direction: column;
}

.hero-featured-item {
  background: var(--background-white);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: box-shadow var(--transition-base);
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  align-items: stretch;
}

.hero-featured-item:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.hero-featured-content {
  background: var(--background-gray);
  padding: 30px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-featured-category {
  color: var(--brand-primary);
  font-size: var(--font-xs);
  font-weight: var(--font-bold);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-decoration: none;
  margin-bottom: 16px;
  display: inline-block;
  transition: opacity var(--transition-fast);
  font-family: var(--font-family);
}

.hero-featured-category:hover {
  opacity: 0.8;
}

.hero-featured-title {
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: var(--font-bold);
  margin: 0 0 20px;
  color: var(--text-primary);
  font-family: var(--font-family);
}

.hero-featured-title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.hero-featured-title a:hover {
  color: var(--brand-primary);
}

.hero-featured-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-xs);
  color: var(--text-muted);
  font-weight: var(--font-medium);
  margin-top: auto;
  font-family: var(--font-family);
}

.hero-featured-author a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.hero-featured-author a:hover {
  color: var(--brand-primary);
}

.hero-featured-separator {
  color: var(--text-muted);
}

.hero-featured-time {
  color: var(--text-muted);
}

.hero-featured-image {
  display: block;
  position: relative;
  overflow: hidden;
  height: 100%;
}

.hero-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--transition-base);
}

.hero-featured-item:hover .hero-featured-image img {
  transform: scale(1.02);
}

/* Live Video Sidebar (Right Side) */
.hero-live-sidebar {
  display: flex;
  flex-direction: column;
}

.hero-live-item {
  background: var(--background-white);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transition: box-shadow var(--transition-base);
}

.hero-live-item:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.hero-live-media {
  position: relative;
  display: block;
  width: 100%;
  padding-top: 56.25%; /* Force 16:9 aspect ratio */
  overflow: hidden;
}

.hero-live-thumb {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: cover !important;
  transition: transform var(--transition-base);
}

.hero-live-media:hover .hero-live-thumb {
  transform: scale(1.02);
}

.hero-live-pill {
  position: absolute;
  left: 16px;
  bottom: 16px;
  background: var(--brand-primary);
  color: var(--background-white);
  font-weight: var(--font-bold);
  font-size: var(--font-sm);
  padding: 6px 12px;
  box-shadow: 0 2px 8px rgba(204, 0, 0, 0.3);
  font-family: var(--font-family);
  z-index: 10;
}

.hero-live-pill-closed {
  background: #666 !important;
  color: #fff;
}

.hero-live-play {
  position: absolute;
  right: 16px;
  bottom: 16px;
  font-size: 28px;
  color: var(--background-white);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  transition: transform var(--transition-fast);
  z-index: 10;
}

.hero-live-media:hover .hero-live-play {
  transform: scale(1.1);
}

.hero-live-title {
  margin: 16px 16px 20px;
  font-size: var(--font-lg);
  font-weight: var(--font-bold);
  line-height: 1.3;
  font-family: var(--font-family);
}

.hero-live-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.hero-live-title a:hover {
  color: var(--brand-primary);
}

/* Live Blog Title - 2 Line Limit */
.hero-live-title-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  max-height: 2.6em;
}

/* =========================================
   RESPONSIVE STYLES
========================================= */

@media (max-width: 1024px) {
  .hero-section {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  
  /* Featured article first, live blog after */
  .hero-main-grid {
    order: 0;
  }
  
  .hero-live-sidebar {
    display: flex;
    order: 1;
  }
  
  .hero-featured-item {
    grid-template-columns: 1fr;
  }
  
  .hero-featured-content {
    order: 2;
    padding: 32px 24px;
  }
}

@media (max-width: 768px) {
  .hero-section {
    gap: var(--space-5);
  }
  
  .hero-featured-content {
    padding: 24px 20px;
  }
}

@media (max-width: 480px) {
  .hero-section {
    gap: var(--space-4);
  }
  
  .hero-featured-content {
    padding: 20px 16px;
  }
  
  .hero-live-title {
    margin: 12px 12px 16px;
    font-size: var(--font-base);
  }
}