/* ============================================================
   datasim.se — Datasim Laboratorium
   Distinkt mint/cream-design för datasim & extrasimkort
   ============================================================ */

@font-face {
  font-family: 'Roboto Local';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/media/font/Roboto-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Roboto Local';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/media/font/Roboto-Medium.ttf') format('truetype');
}
@font-face {
  font-family: 'Roboto Local';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/media/font/Roboto-Bold.ttf') format('truetype');
}
@font-face {
  font-family: 'Roboto Local';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('/media/font/Roboto-Black.ttf') format('truetype');
}

:root {
  /* Färger */
  --teal: #1F8F88;
  --teal-deep: #176964;
  --teal-bright: #2BAFA6;
  --mist: #DCEDE9;
  --mist-soft: #E8F2EF;
  --cream: #FAF6EB;
  --cream-warm: #F4ECD8;
  --sage: #C8D7CB;
  --paper: #FFFEFA;
  --ink: #1A2424;
  --ink-soft: #475259;
  --ink-mute: #7A8489;
  --signal: #B7322A;
  --signal-deep: #8E2520;
  --amber: #D89B3A;
  --line: #E4DFD0;

  /* Skuggor */
  --shadow-sm: 0 1px 2px rgba(31, 143, 136, 0.06);
  --shadow-md: 0 4px 16px rgba(26, 36, 36, 0.06), 0 1px 3px rgba(26, 36, 36, 0.04);
  --shadow-lg: 0 16px 40px rgba(26, 36, 36, 0.08), 0 4px 12px rgba(26, 36, 36, 0.05);

  /* Hörn */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* Typsnitt */
  --f-display: 'Roboto Local', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-body: 'Roboto Local', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: ui-monospace, 'SF Mono', Menlo, 'Cascadia Mono', Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(circle at 1px 1px, rgba(31, 143, 136, 0.07) 1px, transparent 0) 0 0 / 28px 28px,
    var(--cream);
  background-attachment: fixed;
}

/* ===== Typografi ===== */
h1, h2, h3, h4, h5 {
  font-family: var(--f-display);
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  line-height: 1.18;
}

h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); font-weight: 700; }
h4 { font-size: 1.1rem; font-weight: 600; }

p { margin: 0 0 1.1em; color: var(--ink-soft); }
strong { color: var(--ink); font-weight: 600; }
small { font-size: 0.86em; color: var(--ink-mute); }

a {
  color: var(--teal);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--teal-deep); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

/* ===== Container ===== */
.ds-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.ds-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Header ===== */
.ds-header {
  background:
    linear-gradient(180deg, var(--mist) 0%, var(--mist-soft) 100%);
  border-bottom: 1px solid rgba(31, 143, 136, 0.12);
  padding: 28px 0 32px;
  position: relative;
}

.ds-header::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent 0%, var(--teal) 30%, var(--teal) 70%, transparent 100%);
  opacity: 0.35;
}

.ds-header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.ds-logo {
  display: block;
  max-width: 360px;
  height: auto;
}

.ds-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  background: var(--paper);
  border: 1px solid rgba(31, 143, 136, 0.15);
  border-radius: 999px;
  padding: 6px;
  box-shadow: var(--shadow-sm);
}

.ds-nav a {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-soft);
  padding: 8px 18px;
  border-radius: 999px;
  transition: all 0.18s ease;
}

.ds-nav a:hover,
.ds-nav a.active {
  background: var(--teal);
  color: white;
  text-decoration: none;
}

/* ===== Hero ===== */
.ds-hero {
  padding: 56px 0 32px;
  text-align: center;
}

.ds-hero h1 {
  margin-bottom: 0.4em;
}

.ds-hero h1 .accent {
  background: linear-gradient(180deg, transparent 60%, rgba(43, 175, 166, 0.28) 60%);
  padding: 0 6px;
}

.ds-hero-lead {
  font-size: 1.12rem;
  max-width: 640px;
  margin: 0 auto 28px;
  color: var(--ink-soft);
}

.ds-pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 20px 0 32px;
}

.ds-pill {
  font-family: var(--f-mono);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--sage);
  color: var(--teal-deep);
  transition: all 0.15s ease;
}

.ds-pill:hover {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
  text-decoration: none;
}

/* ===== Sektioner ===== */
.ds-section {
  padding: 48px 0;
}

.ds-section-head {
  text-align: center;
  margin-bottom: 40px;
}

.ds-eyebrow {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  padding: 4px 12px;
  background: var(--mist);
  border-radius: 4px;
  margin-bottom: 14px;
}

.ds-section-head h2 { margin-bottom: 0.4em; }

/* ===== Operatörskort (huvudlistan) ===== */
.ds-deals {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ds-deal {
  background: var(--paper);
  border-radius: var(--r-lg);
  padding: 36px 28px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ds-deal:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.ds-deal:nth-child(even) {
  background: var(--mist-soft);
  border-color: rgba(31, 143, 136, 0.18);
}

.ds-deal-rank {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--cream);
  border: 1.5px solid var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-mono);
  font-weight: 700;
  color: var(--teal-deep);
  font-size: 0.85rem;
}

