/* ============================================================
   AQOON TECH  —  Cards  (css/cards.css)
   Article cards, video cards, category cards, popular cards,
   value cards, team cards, info-contact cards, sidebar widgets
   ============================================================ */

/* ════════════════════════════
   BASE CARD
════════════════════════════ */
.card {
  background: var(--surface);
  border-radius: var(--r);
  border: 1px solid var(--border);
  overflow: hidden;
  transition:
    transform    var(--t) var(--ease-spring),
    box-shadow   var(--t) var(--ease),
    border-color var(--t) var(--ease);
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-up);
  border-color: var(--blue-mid);
}
[data-theme="dark"] .card:hover { border-color: rgba(74,144,217,.35); }

/* Card image wrapper */
.card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-3);
  position: relative;
}
.card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}
.card:hover .card-img img { transform: scale(1.04); }

/* Card body */
.card-body  { padding: var(--s5); }
.card-body-sm { padding: var(--s4); }

/* Card title */
.card-title {
  font-family: var(--font-brand);
  font-size: 15.5px;
  color: var(--text);
  line-height: 1.4;
  margin-block: var(--s2);
  transition: color var(--t) var(--ease);
}
.card:hover .card-title { color: var(--blue); }
.card-title a { color: inherit; }

/* Card excerpt */
.card-excerpt {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--s4);
}

/* Card meta row */
.card-meta {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--font-ui);
  font-size: var(--size-xs);
  color: var(--text-3);
}
.card-meta-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--text-3);
  flex-shrink: 0;
}

/* Card badges */
.card-badges { display: flex; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s2); }

/* ════════════════════════════
   ARTICLE CARD — HORIZONTAL
════════════════════════════ */
.card-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
}
.card-row .card-img {
  width: 140px;
  min-height: 100px;
  aspect-ratio: auto;
  flex-shrink: 0;
}

/* ════════════════════════════
   POPULAR / TRENDING CARD
════════════════════════════ */
.popular-card {
  display: flex;
  align-items: stretch;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--t) var(--ease-spring);
}
.popular-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-up);
  border-color: var(--blue-mid);
}
[data-theme="dark"] .popular-card:hover { border-color: rgba(74,144,217,.35); }

.popular-card-thumb {
  width: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  flex-shrink: 0;
}
.popular-card-body { padding: var(--s4); flex: 1; }
.popular-card-title {
  font-family: var(--font-brand);
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.42;
  margin-block: var(--s1) var(--s2);
  transition: color var(--t) var(--ease);
}
.popular-card:hover .popular-card-title { color: var(--blue); }
.popular-card-reads {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-3);
}

/* ════════════════════════════
   CATEGORY CARD
════════════════════════════ */
.cat-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: var(--s6) var(--s5);
  text-align: center;
  text-decoration: none;
  display: block;
  position: relative;
  overflow: hidden;
  transition:
    transform    var(--t) var(--ease-spring),
    box-shadow   var(--t) var(--ease),
    border-color var(--t) var(--ease);
}
.cat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(74,144,217,.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--t) var(--ease);
}
.cat-card:hover {
  transform: translateY(-5px);
  border-color: var(--blue);
  box-shadow: var(--shadow-up);
}
.cat-card:hover::before { opacity: 1; }

.cat-icon {
  width: 66px; height: 66px;
  border-radius: 18px;
  background: var(--blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--s4);
  font-size: 1.8rem;
  transition: all var(--t) var(--ease-spring);
  position: relative; z-index: 1;
}
[data-theme="dark"] .cat-icon { background: rgba(74,144,217,.10); }
.cat-card:hover .cat-icon {
  background: var(--blue);
  transform: scale(1.08) rotate(-5deg);
}
.cat-name {
  font-family: var(--font-brand);
  font-size: 14.5px;
  color: var(--text);
  margin-bottom: var(--s2);
  position: relative; z-index: 1;
  transition: color var(--t) var(--ease);
}
.cat-card:hover .cat-name { color: var(--blue); }
.cat-meta {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--text-3);
  position: relative; z-index: 1;
}

/* ════════════════════════════
   VIDEO CARD
════════════════════════════ */
.video-card { cursor: pointer; }

.video-thumb { position: relative; overflow: hidden; }

