/**
 * KÖPAIPTV.SE — BLOGG & ARTIKEL STILMALL
 * Responsiv, elegant, skandinavisk ljus design anpassad för SEO & läsbarhet
 */

/* Blog Hub Styling */
.blog-hub-hero {
  padding: 48px 0 36px;
  text-align: center;
  background: linear-gradient(180deg, rgba(2, 132, 199, 0.04) 0%, transparent 100%);
}

.blog-hub-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(2, 132, 199, 0.1);
  border: 1px solid rgba(2, 132, 199, 0.25);
  color: #0284c7;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
}

.blog-hub-title {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}

.blog-hub-subtitle {
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  color: #475569;
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Blog Search Bar Component */
.blog-search-container {
  max-width: 580px;
  width: 100%;
  margin: 26px auto 0;
  padding: 0 16px;
  box-sizing: border-box;
}

.blog-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.blog-search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #0284c7;
  pointer-events: none;
  transition: transform 0.2s ease, color 0.2s ease;
  z-index: 2;
}

.blog-search-input {
  width: 100% !important;
  box-sizing: border-box !important;
  display: block !important;
  height: 54px;
  padding: 0 46px 0 52px !important;
  background: #ffffff !important;
  border: 2px solid #cbd5e1 !important;
  border-radius: 9999px !important;
  font-family: inherit !important;
  font-size: 0.98rem !important;
  font-weight: 500 !important;
  color: #0f172a !important;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.03) !important;
  outline: none !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  text-overflow: ellipsis;
  -webkit-appearance: none;
  appearance: none;
}

.blog-search-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
  opacity: 1;
}

.blog-search-input:hover {
  border-color: #94a3b8 !important;
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.08) !important;
}

.blog-search-input:focus {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.16), 0 8px 24px rgba(2, 132, 199, 0.12) !important;
  background: #ffffff !important;
}

.blog-search-wrapper:focus-within .blog-search-icon {
  color: #0284c7;
  transform: translateY(-50%) scale(1.08);
}

.blog-search-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: #64748b;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
  z-index: 2;
}

.blog-search-clear:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: translateY(-50%) scale(1.06);
}

.blog-search-clear svg {
  width: 14px;
  height: 14px;
}

.blog-search-meta {
  margin-top: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #64748b;
  text-align: center;
  min-height: 20px;
  letter-spacing: -0.01em;
}

.blog-search-meta strong {
  color: #0284c7;
}

@media (max-width: 640px) {
  .blog-search-container {
    margin: 20px auto 0;
    padding: 0 8px;
  }
  .blog-search-input {
    height: 48px;
    font-size: 0.9rem !important;
    padding: 0 40px 0 44px !important;
  }
  .blog-search-icon {
    left: 15px;
    width: 18px;
    height: 18px;
  }
  .blog-search-clear {
    right: 12px;
    width: 24px;
    height: 24px;
  }
  .blog-search-clear svg {
    width: 12px;
    height: 12px;
  }
  .blog-search-meta {
    font-size: 0.8rem;
    margin-top: 8px;
  }
}

/* No results state */
.blog-no-results {
  text-align: center;
  padding: 60px 24px;
  background: #ffffff;
  border: 1.5px dashed #cbd5e1;
  border-radius: var(--radius-xl, 16px);
  max-width: 600px;
  margin: 20px auto 40px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
}

.no-results-icon {
  font-size: 3rem;
  margin-bottom: 14px;
}

.no-results-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
}

.no-results-desc {
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 20px;
}

.btn-reset-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
}

.btn-reset-search:hover {
  background: #0369a1;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.35);
}

/* Kategori- och sökfilter */
.blog-filter-section {
  padding: 16px 0 28px;
}

.blog-filter-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.filter-pill:hover,
.filter-pill.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

/* Blog Article Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
  padding-bottom: 60px;
}

.blog-card {
  background: #ffffff;
  border: 1.5px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: rgba(2, 132, 199, 0.4);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.blog-card-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  background: #f1f5f9;
}

.blog-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.blog-card:hover .blog-card-img {
  transform: scale(1.04);
}

.blog-card-body {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  color: #64748b;
  margin-bottom: 10px;
  font-weight: 600;
}

.blog-category-tag {
  background: rgba(2, 132, 199, 0.1);
  color: #0284c7;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
}

.blog-card-title {
  font-size: 1.18rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 10px;
}

.blog-card-title a {
  color: inherit;
  text-decoration: none;
}

.blog-card-title a:hover {
  color: #0284c7;
}

.blog-card-excerpt {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.55;
  margin-bottom: 16px;
  flex-grow: 1;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  font-size: 0.84rem;
  font-weight: 700;
}

.blog-read-more {
  color: #0284c7;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.blog-read-more:hover {
  color: #0369a1;
  text-decoration: underline;
}

/* ========================================================================
   ENSTAKA ARTIKELSIDA (SINGLE ARTICLE TEMPLATE)
   ======================================================================== */
.article-page-wrap {
  padding: 32px 0 70px;
}

.breadcrumbs-nav {
  margin-bottom: 24px;
  font-size: 0.84rem;
  color: #64748b;
  overflow-x: auto;
  white-space: nowrap;
}

.breadcrumbs-list {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumbs-list a {
  color: #0284c7;
  text-decoration: none;
  font-weight: 600;
}

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

.breadcrumbs-sep {
  color: #94a3b8;
}

/* Artikel Header */
.article-header {
  max-width: 820px;
  margin: 0 auto 32px;
  text-align: center;
}

.article-main-h1 {
  font-size: clamp(2rem, 5.5vw, 2.75rem);
  font-weight: 900;
  color: #0f172a;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 14px 0 16px;
}

.article-lead {
  font-size: clamp(1.05rem, 2.8vw, 1.22rem);
  color: #334155;
  line-height: 1.6;
  margin-bottom: 20px;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.84rem;
  color: #64748b;
}

.article-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Artikellayout: Huvudinnehåll + Ev. Sidebar */
.article-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 780px) 300px;
  gap: 40px;
  justify-content: center;
  margin: 0 auto;
  max-width: 1140px;
}

