/* ============================================================
   CARDS - Portal Dashboard
   ============================================================ */

.card {
  background: var(--surface);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 24px var(--shadow);
  transition: all 0.28s ease;
  border: 1px solid var(--border2);
  position: relative;
  display: flex;
  width: 100%;
  min-height: auto;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px var(--shadow2);
}

.card-img {
  width: 100%;
  height: 232px;
  object-fit: cover;
  background: linear-gradient(135deg, #dfe5ec 0%, #f6f8fb 100%);
}

.card-body {
  padding: 18px 18px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.read-more-badge {
  color: #0f172a;
  background: #8ef04f;
  padding: 5px 12px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  border-radius: 999px;
  letter-spacing: 0.08em;
  align-self: flex-start;
}

.card-source {
  font-size: 11px;
  color: var(--text3);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.24;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
}

.card-desc {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.own-article .card-desc { -webkit-line-clamp: 6; }

.own-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-dark) 100%);
  color: #111827;
  font-size: 10px;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.08em;
}

.card-author-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.card-author-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border2);
  flex-shrink: 0;
}

.card-av-ph {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-dark) 100%);
  color: #111827;
  font-size: 13px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-author-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
}

.card-share-btns {
  display: flex;
  gap: 6px;
}

.card-share-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid var(--border2);
  background: var(--surface2);
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text2);
}

.card-share-btn:hover {
  background: var(--espn-blue);
  color: #fff;
  border-color: var(--espn-blue);
}

.card-hero {
  min-height: auto;
}

.card-hero .card-img {
  height: 250px;
}

.card-hero .card-title {
  font-size: 22px;
  line-height: 1.2;
  -webkit-line-clamp: 2;
}

.card-hero .card-body {
  padding: 16px 18px 16px;
  gap: 10px;
}

.card-hero .card-desc {
  font-size: 14px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
}

.card-small .card-img {
  height: 168px;
}

.card-small .card-body {
  padding: 14px 14px 12px;
  gap: 8px;
}

.card-small .card-title {
  font-size: 17px;
  line-height: 1.22;
  -webkit-line-clamp: 3;
}

.card-small .card-desc {
  font-size: 13px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
}

.card-small .card-author-row {
  padding-top: 10px;
}

.card-small .read-more-badge {
  padding: 4px 10px;
  font-size: 9px;
}

.card-skeleton {
  pointer-events: none;
}

.card-skeleton:hover {
  transform: none;
  box-shadow: 0 8px 24px var(--shadow);
}

.card-img-skeleton {
  width: 100%;
  height: 232px;
}

.card-skeleton.card-hero .card-img-skeleton {
  height: 360px;
}

.card-skeleton.card-small .card-img-skeleton {
  height: 168px;
}

.skeleton-pill,
.skeleton-line,
.card-img-skeleton {
  background: linear-gradient(90deg, #edf1f6 0%, #f8fafd 50%, #edf1f6 100%);
  background-size: 200% 100%;
  animation: cardSkeletonShift 1.4s ease-in-out infinite;
}

.skeleton-pill {
  width: 96px;
  height: 14px;
  border-radius: 999px;
}

.skeleton-line {
  height: 12px;
  border-radius: 999px;
}

.skeleton-line.long { width: 100%; }
.skeleton-line.medium { width: 68%; }

@keyframes cardSkeletonShift {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (max-width: 1080px) {
  .card {
    min-height: auto;
  }

  .card-hero .card-img,
  .card-skeleton.card-hero .card-img-skeleton {
    height: 240px;
  }

  .card-small .card-img,
  .card-skeleton.card-small .card-img-skeleton {
    height: 190px;
  }
}
