/**
 * Saint Clair Market Intelligence Feed
 * All styles for list, grid, and hero display modes.
 */

/* ========================================
 * Base / States
 * ======================================== */

.sc-feed-is-loading {
  opacity: 0.5;
}

.sc-feed-empty,
.sc-feed-error {
  font-size: 0.875rem;
  color: rgba(0, 0, 0, 0.5);
  font-style: italic;
  padding: 1rem 0;
}

.sc-feed-more {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: inherit;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.sc-feed-more:hover {
  opacity: 1;
}

/* ========================================
 * List Mode (default)
 * ======================================== */

.sc-feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sc-feed-list-item {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.sc-feed-list-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.sc-feed-list-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}

.sc-feed-list-link:hover {
  opacity: 0.7;
}

.sc-feed-list-title {
  display: block;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.sc-feed-list-date {
  display: block;
  font-size: 0.75rem;
  color: rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ========================================
 * Grid Mode
 * ======================================== */

.sc-feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.sc-feed-grid-item {
  position: relative;
}

.sc-feed-grid-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}

.sc-feed-grid-link:hover {
  opacity: 0.85;
}

.sc-feed-grid-image-wrap {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.05);
}

.sc-feed-grid-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.sc-feed-grid-link:hover .sc-feed-grid-image {
  transform: scale(1.03);
}

.sc-feed-grid-content {
  padding: 1rem 0;
}

.sc-feed-grid-title {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.sc-feed-grid-date {
  display: block;
  font-size: 0.75rem;
  color: rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ========================================
 * Hero Mode
 * ======================================== */

.sc-feed-hero {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.sc-feed-hero-item {
  position: relative;
  flex: 1 1 auto;
  min-height: 200px;
  overflow: hidden;
}

/* When parent has explicit height, scale proportionally */
.sc-feed-hero.has-height .sc-feed-hero-item {
  flex: 1 1 0;
  min-height: 0;
}

.sc-feed-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.4s ease;
}

.sc-feed-hero-item:hover .sc-feed-hero-bg {
  transform: scale(1.03);
}

.sc-feed-hero-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  text-decoration: none;
  color: #fff;
  z-index: 2;
}

.sc-feed-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(0, 0, 0, 0.7) 100%
  );
  transition: background 0.3s ease;
  z-index: 1;
}

.sc-feed-hero-link:hover .sc-feed-hero-overlay {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    rgba(0, 0, 0, 0.8) 100%
  );
}

.sc-feed-hero-content {
  position: relative;
  z-index: 3;
}

.sc-feed-hero-title {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 0.5rem 0;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.sc-feed-hero-description {
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.5;
  margin: 0 0 1rem 0;
  color: #fff;
  opacity: 0.9;
  max-width: 90%;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.sc-feed-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.sc-feed-hero-link:hover .sc-feed-hero-cta {
  opacity: 1;
}

.sc-feed-hero-cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  font-size: 0.9rem;
  color: #fff;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.sc-feed-hero-link:hover .sc-feed-hero-cta-icon {
  border-color: rgba(255, 255, 255, 0.8);
  transform: translateX(3px);
}

/* Multiple hero items - divider */
.sc-feed-hero-item + .sc-feed-hero-item {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hero states */
.sc-feed-hero .sc-feed-empty,
.sc-feed-hero .sc-feed-error {
  color: rgba(255, 255, 255, 0.5);
  padding: 2rem;
}

/* ========================================
 * Responsive
 * ======================================== */

@media (max-width: 768px) {
  .sc-feed-hero-link {
    padding: 1.5rem;
  }

  .sc-feed-hero-title {
    font-size: 1.25rem;
  }

  .sc-feed-hero-description {
    font-size: 0.85rem;
  }

  .sc-feed-grid {
    grid-template-columns: 1fr;
  }
}
