/* =====================================================
   ORCA — Home
   ===================================================== */

/* ── Seção 1: Featured + Trending ─────────────────── */

.home-featured__layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: var(--space-12);
  align-items: start;
}

/* ── Grid editorial de destaques ──────────────────── */

.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

/* Coluna de cards secundários (empilhados) */
.featured-grid__secondary {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* ── Card base ─────────────────────────────────────── */

.featured-card {
  display: flex;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--duration) var(--ease),
              transform  var(--duration) var(--ease);
}

.featured-card:hover {
  box-shadow: 0 8px 32px rgba(22,34,38,0.13);
  transform: translateY(-3px);
}

/* ── Card hero (grande, ocupa coluna esquerda) ─────── */

.featured-card--hero {
  flex-direction: column;
  height: 100%;
  animation: fadeUp 400ms var(--ease) both;
}

.featured-card--hero .featured-card__img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--navy);
  flex-shrink: 0;
  position: relative;
}

.featured-card--hero .featured-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms var(--ease);
}

.featured-card--hero:hover .featured-card__img-wrap img {
  transform: scale(1.05);
}

/* Overlay sutil na imagem do hero */
.featured-card--hero .featured-card__img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 50%,
    rgba(22,34,38,0.18) 100%
  );
  pointer-events: none;
}

.featured-card__img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.15em;
  color: rgba(191,183,168,0.2);
}

.featured-card--hero .featured-card__body {
  padding: 24px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.featured-card--hero .featured-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
  letter-spacing: -0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--duration) var(--ease);
}

.featured-card--hero:hover .featured-card__title {
  color: var(--red);
}

.featured-card__excerpt {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.75;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.featured-card__date {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.featured-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  transition: gap var(--duration) var(--ease);
}

.featured-card__cta::after {
  content: '→';
  transition: transform var(--duration) var(--ease);
  display: inline-block;
}

.featured-card--hero:hover .featured-card__cta::after {
  transform: translateX(4px);
}

.featured-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* ── Card secundário (pequeno, empilhado) ──────────── */

.featured-card--secondary {
  flex-direction: row;
  align-items: stretch;
  animation: fadeUp 400ms var(--ease) both;
  min-height: 100px;
  gap: 0;
}

.featured-card--secondary:nth-child(2) { animation-delay: 80ms; }
.featured-card--secondary:nth-child(3) { animation-delay: 160ms; }

.featured-card__img-wrap--sm {
  width: 110px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--navy);
}

.featured-card__img-wrap--sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--ease);
}

.featured-card--secondary:hover .featured-card__img-wrap--sm img {
  transform: scale(1.07);
}

.featured-card__img-placeholder--sm {
  font-size: 0.9rem;
}

.featured-card__body--sm {
  padding: 16px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  justify-content: space-between;
  min-width: 0;
}

.featured-card__title--sm {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--duration) var(--ease);
}

.featured-card--secondary:hover .featured-card__title--sm {
  color: var(--red);
}

.featured-card__footer--sm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

/* Linha colorida na lateral esquerda do card secundário */
.featured-card--secondary {
  border-left: 3px solid transparent;
  transition: border-color var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease),
              transform  var(--duration) var(--ease);
}

.featured-card--secondary:hover {
  border-left-color: var(--red);
}

/* ── Badges (compartilhados com publicacoes.css) ──── */

.badge {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  line-height: 1.5;
  white-space: nowrap;
}