.play-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%) scale(.88);
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
  transition: all var(--t) var(--ease-spring);
  z-index: 2;
}
.play-btn svg { width: 20px; height: 20px; fill: var(--blue); margin-left: 3px; }
.video-card:hover .play-btn {
  transform: translate(-50%,-50%) scale(1);
  background: #fff;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
.video-duration {
  position: absolute;
  bottom: 10px; right: 10px;
  background: rgba(0,0,0,.78);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  letter-spacing: .4px;
  z-index: 2;
}

/* ── In-article video embed card ── */
.video-embed-card {
  background: var(--charcoal);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-block: var(--s8);
}
[data-theme="dark"] .video-embed-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.video-embed-thumb {
  aspect-ratio: 16/9;
  background: rgba(74,144,217,.14);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
}
.video-embed-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,rgba(74,144,217,.18),transparent);
}
.play-btn-lg {
  width: 62px; height: 62px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: all var(--t) var(--ease-spring);
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
}
.play-btn-lg svg { width: 24px; height: 24px; fill: var(--blue); margin-left: 4px; }
.video-embed-thumb:hover .play-btn-lg { transform: scale(1.1); background: #fff; }

.video-embed-info {
  padding: var(--s6);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--s3);
}
.video-embed-title { font-family: var(--font-brand); font-size: 15.5px; color: #fff; line-height: 1.4; }
.video-embed-meta  { font-family: var(--font-ui);    font-size: 12px;   color: rgba(255,255,255,.5); }
.video-embed-desc  { font-size: 13px; color: rgba(255,255,255,.45); line-height: 1.65; }

/* ════════════════════════════
   TEAM CARD
════════════════════════════ */
.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--s8) var(--s6);
  text-align: center;
  transition: all var(--t) var(--ease-spring);
}
.team-card:hover {
  transform: translateY(-4px);
  border-color: var(--blue-mid);
  box-shadow: var(--shadow-up);
}
.team-avatar {
  width: 90px; height: 90px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto var(--s4);
  border: 3px solid var(--blue-light);
  transition: border-color var(--t) var(--ease);
}
.team-card:hover .team-avatar { border-color: var(--blue); }
.team-avatar img { width: 100%; height: 100%; object-fit: cover; }
.team-name {
  font-family: var(--font-brand);
  font-size: 15.5px;
  color: var(--text);
  margin-bottom: var(--s1);
}
.team-role { font-family: var(--font-ui); font-size: 12.5px; color: var(--text-3); }

/* ════════════════════════════
   VALUE CARD
════════════════════════════ */
.value-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--s8) var(--s6);
  transition: all var(--t) var(--ease-spring);
}
.value-card:hover {
  transform: translateY(-4px);
  border-color: var(--blue-mid);
  box-shadow: var(--shadow-up);
}
.value-emoji { font-size: 2.5rem; margin-bottom: var(--s4); display: block; }
.value-title {
  font-family: var(--font-brand);
  font-size: 17px;
  color: var(--text);
  margin-bottom: var(--s3);
}
.value-desc { font-size: 14px; color: var(--text-2); line-height: 1.75; }

/* ════════════════════════════
   INFO / CONTACT CARD
════════════════════════════ */
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--s5);
  display: flex;
  align-items: flex-start;
  gap: var(--s4);
  transition: all var(--t) var(--ease-spring);
}
.info-card:hover {
  border-color: var(--blue-mid);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}
.info-card-icon {
  width: 50px; height: 50px;
  border-radius: var(--r-sm);
  background: var(--blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  transition: background var(--t) var(--ease);
}
[data-theme="dark"] .info-card-icon { background: rgba(74,144,217,.10); }
.info-card:hover .info-card-icon { background: var(--blue); }
.info-card-label {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 3px;
}
.info-card-value { font-size: var(--size-sm); color: var(--text); font-weight: 500; }
.info-card-sub   { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ════════════════════════════
   SIDEBAR WIDGETS
════════════════════════════ */
.sidebar-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.sidebar-widget-head {
  padding: var(--s4) var(--s5);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-brand);
  font-size: 13.5px;
  color: var(--text);
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.sidebar-widget-body { padding: var(--s3) var(--s5) var(--s4); }

/* Trending list inside widget */
.trending-item {
  display: flex;
  gap: var(--s3);
  align-items: flex-start;
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--t) var(--ease);
}
.trending-item:last-child { border-bottom: none; padding-bottom: 0; }
.trending-item:hover .trending-title { color: var(--blue); }
.trending-num {
  font-family: var(--font-brand);
  font-size: 22px;
  color: var(--blue-mid);
  line-height: 1;
  width: 28px;
  flex-shrink: 0;
  padding-top: 2px;
}
[data-theme="dark"] .trending-num { color: rgba(74,144,217,.25); }
.trending-title {
  font-family: var(--font-ui);
  font-size: 12.5px;
  color: var(--text);
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: 3px;
  transition: color var(--t) var(--ease);
}
.trending-reads { font-family: var(--font-ui); font-size: 11px; color: var(--text-3); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .video-embed-card { grid-template-columns: 1fr; }
  .card-row { flex-direction: column; }
}
