/*
Theme Name: GeneratePress Child - VSB
Description: Child theme för Världens Snabbaste Bilar
Author: Filip
Template: generatepress
Version: 2.0.2
Text Domain: generatepress-child
*/

/* ═══════════════════════════════════════════════════════════
   INNEHÅLLSFÖRTECKNING:
   1. Allmänna styles
   2. Tabell-styling (Glassmorphism Dark)
   3. Innehållsförteckning/TOC (med inline toggle)
   4. FAQ-styling (Rank Math)
   ═══════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════
   1. ALLMÄNNA STYLES
   ═══════════════════════════════════════════════════════════ */

/* All CSS hanteras via Additional CSS i Customizer för enklare hantering */

/* Lägg till eventuella globala styles här om behövs */


/* ═══════════════════════════════════════════════════════════
   2. TABELL-STYLING - VSB GLASSMORPHISM DARK THEME
   Version: 2.0 - Mobiloptimerad
   ═══════════════════════════════════════════════════════════ */

/* TABELL CONTAINER - Glassmorphism Wrapper */
.single-post table,
.page table,
.vsb-article table {
  width: 100%;
  margin: 30px 0;
  border-collapse: separate;
  border-spacing: 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* TABELL HEADER - Gradient vit */
.single-post table thead,
.page table thead,
.vsb-article table thead {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
}

.single-post table thead th,
.page table thead th,
.vsb-article table thead th {
  padding: 18px 20px;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  border: none;
}

/* TABELL RADER - Subtil hover effect */
.single-post table tbody tr,
.page table tbody tr,
.vsb-article table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.single-post table tbody tr:last-child,
.page table tbody tr:last-child,
.vsb-article table tbody tr:last-child {
  border-bottom: none;
}

.single-post table tbody tr:hover,
.page table tbody tr:hover,
.vsb-article table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* TABELL CELLER - Clean & Readable */
.single-post table tbody td,
.page table tbody td,
.vsb-article table tbody td {
  padding: 16px 20px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  border: none;
}

/* FÖRSTA KOLUMNEN - Label styling */
.single-post table tbody td:first-child,
.page table tbody td:first-child,
.vsb-article table tbody td:first-child {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  width: 40%;
}

/* ANDRA KOLUMNEN - Value styling */
.single-post table tbody td:last-child,
.page table tbody td:last-child,
.vsb-article table tbody td:last-child {
  font-weight: 700;
  color: rgba(255, 255, 255, 1);
  font-size: 1.05rem;
}

/* SPECIAL STYLING - For highlights */
.single-post table tbody tr.highlight,
.page table tbody tr.highlight,
.vsb-article table tbody tr.highlight {
  background: rgba(255, 215, 0, 0.05);
}

.single-post table tbody tr.highlight td,
.page table tbody tr.highlight td,
.vsb-article table tbody tr.highlight td {
  color: #FFD700;
}

/* ANIMATION - Fade in on load */
.single-post table,
.page table,
.vsb-article table {
  animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ───────────────────────────────────────────────────────────
   TABELL - RESPONSIV DESIGN
   ─────────────────────────────────────────────────────────── */

/* TABLET & MOBIL - Kompaktare */
@media (max-width: 768px) {
  .single-post table,
  .page table,
  .vsb-article table {
    font-size: 0.8rem;
    margin: 20px 0;
  }
  
  .single-post table thead th,
  .page table thead th,
  .vsb-article table thead th {
    padding: 12px 14px;
    font-size: 0.75rem;
  }
  
  .single-post table tbody td,
  .page table tbody td,
  .vsb-article table tbody td {
    padding: 10px 14px;
    font-size: 0.85rem;
  }
  
  .single-post table tbody td:first-child,
  .page table tbody td:first-child,
  .vsb-article table tbody td:first-child {
    width: 50%;
    font-size: 0.8rem;
  }
  
  .single-post table tbody td:last-child,
  .page table tbody td:last-child,
  .vsb-article table tbody td:last-child {
    font-size: 0.9rem;
  }
}

/* SMÅ MOBILER - Lista-layout (ingen horisontell scroll!) */
@media (max-width: 480px) {
  /* Tabell blir lista-layout */
  .single-post table,
  .page table,
  .vsb-article table {
    display: block;
    font-size: 0.85rem;
    margin: 20px 0;
  }
  
  .single-post table thead,
  .page table thead,
  .vsb-article table thead {
    display: none; /* Dölj header på små skärmar */
  }
  
  .single-post table tbody,
  .page table tbody,
  .vsb-article table tbody {
    display: block;
  }
  
  .single-post table tbody tr,
  .page table tbody tr,
  .vsb-article table tbody tr {
    display: block;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
  }
  
  .single-post table tbody tr:hover,
  .page table tbody tr:hover,
  .vsb-article table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
  }
  
  .single-post table tbody td,
  .page table tbody td,
  .vsb-article table tbody td {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border: none;
    font-size: 0.85rem;
  }
  
  .single-post table tbody td:first-child,
  .page table tbody td:first-child,
  .vsb-article table tbody td:first-child {
    width: auto;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
  }
  
  .single-post table tbody td:last-child,
  .page table tbody td:last-child,
  .vsb-article table tbody td:last-child {
    font-size: 0.9rem;
    text-align: right;
  }
  
  /* Lägg till kolon efter label */
  .single-post table tbody td:first-child::after,
  .page table tbody td:first-child::after,
  .vsb-article table tbody td:first-child::after {
    content: ":";
    margin-left: 4px;
  }
}

/* EXTRA SMÅ SKÄRMAR (iPhone SE, etc) */
@media (max-width: 375px) {
  .single-post table,
  .page table,
  .vsb-article table {
    font-size: 0.8rem;
    margin: 15px 0;
  }
  
  .single-post table tbody tr,
  .page table tbody tr,
  .vsb-article table tbody tr {
    padding: 10px;
  }
  
  .single-post table tbody td,
  .page table tbody td,
  .vsb-article table tbody td {
    font-size: 0.8rem;
    padding: 5px 0;
  }
}


/* ═══════════════════════════════════════════════════════════
   3. INNEHÅLLSFÖRTECKNING (TOC) - VSB GLASSMORPHISM
   Med inline toggle-knapp i titeln
   ═══════════════════════════════════════════════════════════ */

/* TOC Container */
.rank-math-toc-block,
.rank-math-block-toc,
#ez-toc-container {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 16px !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 24px !important;
  margin: 30px 0 !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

/* TOC Titel - Med inline toggle-knapp - HÖGRE SPECIFICITY */
.wp-block-rank-math-toc-block h2,
div.rank-math-toc-block h2,
.rank-math-block-toc h2,
#ez-toc-container .ez-toc-title,
.article-content .rank-math-toc-block h2 {
  color: rgba(255, 255, 255, 0.95) !important;
  font-size: 1.3rem !important;
  font-weight: 700 !important;
  margin: 0 !important;
  padding: 20px 24px !important;
  border-bottom: 2px solid rgba(255, 255, 255, 0.15) !important;
  background: transparent !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
}

/* TOGGLE-KNAPP - Inline i titeln (kompakt ikon) - HÖGRE SPECIFICITY */
h2 .toc-toggle-btn,
.rank-math-toc-block .toc-toggle-btn,
button.toc-toggle-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0 0 0 16px !important;
  padding: 0 !important;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
}

