/**
 * News Landing Page Styles
 * Matches the demo site design
 */

/* News Landing Container */
.news-landing {
  width: 100%;
}

/* Hero Section */
.news-hero {
  background: linear-gradient(to bottom, #171717, #262626);
  color: #fff;
  padding: 4rem 1rem;
  text-align: center;
}

.news-hero__container {
  max-width: 1200px;
  margin: 0 auto;
}

.news-hero__title {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1rem;
  color: #fff;
}

.news-hero__subtitle {
  font-size: 1.25rem;
  line-height: 1.6;
  color: #d4d4d4;
  margin: 0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* News Categories Section */
.news-categories {
  padding: 4rem 1rem;
  background: #f9fafb;
}

.news-categories__container {
  max-width: 1200px;
  margin: 0 auto;
}

.news-categories__title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 2rem;
  color: #1a1a1a;
  text-align: center;
}

.news-categories__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

@media (min-width: 768px) {
  .news-categories__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .news-categories__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Category Card */
.category-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Category Card Image */
.category-card__image {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 66.67%; /* 3:2 aspect ratio */
  overflow: hidden;
  background: #f3f4f6;
}

.category-card__image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease-in-out;
}

.category-card:hover .category-card__image img {
  transform: scale(1.05);
}

/* Placeholder for categories without images */
.category-card__image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.category-card__icon {
  font-size: 3rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Category Card Content */
.category-card__content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.category-card__title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 0.75rem;
  color: #1a1a1a;
  transition: color 0.15s ease-in-out;
}

.category-card:hover .category-card__title {
  color: #3b82f6;
}

.category-card__description {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #666;
  margin: 0 0 1rem;
  flex: 1;
}

.category-card__count {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #999;
  display: block;
  margin-bottom: 0.5rem;
}

.category-card__arrow {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  font-size: 1.5rem;
  color: #3b82f6;
  transition: transform 0.15s ease-in-out;
}

.category-card:hover .category-card__arrow {
  transform: translateX(4px);
}

/* Latest Headlines Section */
.news-headlines {
  padding: 4rem 1rem;
  background: #fff;
}

.news-headlines__container {
  max-width: 1200px;
  margin: 0 auto;
}

.news-headlines__title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 2rem;
  color: #1a1a1a;
  text-align: center;
}

.news-headlines__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Headline Item */
.headline-item {
  border-bottom: 1px solid #e5e7eb;
  transition: background-color 0.15s ease-in-out;
}

.headline-item:last-child {
  border-bottom: none;
}

.headline-item:hover {
  background-color: #f9fafb;
}

.headline-item__link {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0;
  text-decoration: none;
  color: inherit;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .headline-item__link {
    flex-direction: row;
    align-items: center;
    gap: 2rem;
  }
}

.headline-item__meta {
  flex-shrink: 0;
  width: 100px;
}

.headline-item__date {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #666;
}

.headline-item__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.headline-item__title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
  color: #1a1a1a;
  transition: color 0.15s ease-in-out;
}

.headline-item:hover .headline-item__title {
  color: #3b82f6;
}

.headline-item__footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.headline-item__image {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  overflow: hidden;
  border-radius: 0.5rem;
  margin-top: 1rem;
}

@media (min-width: 640px) {
  .headline-item__image {
    width: 150px;
    height: 150px;
  }
}

@media (min-width: 768px) {
  .headline-item__image {
    margin-top: 0;
  }
}

.headline-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease-in-out;
}

.headline-item:hover .headline-item__image img {
  transform: scale(1.05);
}

.headline-item__source {
  font-size: 0.875rem;
  color: #666;
}

.headline-item__category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #3b82f6;
  padding: 0.25rem 0.75rem;
  background-color: #eff6ff;
  border-radius: 0.25rem;
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .news-hero__title {
    font-size: 2rem;
  }

  .news-hero__subtitle {
    font-size: 1rem;
  }

  .news-hero {
    padding: 3rem 1rem;
  }

  .news-categories,
  .news-headlines {
    padding: 3rem 1rem;
  }

  .news-headlines__title {
    font-size: 1.5rem;
  }

  .headline-item__title {
    font-size: 1.125rem;
  }
}

/* Loading State */
.news-landing.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Print Styles */
@media print {
  .news-hero {
    background: none;
    color: #000;
  }

  .category-card,
  .headline-item {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
