/* ====================================================================
   IPTV Nordic — FAQ Page Styles
   ================================================================ */

.page-faq {
  background: #f8fafc;
}

/* === Hero === */
.faq-hero {
  position: relative;
  color: #fff;
  padding: 4rem 1.5rem 3rem;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

.faq-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('/assets/images/nordic-content/bedste-iptv-nordic-2026-hero.jpg');
  background-size: cover;
  background-position: center;
  z-index: -2;
}

.faq-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.92) 0%, rgba(30, 64, 175, 0.85) 50%, rgba(37, 99, 235, 0.82) 100%);
  z-index: -1;
}

.faq-hero > .container { position: relative; }

.faq-hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 800;
  margin: 0 0 1rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.faq-hero .hero-subtitle {
  max-width: 760px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #dbeafe;
}

.faq-hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2rem;
  font-size: 0.95rem;
  color: #e0e7ff;
}

.faq-hero-stats span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* === Search === */
.faq-search-section {
  max-width: 720px;
  margin: -2rem auto 0;
  padding: 0 1rem;
  position: relative;
  z-index: 5;
}

.faq-search-box {
  background: #fff;
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
  border: 1px solid #e2e8f0;
}

.faq-search-input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  font-size: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231976d2' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.5' y2='16.5'/></svg>") no-repeat 0.85rem center;
  background-size: 18px 18px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-search-input:focus {
  border-color: #1976d2;
  box-shadow: 0 0 0 4px rgba(25, 118, 210, 0.12);
  background-color: #fff;
}

.faq-search-counter {
  margin-top: 0.6rem;
  font-size: 0.88rem;
  color: #64748b;
  text-align: center;
}

.faq-search-counter strong { color: #1976d2; }

/* === Category Navigation === */
.faq-categories {
  max-width: 1200px;
  margin: 2.5rem auto 0;
  padding: 0 1.5rem;
}

.faq-cat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 1rem;
  margin: 0;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  position: sticky;
  top: 80px;
  z-index: 50;
}

.faq-cat-list a {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.95rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.faq-cat-list a:hover {
  background: #1976d2;
  color: #fff;
  transform: translateY(-1px);
}

/* === Category Sections === */
.faq-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.faq-category {
  margin-bottom: 3rem;
  scroll-margin-top: 160px;
}

/* === Category Banner Image === */
.faq-section-image {
  margin: 0 0 1.5rem;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 5;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.faq-section-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.faq-section-image:hover img {
  transform: scale(1.03);
}

.faq-section-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(15, 23, 42, 0.55) 100%);
  pointer-events: none;
}

.faq-section-image .img-caption {
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1rem;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  z-index: 1;
}

@media (max-width: 768px) {
  .faq-section-image {
    aspect-ratio: 16 / 7;
    margin-bottom: 1.25rem;
  }
  .faq-section-image .img-caption {
    font-size: 0.85rem;
    left: 0.85rem;
    right: 0.85rem;
    bottom: 0.7rem;
  }
}

.faq-category-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e2e8f0;
}

.faq-category-title .cat-num {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* === FAQ Items === */
.faq-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 0.85rem;
  overflow: hidden;
  transition: all 0.2s ease;
}