h2 .toc-toggle-btn:hover,
button.toc-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: rgba(255, 255, 255, 1);
  transform: scale(1.05);
}

h2 .toc-toggle-btn:active,
button.toc-toggle-btn:active {
  transform: scale(0.98);
}

/* TOC Lista */
.rank-math-toc-block nav,
.rank-math-toc-block ul,
#ez-toc-container ul {
  background: transparent !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  transition: all 0.3s ease;
}

.rank-math-toc-block li,
#ez-toc-container li {
  margin: 0 0 10px 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

/* TOC Länkar */
.rank-math-toc-block a,
#ez-toc-container a {
  color: rgba(255, 255, 255, 0.8) !important;
  text-decoration: none !important;
  font-size: 0.95rem !important;
  line-height: 1.6 !important;
  display: block !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
  background: transparent !important;
}

.rank-math-toc-block a:hover,
#ez-toc-container a:hover {
  color: rgba(255, 255, 255, 1) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  padding-left: 16px !important;
  transform: translateX(4px);
}

/* Under-nivåer (H3, H4) */
.rank-math-toc-block ul ul,
#ez-toc-container ul ul {
  margin-left: 20px !important;
  margin-top: 8px !important;
  padding-left: 15px !important;
  border-left: 2px solid rgba(255, 255, 255, 0.1) !important;
}

.rank-math-toc-block ul ul a,
#ez-toc-container ul ul a {
  font-size: 0.9rem !important;
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Numrering (om aktiverad) */
.rank-math-toc-block ol,
#ez-toc-container ol {
  counter-reset: toc-counter;
  list-style: none !important;
  padding-left: 0 !important;
}