.badge--tipo          { background: rgba(166,143,114,0.15); color: #6b4e28; }
.badge--area-economia      { background: rgba(59,103,191,0.12);  color: #2a4a99; }
.badge--area-internacional { background: rgba(99,176,242,0.18);  color: #1a5c8a; }
.badge--area-saude         { background: rgba(60,140,80,0.13);   color: #2a6038; }
.badge--area-trabalho      { background: rgba(166,143,114,0.20); color: #6b4e28; }
.badge--area-politica      { background: rgba(191,77,52,0.12);   color: #9a2e18; }
.badge--area-infraestrutura{ background: rgba(22,34,38,0.08);    color: #162226; }
.badge--area-sociedade     { background: rgba(74,136,217,0.14);  color: #1e4d8c; }

/* ── Botão "ver mais" ──────────────────────────────── */

.home-featured__more {
  margin-top: var(--space-8);
  display: flex;
  justify-content: flex-start;
}

/* ── Coluna Em Alta ────────────────────────────────── */

.home-trending {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-6));
}

.home-trending__header {
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--red);
}

.home-trending__label {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  color: var(--navy);
}

.trending-list {
  display: flex;
  flex-direction: column;
  counter-reset: trending;
}

.trending-item {
  counter-increment: trending;
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--duration) var(--ease);
}

.trending-item::before {
  content: counter(trending, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--beige);
  line-height: 1;
  flex-shrink: 0;
  width: 28px;
  transition: color var(--duration) var(--ease);
}

.trending-item:hover::before { color: var(--red); }

.trending-item__content {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.trending-item__area {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
}

.trending-item__title {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.35;
  transition: color var(--duration) var(--ease);
}

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

/* ── Seção 2: Spotlight ────────────────────────────── */

.home-spotlight {
  background: var(--navy);
  background-size: cover;
  background-position: center;
  position: relative;
  padding: var(--space-24) 0;
  overflow: hidden;
}

.home-spotlight::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(22,34,38,0.95) 0%,
    rgba(22,34,38,0.75) 50%,
    rgba(22,34,38,0.4) 100%
  );
  z-index: 0;
}

.home-spotlight__inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.home-spotlight__eyebrow {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: var(--space-3);
}

.home-spotlight__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  letter-spacing: 0.03em;
  color: var(--white);
  line-height: 1.05;
  margin-bottom: var(--space-4);
}

.home-spotlight__summary {
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 300;
  color: var(--beige);
  opacity: 0.85;
  line-height: 1.7;
  margin-bottom: var(--space-4);
}

.home-spotlight__meta {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--beige);
  opacity: 0.5;
  margin-bottom: var(--space-8);
}

.home-spotlight--empty .home-spotlight__title { opacity: 0.3; }

/* ── Seção 3: Áreas temáticas ──────────────────────── */

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

.area-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: border-color var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease),
              transform var(--duration) var(--ease);
}

.area-card:hover {
  border-left-color: var(--red);
  box-shadow: var(--shadow-md);
  transform: translateX(3px);
}

.area-card__name {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.35;
}

.area-card__arrow {
  font-size: 1.1rem;
  color: var(--beige-dark);
  flex-shrink: 0;
  transition: color var(--duration) var(--ease),
              transform var(--duration) var(--ease);
}

.area-card:hover .area-card__arrow {
  color: var(--red);
  transform: translateX(3px);
}

/* ── Skeletons ─────────────────────────────────────── */

@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}

.skeleton-card,
.skeleton-line {
  background: linear-gradient(90deg, #e8e4de 25%, #f0ece6 50%, #e8e4de 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--radius-md);
}

.featured-grid__skeleton { display: contents; }
.skeleton-card  { height: 320px; }
.skeleton-line  { height: 56px; margin-bottom: var(--space-2); list-style: none; }

/* ── Animação de entrada ───────────────────────────── */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsividade ────────────────────────────────── */

@media (max-width: 1100px) {
  .home-featured__layout { grid-template-columns: 1fr 220px; gap: var(--space-8); }
  .areas-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .home-featured__layout { grid-template-columns: 1fr; }
  .home-trending { position: static; }
  .featured-grid { grid-template-columns: 1fr 1fr; }
  .areas-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .featured-grid { grid-template-columns: 1fr; }
  .featured-card--secondary { flex-direction: column; }
  .featured-card__img-wrap--sm { width: 100%; aspect-ratio: 16/7; }
  .areas-grid { grid-template-columns: 1fr; }
  .home-spotlight { padding: var(--space-16) 0; }
}