.article-single-col {
  max-width: 820px;
  margin: 0 auto;
}

/* Artikel Featured Image */
.article-hero-figure {
  margin: 0 0 32px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.article-hero-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.article-caption {
  padding: 10px 16px;
  font-size: 0.82rem;
  color: #64748b;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-style: italic;
  text-align: center;
}

/* Innehållsförteckning (Table of Contents) */
.article-toc {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  margin: 28px 0 36px;
}

.article-toc-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.article-toc-list li a {
  color: #0284c7;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.article-toc-list li a:hover {
  text-decoration: underline;
  color: #0369a1;
}

/* Artikel Brödtext & Typografi */
.article-content {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #1e293b;
}

.article-content h2 {
  font-size: clamp(1.4rem, 4vw, 1.85rem);
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f1f5f9;
}

.article-content h3 {
  font-size: clamp(1.15rem, 3vw, 1.35rem);
  font-weight: 800;
  color: #0f172a;
  margin: 28px 0 12px;
}

.article-content p {
  margin-bottom: 20px;
}

.article-content ul,
.article-content ol {
  margin: 0 0 24px 24px;
  padding: 0;
}

.article-content li {
  margin-bottom: 8px;
  line-height: 1.65;
}

.article-content strong {
  color: #0f172a;
}

.article-content a {
  color: #0284c7;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

.article-content a:hover {
  color: #0369a1;
}

/* Informationsrutor / Tips */
.content-callout {
  padding: 20px 22px;
  border-radius: var(--radius-md);
  margin: 28px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.content-callout.tip {
  background: #f0fdf4;
  border-left: 4px solid #10b981;
  color: #065f46;
}

.content-callout.info {
  background: #f0f9ff;
  border-left: 4px solid #0284c7;
  color: #075985;
}

.content-callout.warning {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  color: #92400e;
}

.content-callout-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.content-callout-body {
  font-size: 0.94rem;
  line-height: 1.6;
}

/* Jämförelsetabeller */
.content-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 28px 0;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.content-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

.content-table th {
  background: #f8fafc;
  color: #0f172a;
  font-weight: 800;
  padding: 14px 16px;
  border-bottom: 2px solid #cbd5e1;
  white-space: nowrap;
}

.content-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
  vertical-align: middle;
}

.content-table tr:last-child td {
  border-bottom: none;
}

.content-table tr:nth-child(even) td {
  background: #fdfdfd;
}

/* Bildfigurer inne i artiklar */
.article-inline-figure {
  margin: 32px 0;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #ffffff;
}

.article-inline-figure img {
  width: 100%;
  height: auto;
  display: block;
}

/* CTA Box */
.article-cta-box {
  background: linear-gradient(135deg, #f0fdfa 0%, #e0f2fe 100%);
  border: 2px solid #0d9488;
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  margin: 44px 0;
  text-align: center;
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.12);
}

.article-cta-box h3 {
  font-size: 1.45rem;
  font-weight: 900;
  color: #0f172a;
  margin: 0 0 10px;
}

.article-cta-box p {
  font-size: 0.98rem;
  color: #334155;
  max-width: 600px;
  margin: 0 auto 20px;
  line-height: 1.6;
}

.article-cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-article-cta-primary {
  background: #0d9488;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.3);
  transition: all 0.2s ease;
}

.btn-article-cta-primary:hover {
  background: #0f766e;
  transform: translateY(-1px);
}

.btn-article-cta-secondary {
  background: #ffffff;
  color: #0f172a;
  border: 1.5px solid #cbd5e1;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-article-cta-secondary:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

/* FAQ Sektion i artikel */
.article-faq-section {
  margin: 48px 0;
  padding-top: 28px;
  border-top: 2px solid #e2e8f0;
}

.article-faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.article-faq-item {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 20px 22px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.article-faq-question {
  font-size: 1.08rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px;
}

.article-faq-answer {
  font-size: 0.94rem;
  color: #475569;
  line-height: 1.6;
  margin: 0;
}

/* Författarkort */
.author-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin: 40px 0;
  display: flex;
  align-items: center;
  gap: 18px;
}

.author-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #0284c7;
  color: #ffffff;
  font-weight: 900;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.author-info h4 {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px;
}

.author-info p {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
}

/* Sidebar i artikeln */
.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-widget {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.sidebar-widget-title {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f1f5f9;
}

.sidebar-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-links-list li a {
  font-size: 0.88rem;
  color: #334155;
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-links-list li a:hover {
  color: #0284c7;
}

/* Responsivitet */
@media (max-width: 960px) {
  .article-layout-grid {
    grid-template-columns: 1fr;
  }
  .article-sidebar {
    margin-top: 30px;
  }
}

@media (max-width: 600px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .blog-card-body {
    padding: 16px 18px;
  }
  .article-main-h1 {
    font-size: 1.7rem;
  }
  .article-lead {
    font-size: 1rem;
  }
  .article-content {
    font-size: 0.98rem;
  }
  .article-cta-box {
    padding: 24px 18px;
  }
  .btn-article-cta-primary,
  .btn-article-cta-secondary {
    width: 100%;
    text-align: center;
  }
  .author-card {
    flex-direction: column;
    text-align: center;
  }
}