.rank-math-toc-block ol li,
#ez-toc-container ol li {
  counter-increment: toc-counter;
  position: relative;
  padding-left: 30px !important;
}

.rank-math-toc-block ol li::before,
#ez-toc-container ol li::before {
  content: counter(toc-counter) ".";
  position: absolute;
  left: 0;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ───────────────────────────────────────────────────────────
   TOC - RESPONSIV DESIGN
   ─────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .rank-math-toc-block,
  .rank-math-block-toc,
  #ez-toc-container {
    padding: 20px !important;
    margin: 20px 0 !important;
  }
  
  .wp-block-rank-math-toc-block h2,
  div.rank-math-toc-block h2,
  .rank-math-block-toc h2,
  #ez-toc-container .ez-toc-title {
    font-size: 1.1rem !important;
    padding: 16px 20px !important;
  }
  
  h2 .toc-toggle-btn,
  button.toc-toggle-btn {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }
  
  .rank-math-toc-block a,
  #ez-toc-container a {
    font-size: 0.9rem !important;
    padding: 7px 10px !important;
  }
  
  .rank-math-toc-block ul ul,
  #ez-toc-container ul ul {
    margin-left: 15px !important;
  }
}

@media (max-width: 480px) {
  .rank-math-toc-block,
  .rank-math-block-toc,
  #ez-toc-container {
    padding: 16px !important;
    margin: 15px 0 !important;
    border-radius: 12px !important;
  }
  
  .wp-block-rank-math-toc-block h2,
  div.rank-math-toc-block h2,
  #ez-toc-container .ez-toc-title {
    font-size: 1rem !important;
    padding: 14px 16px !important;
  }
  
  h2 .toc-toggle-btn,
  button.toc-toggle-btn {
    width: 26px;
    height: 26px;
    font-size: 0.7rem;
  }
  
  .rank-math-toc-block a,
  #ez-toc-container a {
    font-size: 0.85rem !important;
  }
}


/* ═══════════════════════════════════════════════════════════
   4. FAQ-STYLING - RANK MATH FAQ BLOCKS
   Glassmorphism dark theme
   ═══════════════════════════════════════════════════════════ */

/* FAQ Container */
.rank-math-block,
.rank-math-list {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 16px !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0 !important;
  margin: 30px 0 !important;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* FAQ Item (Varje fråga/svar) */
.rank-math-list-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  background: transparent !important;
  margin: 0 !important;
  transition: all 0.3s ease;
}

.rank-math-list-item:last-child {
  border-bottom: none !important;
}

.rank-math-list-item:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

/* Fråga (Question) */
.rank-math-question,
.rank-math-list-item h3 {
  color: rgba(255, 255, 255, 0.95) !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  padding: 20px 24px !important;
  margin: 0 !important;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rank-math-question:hover {
  color: rgba(255, 255, 255, 1) !important;
  background: rgba(255, 255, 255, 0.03);
}

/* Svar (Answer) */
.rank-math-answer,
.rank-math-list-item .rank-math-answer {
  color: rgba(255, 255, 255, 0.8) !important;
  font-size: 0.95rem !important;
  line-height: 1.7 !important;
  padding: 0 24px 24px 24px !important;
  margin: 0 !important;
  background: transparent !important;
}

/* Arrow/Icon för expand/collapse */
.rank-math-list-item .rank-math-question::after {
  content: "▼";
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  transition: transform 0.3s ease;
  margin-left: auto;
  padding-left: 15px;
}

.rank-math-list-item.active .rank-math-question::after,
.rank-math-list-item[aria-expanded="true"] .rank-math-question::after {
  transform: rotate(180deg);
  color: rgba(255, 255, 255, 0.8);
}

/* ───────────────────────────────────────────────────────────
   FAQ - RESPONSIV DESIGN
   ─────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .rank-math-question,
  .rank-math-list-item h3 {
    font-size: 1rem !important;
    padding: 16px 20px !important;
  }
  
  .rank-math-answer {
    font-size: 0.9rem !important;
    padding: 0 20px 20px 20px !important;
  }
}

@media (max-width: 480px) {
  .rank-math-question,
  .rank-math-list-item h3 {
    font-size: 0.95rem !important;
    padding: 14px 16px !important;
  }
  
  .rank-math-answer {
    font-size: 0.85rem !important;
    padding: 0 16px 16px 16px !important;
  }
}


/* ═══════════════════════════════════════════════════════════
   5. VSB HUB MODULE - BENTO GRID MED BAKGRUNDSBILDER
   Premium hub-modul med bakgrundsbilder och mörk overlay
   ═══════════════════════════════════════════════════════════ */

/* Hub Module - Bento Grid med bakgrundsbilder */
.vsb-hub-module {
  margin: 60px 0;
  padding: 50px 40px;
  background: rgba(255, 255, 255, 0.03);
  border: none;
  border-radius: 20px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.vsb-hub-module h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 16px 0;
  text-align: center;
}

.vsb-hub-module > p {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 auto 40px auto;
  text-align: center;
  max-width: 700px;
  line-height: 1.6;
}

/* Hero Layout - 6-kolumns grid */
.vsb-hub-module ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  column-gap: 50px;
  row-gap: 80px;
}