.faq-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.faq-item[open] {
  border-color: #1976d2;
  box-shadow: 0 4px 16px rgba(25, 118, 210, 0.1);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 1.4rem;
  font-size: 1.02rem;
  font-weight: 600;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary .q-text {
  flex: 1;
  line-height: 1.4;
}

.faq-item summary::after {
  content: '+';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 1.5rem;
  font-weight: 400;
  color: #1976d2;
  background: #eff6ff;
  border-radius: 8px;
  flex-shrink: 0;
  transition: all 0.2s ease;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: '−';
  background: #1976d2;
  color: #fff;
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.4rem 1.3rem;
  color: #334155;
  font-size: 0.96rem;
  line-height: 1.7;
}

.faq-answer p { margin: 0 0 0.75rem; }
.faq-answer p:last-child { margin-bottom: 0; }

.faq-answer ul, .faq-answer ol {
  margin: 0.5rem 0 0.75rem;
  padding-left: 1.25rem;
}

.faq-answer li {
  margin-bottom: 0.35rem;
  line-height: 1.6;
}

.faq-answer strong { color: #0f172a; }

.faq-answer a {
  color: #1976d2;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  font-weight: 500;
}

.faq-answer a:hover {
  color: #0d47a1;
}

.faq-item.is-hidden { display: none; }

/* === No Results === */
.faq-no-results {
  display: none;
  text-align: center;
  padding: 3rem 1.5rem;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 12px;
  color: #78350f;
  font-size: 0.95rem;
}

.faq-no-results.is-visible { display: block; }

/* === Contact Box (Modern) === */
.faq-contact-box {
  max-width: 900px;
  margin: 3.5rem auto 2rem;
  padding: 3rem 2rem;
  background:
    radial-gradient(circle at 20% 0%, rgba(96, 165, 250, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 80% 100%, rgba(34, 197, 94, 0.15) 0%, transparent 50%),
    linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #1e40af 100%);
  border-radius: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.faq-contact-box::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 23px;
  background: inherit;
  z-index: -1;
}

.faq-contact-box::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 26px;
  padding: 2px;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.4), rgba(34, 197, 94, 0.4));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: -1;
  pointer-events: none;
}

.faq-contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.2) 0%, rgba(34, 197, 94, 0.2) 100%);
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 18px;
  font-size: 1.75rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.faq-contact-box h2 {
  font-size: clamp(1.5rem, 3.2vw, 2rem) !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  margin: 0 0 0.75rem !important;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.faq-contact-box .contact-subtitle {
  font-size: 1.05rem;
  color: #cbd5e1;
  margin: 0 auto 2rem;
  max-width: 580px;
  line-height: 1.65;
}

.faq-contact-box .contact-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.5rem;
  margin: 0 0 2rem;
  font-size: 0.9rem;
  color: #94a3b8;
}

.faq-contact-box .contact-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.faq-contact-box .btn-contact-faq {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 50%, #15803d 100%);
  color: #ffffff !important;
  font-size: 1.02rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 14px;
  box-shadow:
    0 4px 14px rgba(22, 163, 74, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.faq-contact-box .btn-contact-faq::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.25) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.faq-contact-box .btn-contact-faq:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 28px rgba(22, 163, 74, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.faq-contact-box .btn-contact-faq:hover::before {
  transform: translateX(100%);
}

.faq-contact-box .btn-contact-faq svg {
  width: 18px;
  height: 18px;
  transition: transform 0.25s ease;
}

.faq-contact-box .btn-contact-faq:hover svg {
  transform: translateX(4px);
}

@media (max-width: 600px) {
  .faq-contact-box {
    padding: 2.25rem 1.25rem;
    margin: 2.5rem 1rem 1.5rem;
    border-radius: 20px;
  }
  .faq-contact-icon {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
  }
  .faq-contact-box .contact-meta {
    gap: 0.5rem 1rem;
    font-size: 0.83rem;
  }
}

/* === Related Pages === */
.faq-related {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.faq-related h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 1.25rem;
}

.faq-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.faq-related-card {
  display: block;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.faq-related-card:hover {
  border-color: #1976d2;
  box-shadow: 0 8px 20px rgba(25, 118, 210, 0.1);
  transform: translateY(-2px);
}

.faq-related-card .icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  display: block;
}

.faq-related-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.35rem;
}

.faq-related-card p {
  font-size: 0.88rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

/* === Responsive === */
@media (max-width: 768px) {
  .faq-hero {
    padding: 3rem 1rem 2.5rem;
  }

  .faq-hero-stats {
    gap: 0.6rem 1.25rem;
    font-size: 0.88rem;
  }

  .faq-categories {
    padding: 0 1rem;
  }

  .faq-cat-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding: 0.75rem;
    position: static;
  }

  .faq-cat-list a {
    flex-shrink: 0;
    font-size: 0.83rem;
    padding: 0.4rem 0.85rem;
  }

  .faq-content {
    padding: 1.5rem 1rem 3rem;
  }

  .faq-category-title {
    font-size: 1.25rem;
  }

  .faq-item summary {
    padding: 1rem 1.1rem;
    font-size: 0.96rem;
  }

  .faq-answer {
    padding: 0 1.1rem 1.1rem;
    font-size: 0.93rem;
  }
}