.ds-deal-head {
  text-align: center;
  margin-bottom: 22px;
}

.ds-deal-logo {
  max-height: 56px;
  max-width: 180px;
  width: auto;
  height: auto;
  margin: 0 auto 14px;
  display: block;
}

.ds-stars {
  --pct: 100%;
  display: inline-block;
  position: relative;
  font-size: 1.15rem;
  line-height: 1;
  letter-spacing: 1px;
  font-family: Arial, sans-serif; /* säkerställer ★-glyf */
  color: #D9DDD7;
}

.ds-stars::before {
  content: '★★★★★';
}

.ds-stars::after {
  content: '★★★★★';
  position: absolute;
  inset: 0;
  color: var(--teal);
  overflow: hidden;
  width: var(--pct);
  white-space: nowrap;
}

.ds-deal-title {
  font-family: var(--f-display);
  font-size: 1.45rem;
  font-weight: 700;
  text-align: center;
  margin: 18px 0 22px;
  color: var(--ink);
}

.ds-deal-facts {
  list-style: none;
  padding: 0;
  margin: 0 auto 26px;
  max-width: 460px;
}

.ds-deal-facts li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 8px 0;
  font-size: 0.98rem;
  color: var(--ink);
}

.ds-arrow {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.95rem;
  line-height: 1;
}

.ds-arrow::before {
  content: '→';
}

.ds-deal-price {
  color: var(--signal);
  font-weight: 600;
}

.ds-cta-wrap {
  text-align: center;
  margin-top: 6px;
}

.ds-cta {
  display: inline-block;
  background: var(--signal);
  color: white;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 34px;
  border-radius: var(--r-md);
  border: none;
  cursor: pointer;
  transition: all 0.18s ease;
  letter-spacing: -0.005em;
  box-shadow: 0 2px 6px rgba(183, 50, 42, 0.2);
}

.ds-cta:hover {
  background: var(--signal-deep);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(183, 50, 42, 0.3);
}

.ds-cta-ghost {
  background: transparent;
  color: var(--teal-deep);
  border: 1.5px solid var(--teal);
  box-shadow: none;
}

.ds-cta-ghost:hover {
  background: var(--teal);
  color: white;
  box-shadow: var(--shadow-sm);
}

/* ===== Operator-kort (i listor) ===== */
.ds-op-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.ds-op {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 22px 16px;
  text-align: center;
  transition: all 0.18s ease;
}

.ds-op:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.ds-op img {
  max-height: 40px;
  max-width: 120px;
  width: auto;
  height: auto;
  margin: 0 auto 10px;
  display: block;
}

.ds-op-name {
  font-family: var(--f-display);
  font-weight: 600;
  color: var(--ink);
  font-size: 0.95rem;
}

/* ===== Artikel / brödtext ===== */
.ds-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 20px;
}

.ds-article h2 { margin-top: 1.6em; }
.ds-article h3 { margin-top: 1.4em; }

.ds-article p, .ds-article li {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink);
}

.ds-article ul, .ds-article ol {
  padding-left: 1.4em;
}

.ds-article ul li::marker { color: var(--teal); }

.ds-meta {
  font-family: var(--f-mono);
  font-size: 0.82rem;
  color: var(--ink-mute);
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.ds-meta time { color: var(--teal-deep); font-weight: 500; }

.ds-figure {
  margin: 32px 0;
  text-align: center;
}

.ds-figure img {
  max-width: 100%;
  height: auto;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
}

.ds-figure figcaption {
  font-family: var(--f-mono);
  font-size: 0.78rem;
  color: var(--ink-mute);
  margin-top: 10px;
  letter-spacing: 0.04em;
}

/* ===== Faktablock / quote ===== */
.ds-fact {
  background: var(--mist-soft);
  border-left: 3px solid var(--teal);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 20px 24px;
  margin: 28px 0;
}

.ds-fact-label {
  font-family: var(--f-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: 6px;
}

/* ===== Tabell ===== */
.ds-table-wrap {
  overflow-x: auto;
  margin: 28px 0;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--paper);
}

.ds-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.ds-table th {
  background: var(--mist);
  color: var(--teal-deep);
  font-family: var(--f-display);
  font-weight: 700;
  text-align: left;
  padding: 14px 18px;
  letter-spacing: -0.005em;
  border-bottom: 1px solid var(--sage);
}

.ds-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.ds-table tr:last-child td { border-bottom: none; }
.ds-table tr:hover td { background: var(--mist-soft); }

.ds-table .num {
  font-family: var(--f-mono);
  color: var(--teal-deep);
  font-weight: 500;
}

/* ===== Breadcrumbs ===== */
.ds-breadcrumbs {
  padding: 18px 0 0;
  font-size: 0.85rem;
  color: var(--ink-mute);
  font-family: var(--f-mono);
}

.ds-breadcrumbs a { color: var(--ink-mute); }
.ds-breadcrumbs a:hover { color: var(--teal); }
.ds-breadcrumbs .sep { color: var(--sage); margin: 0 6px; }
.ds-breadcrumbs .current { color: var(--teal-deep); }

/* ===== Webbplatskarta ===== */
.ds-sitemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 36px 32px;
}