.vsb-hub-module li {
  margin: 0;
  padding: 0;
}

/* Hero-kort (kort 1) - full bredd */
.vsb-hub-module li:nth-child(1) {
  grid-column: span 6;
  margin-bottom: 40px; /* Extra gap mellan hero-kortet och mitten raden */
}

/* Kort 2-4: 3 kort i rad (span 2 var) */
.vsb-hub-module li:nth-child(2),
.vsb-hub-module li:nth-child(3),
.vsb-hub-module li:nth-child(4) {
  grid-column: span 2;
}

/* Kort 5-6: 50/50 längst ner (span 3 var) */
.vsb-hub-module li:nth-child(5),
.vsb-hub-module li:nth-child(6) {
  grid-column: span 3;
}

/* Hub Module Links - Cards with Background Images */
.vsb-hub-module a {
  display: flex;
  flex-direction: column;
  padding: 32px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-radius: 16px;
  text-decoration: none;
  color: #FFFFFF;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 160px;
  /* Subtile outline med depth */
  box-shadow: 
    0 1px 0 rgba(255, 255, 255, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 4px 12px rgba(0, 0, 0, 0.2);
  
  /* Bakgrundsbild */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  
  /* Text styling */
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.4;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 1), 0 4px 12px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.6);
  z-index: 2;
}

/* Bakgrundsbilder för varje kort */
.vsb-hub-module li:nth-child(1) a {
  background-image: url('https://xn--vrldenssnabbastebilar-51b.se/wp-content/uploads/2026/01/Jamfor-varldens-snabbaste-bilar-2025.png');
}

.vsb-hub-module li:nth-child(2) a {
  background-image: url('https://xn--vrldenssnabbastebilar-51b.se/wp-content/uploads/2026/01/2.png');
}

.vsb-hub-module li:nth-child(3) a {
  background-image: url('https://xn--vrldenssnabbastebilar-51b.se/wp-content/uploads/2026/01/1.png');
}

.vsb-hub-module li:nth-child(4) a {
  background-image: url('https://xn--vrldenssnabbastebilar-51b.se/wp-content/uploads/2026/01/Forsta-hur-varldens-snabbaste-bil-avgors.png');
}

.vsb-hub-module li:nth-child(5) a {
  background-image: url('https://xn--vrldenssnabbastebilar-51b.se/wp-content/uploads/2026/01/Utforska-alla-bilar-och-filtrera-per-toppfart-1.png');
}

.vsb-hub-module li:nth-child(6) a {
  background-image: url('https://xn--vrldenssnabbastebilar-51b.se/wp-content/uploads/2026/01/Jamfor-tillverkare-och-deras-snabbaste-modeller-1.png');
}

/* Overlay borttagen - använder stark text-shadow istället för bättre synlighet av bakgrundsbilder */
/* 
.vsb-hub-module a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    rgba(0, 0, 0, 0.45) 100%
  );
  transition: background 0.4s ease;
  z-index: 0;
}

.vsb-hub-module a::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(100, 200, 255, 0.15) 0%,
    rgba(255, 100, 100, 0.15) 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.vsb-hub-module a:hover::after {
  opacity: 1;
}

.vsb-hub-module a:hover::before {
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(0, 0, 0, 0.35) 100%
  );
}
*/

/* Hero-kort (kort 1) - större styling */
.vsb-hub-module li:nth-child(1) a {
  min-height: 260px;
  font-size: 2rem;
  padding: 50px;
}

/* Övriga kort - standard styling */
.vsb-hub-module li:not(:first-child) a {
  min-height: 180px;
  font-size: 1.4rem;
}

