/* ===== Homepage-Specific Styles ===== */
/* Extracted from inline <style> in index.html for browser caching */

.image-credit {
  font-size: 0.75rem;
  color: var(--text-light);
  text-align: right;
  display: block;
  margin-top: 0.5rem;
  font-style: italic;
}

.content-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  margin: 2rem 0;
  box-shadow: var(--shadow-lg);
}

/* ===== Killer Hook ===== */
.killer-hook {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 640px;
  margin: 0.75rem auto 0;
  line-height: 1.7;
  font-style: italic;
  border-left: 3px solid var(--primary);
  padding-left: 1rem;
}

.killer-hook a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.killer-hook a:hover {
  opacity: 0.85;
}

/* ===== Article Summary Box ===== */
.article-summary-box {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.06));
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  position: relative;
}

.article-summary-box::before {
  content: '📊';
  position: absolute;
  top: -14px;
  left: 20px;
  background: var(--bg-primary);
  padding: 0 8px;
  font-size: 1.2rem;
}

.article-summary-box h3 {
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.article-summary-box p {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin: 0;
}

/* ===== Range Calculator ===== */
.range-calculator {
  position: relative;
  overflow: hidden;
}

.range-calc-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-xl, 16px);
  padding: 2.5rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  max-width: 900px;
  margin: 0 auto;
}

.range-calc-header {
  text-align: center;
  margin-bottom: 2rem;
}

.range-calc-header h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.range-calc-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.range-calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.range-calc-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.range-calc-field select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md, 8px);
  color: var(--text-primary, #fff);
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.range-calc-field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.range-calc-btn {
  display: block;
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #fff;
  border: none;
  border-radius: var(--radius-md, 8px);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  margin-bottom: 1.5rem;
}

.range-calc-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.range-calc-results {
  display: none;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  animation: fadeSlideUp 0.4s ease;
}

.range-calc-results.active {
  display: grid;
}

.range-result-card {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-md, 8px);
  padding: 1.25rem;
  text-align: center;
}

.range-result-value {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.range-result-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.range-calc-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-light, #6b7280);
  margin-top: 1rem;
  font-style: italic;
  display: none;
}

.range-calc-note.active {
  display: block;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Comparison Hub ===== */
.comparison-hub-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.hub-tab {
  padding: 0.5rem 1.25rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.hub-tab:hover {
  border-color: var(--primary);
  color: var(--text-primary, #fff);
}

.hub-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.hub-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hub-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 950px;
  font-size: 0.88rem;
}

.hub-table thead th {
  background: rgba(99, 102, 241, 0.12);
  padding: 0.75rem 0.65rem;
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: color 0.2s;
}

.hub-table thead th:hover {
  color: var(--primary);
}

.hub-table thead th .sort-icon {
  margin-left: 4px;
  font-size: 0.65rem;
  opacity: 0.5;
}

.hub-table thead th.sorted .sort-icon {
  opacity: 1;
  color: var(--primary);
}

.hub-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s;
}

.hub-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.06);
}

.hub-table tbody tr.hidden {
  display: none;
}

.hub-table tbody td {
  padding: 0.7rem 0.65rem;
  color: var(--text-primary, #e2e8f0);
  white-space: nowrap;
}

.hub-table tbody td:first-child {
  font-weight: 700;
}

.hub-table .best-badge {
  display: inline-block;
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}

.hub-table .model-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
  transition: opacity 0.2s;
}

.hub-table .model-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.hub-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.hub-actions .btn {
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .range-calc-grid {
    grid-template-columns: 1fr;
  }

  .range-calc-results {
    grid-template-columns: 1fr;
  }

  .range-calc-card {
    padding: 1.5rem;
  }

  .killer-hook {
    font-size: 0.95rem;
  }
}

/* Sources Section */
.sources-section {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.sources-list {
  list-style: decimal;
  padding-left: 1.5rem;
}

.sources-list li {
  margin-bottom: 0.75rem;
}

.sources-list a {
  color: var(--primary);
  text-decoration: none;
  word-break: break-all;
}

.sources-list a:hover {
  text-decoration: underline;
}

/* ===== YouTube Facade ===== */
.yt-facade {
  position: relative;
  cursor: pointer;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.yt-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.yt-facade:hover img {
  opacity: 1;
}

.yt-facade .yt-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 48px;
  background: rgba(255, 0, 0, 0.85);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.yt-facade:hover .yt-play-btn {
  background: #f00;
}

.yt-facade .yt-play-btn::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent #fff;
  margin-left: 3px;
}

/* Article excerpt spacing (replaces <br>) */
.article-excerpt {
  margin-top: 1.5rem;
}