.ds-sitemap-col h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--teal);
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.ds-sitemap-num {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--teal);
  letter-spacing: 0.08em;
  background: var(--mist);
  padding: 3px 7px;
  border-radius: 4px;
}

.ds-sitemap-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ds-sitemap-list li {
  padding: 6px 0;
}

.ds-sitemap-list a {
  color: var(--ink-soft);
  font-size: 0.96rem;
  text-decoration: none;
  display: inline-block;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  transition: all 0.15s ease;
}

.ds-sitemap-list a:hover {
  color: var(--teal-deep);
  border-bottom-color: var(--teal);
}

/* ===== FAQ (details/summary accordion) ===== */
.ds-faq {
  border-bottom: 1px solid var(--line);
  margin: 0;
  padding: 0;
}
.ds-faq:first-of-type {
  border-top: 1px solid var(--line);
}
.ds-faq summary {
  cursor: pointer;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--ink);
  padding: 20px 48px 20px 4px;
  list-style: none;
  position: relative;
  transition: color 0.15s ease;
  line-height: 1.4;
}
.ds-faq summary:hover { color: var(--teal-deep); }
.ds-faq summary::-webkit-details-marker { display: none; }
.ds-faq summary::after {
  content: '';
  position: absolute;
  right: 8px;
  top: 50%;
  width: 14px;
  height: 14px;
  border-right: 2px solid var(--teal);
  border-bottom: 2px solid var(--teal);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.25s ease;
}
.ds-faq[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}
.ds-faq > *:not(summary) {
  margin: 0 4px 18px;
  animation: ds-faq-in 0.22s ease;
}
@keyframes ds-faq-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Footer ===== */
.ds-footer {
  background: linear-gradient(180deg, var(--ink) 0%, #0F1818 100%);
  color: rgba(255, 255, 255, 0.78);
  padding: 56px 0 28px;
  margin-top: 80px;
  position: relative;
}

.ds-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal-deep), var(--teal-bright), var(--teal-deep));
}

.ds-footer h4 {
  color: white;
  font-family: var(--f-display);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.ds-footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px 24px;
  margin-bottom: 40px;
}

.ds-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ds-footer li { padding: 4px 0; }

.ds-footer a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.92rem;
}

.ds-footer a:hover {
  color: var(--teal-bright);
  text-decoration: none;
}

.ds-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 20px;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.ds-footer-bottom a { color: rgba(255, 255, 255, 0.7); }

/* ===== Bootstrap table-responsive kompatibilitet ===== */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== Sticky bottom-CTA på mobil ===== */
.ds-sticky-cta {
  display: none;
}
@media (max-width: 768px) {
  .ds-sticky-cta {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    background: var(--paper);
    border-top: 1px solid var(--line);
    padding: 12px 16px;
    box-shadow: 0 -4px 16px rgba(26, 36, 36, 0.08);
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .ds-sticky-cta-text {
    flex: 1;
    font-size: 0.85rem;
    line-height: 1.3;
    color: var(--ink);
  }
  .ds-sticky-cta-text small {
    display: block;
    color: var(--ink-mute);
    font-size: 0.7rem;
  }
  .ds-sticky-cta .ds-cta {
    padding: 12px 18px;
    font-size: 0.92rem;
    min-height: 48px;
    white-space: nowrap;
  }
  /* Lägg utrymme i botten av sidan så sticky inte täcker innehåll */
  body { padding-bottom: 80px; }
}

/* ===== Annonslänk-disclosure (lagkrav) ===== */
.ds-disclosure {
  font-size: 0.88em;
  color: var(--ink-mute);
  border-left: 3px solid var(--teal);
  padding: 10px 16px;
  background: var(--mist-soft);
  border-radius: 6px;
  margin: 0 0 24px;
  line-height: 1.5;
}
.ds-disclosure strong { color: var(--ink); }

/* ===== Mobil ===== */
@media (max-width: 640px) {
  .ds-deal { padding: 28px 18px; }
  .ds-deal-rank { top: 12px; left: 12px; width: 30px; height: 30px; font-size: 0.78rem; }
  .ds-deal-title { font-size: 1.2rem; }
  .ds-deal-logo { max-width: 140px; max-height: 44px; }
  .ds-hero { padding: 36px 0 24px; }
  .ds-section { padding: 32px 0; }
  .ds-nav { font-size: 0.85rem; }
  .ds-nav a { padding: 7px 12px; font-size: 0.85rem; }
}

/* ===== Accessibility / utils ===== */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: 24px; }