.vsb-hub-module a:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 1px 0 rgba(255, 255, 255, 0.15),
    0 4px 8px rgba(0, 0, 0, 0.4),
    0 8px 20px rgba(0, 0, 0, 0.3);
}

.vsb-hub-module a:hover {
  text-shadow: 0 4px 16px rgba(0, 0, 0, 1), 0 6px 20px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 0, 0, 0.8);
}

@media (max-width: 1024px) {
  /* Behåll 6-kolumns grid för att kunna ha 50/50 på kort 5-6 */
  .vsb-hub-module ul {
    grid-template-columns: repeat(6, 1fr);
  }
  
  /* Hero-kort: full bredd */
  .vsb-hub-module li:nth-child(1) {
    grid-column: span 6;
  }
  
  /* Kort 2-4: 3 kort i rad (span 2 var) */
  .vsb-hub-module li:nth-child(2),
  .vsb-hub-module li:nth-child(3),
  .vsb-hub-module li:nth-child(4) {
    grid-column: span 2;
  }
  
  /* Kort 5-6: 50/50 längst ner (span 3 var) */
  .vsb-hub-module li:nth-child(5),
  .vsb-hub-module li:nth-child(6) {
    grid-column: span 3;
  }
}

/* Tablet breakpoint - 2 kolumner */
@media (max-width: 768px) {
  .vsb-hub-module ul {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Hero-kort: full bredd */
  .vsb-hub-module li:nth-child(1) {
    grid-column: span 2;
  }
  
  /* Övriga kort: 1 kolumn var */
  .vsb-hub-module li:nth-child(2),
  .vsb-hub-module li:nth-child(3),
  .vsb-hub-module li:nth-child(4),
  .vsb-hub-module li:nth-child(5),
  .vsb-hub-module li:nth-child(6) {
    grid-column: span 1;
  }
}

/* Mobil karusell - horisontell scrollbar */
@media (max-width: 600px) {
  .vsb-hub-module {
    padding: 32px 20px;
  }
  
  .vsb-hub-module ul {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    gap: 20px !important; /* Säkerställ att gap fungerar */
    touch-action: pan-x;
    padding: 0;
    margin: 0;
  }
  
  /* Dölj scrollbar i WebKit browsers */
  .vsb-hub-module ul::-webkit-scrollbar {
    display: none;
  }
  
  /* Reset grid-column spans från desktop/tablet */
  .vsb-hub-module li {
    grid-column: auto !important;
    margin: 0;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    flex: 0 0 auto;
    flex-shrink: 0;
    scroll-snap-align: start;
    /* Responsiv bredd: anpassar sig till skärmstorlek med max 300px */
    width: min(300px, calc(100vw - 72px));
    min-width: min(280px, calc(100vw - 72px));
    max-width: min(300px, calc(100vw - 72px));
  }
  
  /* Mellanrum mellan kort - margin-right för kompatibilitet */
  .vsb-hub-module li:not(:last-child) {
    margin-right: 20px !important;
  }
  
  /* Alla kort exakt samma storlek i mobilvy - åsidosätt ALLA desktop-stilar */
  .vsb-hub-module li a {
    width: 100%;
    height: 240px !important;
    min-height: 240px !important;
    max-height: 240px !important;
    padding: 24px !important;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    font-size: 1.15rem !important;
    line-height: 1.35;
  }
  
  /* Explicit åsidosättning av hero-kortets desktop-stilar */
  .vsb-hub-module li:nth-child(1) a {
    font-size: 1.15rem !important;
    padding: 24px !important;
    min-height: 240px !important;
    height: 240px !important;
  }
  
  /* Explicit åsidosättning av övriga korts desktop-stilar */
  .vsb-hub-module li:not(:first-child) a {
    font-size: 1.15rem !important;
    min-height: 240px !important;
    height: 240px !important;
  }
}


/* ═══════════════════════════════════════════════════════════
   6. HERO-SEKTION - MOBILOPTIMERING (STARTSIDAN)
   Förbättrad mobilvy för herosektionen
   ═══════════════════════════════════════════════════════════ */

/* TABLET & MOBIL (max-width: 768px) */
@media (max-width: 768px) {
  .vsb-hero {
    min-height: 85vh;  /* Minska höjden */
    margin-top: 50px;  /* Mindre top-margin */
  }
  
  .vsb-hero-content {
    padding: 30px 20px;  /* Mer kompakt padding */
  }
  
  .vsb-hero-title {
    font-size: 2.5rem;  /* MINSKAD från 2.8rem - lite mindre titel */
    letter-spacing: 1.5px;
    white-space: normal;  /* Tillåt textwrap */
    line-height: 1.1;
    margin-bottom: 40px;  /* ÖKAD från 30px - mer luft efter rubrik */
    word-wrap: break-word;  /* Säkerställ wrap */
    hyphens: auto;  /* Automatisk ordbrytning */
  }
  
  .vsb-hero-top-row {
    gap: 15px;
    margin-bottom: 40px;  /* ÖKAD från 30px - mer luft efter rekord/speed */
  }
  
  .vsb-hero-stats {
    gap: 20px;  /* ÖKAD från 15px - mer luft mellan stat-korten */
    margin-bottom: 30px;
  }
  
  .vsb-hero-stat {
    padding: 18px 22px;  /* MINSKAD från 20px 25px - lägre/luftigare kort */
  }
  
  .vsb-hero-stat-number {
    font-size: 1.4rem;
  }
  
  .vsb-hero-cta {
    padding: 14px 35px;
    font-size: 0.8rem;
  }
}

/* SMÅ MOBILER (max-width: 480px) */
@media (max-width: 480px) {
  #hero-section.vsb-hero,
  section.vsb-hero {
    min-height: auto !important;  /* Tillåt höjden att anpassa sig till innehållet */
    overflow-y: auto !important;  /* Överskriv overflow: hidden - tillåt scroll om behövs */
    overflow: visible !important;  /* Överskriv overflow: hidden helt */
    justify-content: flex-start !important;  /* Börja från toppen istället för centrera */
    padding-top: 40px !important;  /* Lägg till padding-top istället för margin-top */
    padding-bottom: 40px !important;  /* Lägg till padding-bottom för luft */
    margin-top: 40px;
  }
  
  #hero-content.vsb-hero-content,
  .vsb-hero-content {
    padding: 20px 15px !important;  /* Minskad padding för kompaktare layout */
    justify-content: flex-start !important;  /* Börja från toppen - överskriv center */
    max-width: 100% !important;  /* Använd full bredd på mobil */
  }
  
  .vsb-hero-title {
    font-size: 1.6rem;  /* MINSKAD från 1.8rem - lite mindre titel */
    letter-spacing: 0.5px;
    line-height: 1.15;
    margin-bottom: 25px !important;  /* Minskad margin för kompaktare layout */
    padding: 0 10px;  /* Extra padding för läsbarhet */
    white-space: normal !important;  /* Säkerställ att text kan wrappa */
  }
  
  .vsb-hero-top-row {
    gap: 8px !important;  /* Minskad gap för kompaktare layout */
    margin-bottom: 25px !important;  /* Minskad margin */
    flex-direction: column;  /* Stack vertikalt på små skärmar */
    align-items: center;
  }
  
  .vsb-hero-badge {
    font-size: 0.6rem;
    padding: 6px 14px;
    letter-spacing: 2px;
  }
  
  .vsb-hero-speed {
    font-size: 1.6rem;
  }
  
  .vsb-hero-speed-unit {
    font-size: 0.85rem;
  }
  
  .vsb-hero-stats {
    gap: 12px !important;  /* Minskad gap för kompaktare layout */
    margin-bottom: 20px !important;  /* Minskad margin */
    width: 100%;  /* Full bredd */
  }
  
  .vsb-hero-stat {
    padding: 14px 16px !important;  /* Minskad padding för kompaktare kort */
    width: 100%;  /* Full bredd istället för flex */
  }
  
  .vsb-hero-stat-number {
    font-size: 1.3rem;
  }
  
  .vsb-hero-stat-label {
    font-size: 0.75rem;
  }
  
  .vsb-hero-cta {
    padding: 12px 30px;
    font-size: 0.75rem;
    letter-spacing: 1px;
    width: 100%;
    max-width: 280px;  /* Max-bredd för estetik */
  }
  
  .vsb-hero-scroll {
    bottom: 15px;
    font-size: 0.6rem;
  }
}

/* Not: Själva desktop-höjden styrs i `page-startsida.php` med 100vh/svh/dvh.
   Här fokuserar vi bara på hur hero staplas och får luft på små skärmar,
   samt att inget viktigt innehåll hamnar utanför synlig yta på mobil. */


/* ═══════════════════════════════════════════════════════════
   SLUT PÅ STYLE.CSS
   Version: 2.0.2 - Fixed CSS Specificity
   Senast uppdaterad: November 9, 2025
   ═══════════════════════════════════════════════════════════ */