/* ════════════════════════════════════════════════════════════════════
   SHARED GLOBAL STYLES - Fixarflytt
   Used across all pages: navbar, footer, form sections
   ════════════════════════════════════════════════════════════════════ */

/* ── COLOUR VARIABLES (matches flytthjalp.html palette) ── */
:root {
  --primary-blue: #1e3a8a;
  --accent-orange: #f97316;
  --gray-text: #64748b;
  --dark: #0f172a;
  --success-green: #10b981;
  --form-accent: #f97316;
}

/* ── RESET & BASE ── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  padding-top: 72px;
}

/* ── NAVBAR ── */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  flex-shrink: 0;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.nav-logo img {
  height: 42px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  display: flex;
  align-items: center;
  padding: 0.65rem 1.1rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
  min-height: 44px;
  position: relative;
}

.nav-links li a:hover {
  background: #f3f4f6;
  color: #1e3a8a;
}

.nav-links li a:focus-visible {
  outline: 2px solid #f97316;
  outline-offset: 2px;
}

.nav-links li a.active {
  background: #f3f4f6;
  color: #1e3a8a;
}

/* ── DROPDOWN MENU ── */
.dropdown {
  position: relative;
}

.dropdown-toggle::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  margin-left: 7px;
  vertical-align: middle;
  transition: transform 0.25s ease;
}

.dropdown:hover .dropdown-toggle::after,
.dropdown.open .dropdown-toggle::after {
  transform: rotate(-135deg) translateY(2px);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  list-style: none;
  padding: 0.5rem 0;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
  border: 1px solid #f0f0f0;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  list-style: none;
}

.dropdown-menu li a {
  display: flex;
  align-items: center;
  padding: 0.85rem 1.4rem;
  color: #374151;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  margin: 0 0.5rem;
  border-radius: 0 8px 8px 0;
}

.dropdown-menu li a:hover {
  background: #f9fafb;
  color: #1e3a8a;
  border-left-color: #f97316;
  transform: translateX(4px);
}

.dropdown-menu li a:focus-visible {
  outline: 2px solid #f97316;
  outline-offset: -2px;
}

.dropdown-menu li:first-child a {
  border-top-left-radius: 12px;
}

.dropdown-menu li:last-child a {
  border-bottom-left-radius: 12px;
}

.nav-cta {
  background: #f97316 !important;
  color: white !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  padding: 0.6rem 1.3rem !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.nav-cta:hover {
  background: #ea6c0a !important;
  color: white !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

.nav-cta:focus-visible {
  outline: 2px solid #1e3a8a !important;
  outline-offset: 2px !important;
}

.mobile-btn {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  color: #374151;
  min-width: 44px;
  min-height: 44px;
  transition: all 0.2s ease;
}

.mobile-btn:hover {
  background: #f3f4f6;
  border-radius: 8px;
}

.mobile-btn:focus-visible {
  outline: 2px solid #f97316;
  outline-offset: 2px;
  border-radius: 8px;
}

@media (max-width: 900px) {
  .mobile-btn {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 72px;
    left: 0.5rem;
    right: 0.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
    z-index: 999;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    border-bottom: 1px solid #f3f4f6;
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links li a {
    padding: 0.85rem 1.2rem;
    border-radius: 0;
    font-size: 0.95rem;
  }

  .dropdown-menu {
    display: none;
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: #f9fafb;
    border: none;
    border-radius: 0;
    margin-top: 0;
    padding: 0.5rem 0;
    min-width: unset;
  }

  .dropdown.open .dropdown-menu {
    display: block;
  }

  .dropdown-toggle {
    display: flex;
    justify-content: space-between;
    width: 100%;
  }

  .dropdown-menu li a {
    padding-left: 2.2rem;
    background: #f9fafb;
    border-left: none;
    margin: 0;
    border-radius: 0;
  }

  .dropdown-menu li a:hover {
    background: #f3f4f6;
    border-left-color: transparent;
    transform: none;
  }
}

/* ── FOOTER ── */
footer {
  background: #0f172a;
  color: rgba(255, 255, 255, 0.7);
  padding: 3.5rem 2rem 2rem;
  margin-top: 5rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand img {
  height: 38px;
  width: auto;
  opacity: 0.85;
  margin-bottom: 1rem;
  display: block;
  transition: opacity 0.3s ease;
}

.footer-brand img:hover {
  opacity: 1;
}

.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.7;
}

.footer-col h4 {
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.88rem;
  margin-bottom: 0.55rem;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: #f97316;
}

.footer-bottom {
  max-width: 1100px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #f97316;
}

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

/* ── FORM SECTION ── */
.form-section {
  padding: 5rem 2rem;
  background: #f8fafc;
}

.form-wrapper {
  max-width: 760px;
  margin: 0 auto;
}

.form-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.form-header h2 {
  font-size: 2.2rem;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.form-header p {
  color: #64748b;
  font-size: 1.05rem;
}

.form-card {
  background: white;
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.form-group {
  margin-bottom: 1.4rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: #374151;
  margin-bottom: 0.45rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fafafa;
  color: #0f172a;
  transition:
    border-color 0.25s,
    box-shadow 0.25s;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--form-accent, #f97316);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
  background: white;
}

.form-group textarea {
  resize: vertical;
  min-height: 110px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.9rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
}

.check-item:has(input:checked) {
  border-color: var(--form-accent, #f97316);
  background: #fff7f0;
}

.check-item input {
  width: 16px;
  height: 16px;
  accent-color: var(--form-accent, #f97316);
  cursor: pointer;
  flex-shrink: 0;
}

.check-item span {
  font-size: 0.88rem;
  color: #374151;
}

.form-submit {
  width: 100%;
  padding: 1rem 2rem;
  background: var(--form-accent, #f97316);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 0.5rem;
  font-family: inherit;
}

.form-submit:hover {
  filter: brightness(0.92);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.35);
}

.form-note {
  text-align: center;
  color: #94a3b8;
  font-size: 0.85rem;
  margin-top: 1.2rem;
}

.form-success {
  display: none;
  text-align: center;
  padding: 3rem 2rem;
}

.form-success .success-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.form-success h3 {
  font-size: 1.8rem;
  color: #10b981;
  margin-bottom: 0.75rem;
}

.form-success p {
  color: #64748b;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.form-success a {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: var(--form-accent, #f97316);
  color: white;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .form-card {
    padding: 2rem 1.5rem;
  }
}

/* ── WEBP IMAGE OPTIMIZATION ── */
/* Hero background images with WebP support for modern browsers */

@supports (background-image: url("/images/hero.webp")) {
  .hero {
    background-color: #000;
  }
}

/* Service-specific hero images with WebP fallbacks */
@supports (background-image: url("")) {
  /* Tippkörning hero - WebP optimized */
  [style*="tippkorning.jpg"] {
    background-image:
      linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
      url("/images/tippkorning.webp") !important;
    background-size: cover !important;
    background-position: center !important;
  }

  /* Foretagsflytt hero - WebP optimized */
  [style*="foretagsflytt.jpg"] {
    background-image:
      linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
      url("/images/foretagsflytt.webp") !important;
    background-size: cover !important;
    background-position: center !important;
  }

  /* Flyttstadning hero - WebP optimized */
  [style*="flyttstadning.jpg"] {
    background-image:
      linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
      url("/images/flyttstadning.webp") !important;
    background-size: cover !important;
    background-position: center !important;
  }

  /* Flytthjälp hero - WebP optimized */
  [style*="flytthjalp.jpg"] {
    background-image:
      linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
      url("/images/flytthjalp.webp") !important;
    background-size: cover !important;
    background-position: center !important;
  }

  /* Dödsboröjning hero - WebP optimized */
  [style*="dodsborojning.jpg"] {
    background-image:
      linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
      url("/images/dodsborojning.webp") !important;
    background-size: cover !important;
    background-position: center !important;
  }
}

/* ── AI / GEO CONTENT (visually hidden, accessible to crawlers & screen readers) ── */
.ai-content {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Guide Article Shared Styles ─────────────────────────────────────────── */
.article-hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  padding: 5rem 2rem 3rem;
  text-align: center;
  color: white;
}
.article-hero .cat {
  color: #fbbf24;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}
.article-hero h1 {
  font-family: "Fraunces", serif;
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 1rem;
  line-height: 1.2;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.article-hero .meta {
  opacity: 0.8;
  font-size: 0.9rem;
}
article {
  max-width: 780px;
  margin: 0 auto;
  padding: 4rem 2rem;
}
article h2 {
  font-family: "Fraunces", serif;
  font-size: 1.7rem;
  color: #1e3a8a;
  font-weight: 900;
  margin: 2.5rem 0 1rem;
}
article h3 {
  font-size: 1.2rem;
  color: #0f172a;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
}
article p {
  color: #374151;
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 1.2rem;
}
article ul,
article ol {
  color: #374151;
  font-size: 1.05rem;
  line-height: 1.85;
  margin: 0 0 1.5rem 1.2rem;
}
article li {
  margin-bottom: 0.4rem;
}
article strong {
  color: #0f172a;
}
.tip-box {
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  padding: 1rem 1.4rem;
  border-radius: 0 10px 10px 0;
  margin: 1.5rem 0;
}
.tip-box p {
  margin: 0;
  color: #1e40af;
  font-size: 0.95rem;
}
.warn-box {
  background: #fff7ed;
  border-left: 4px solid #f97316;
  padding: 1rem 1.4rem;
  border-radius: 0 10px 10px 0;
  margin: 1.5rem 0;
}
.warn-box p {
  margin: 0;
  color: #9a3412;
  font-size: 0.95rem;
}
.cta-inline {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: white;
  border-radius: 14px;
  padding: 2rem;
  text-align: center;
  margin: 3rem 0;
}
.cta-inline h3 {
  font-family: "Fraunces", serif;
  font-size: 1.5rem;
  margin-bottom: 0.6rem;
}
.cta-inline p {
  opacity: 0.9;
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}
.cta-inline a {
  background: white;
  color: #ea580c;
  font-weight: 700;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  text-decoration: none;
}
.breadcrumbs {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 2rem;
}
.breadcrumbs a {
  color: #f97316;
  text-decoration: none;
}
.related-articles {
  background: #f8fafc;
  padding: 3rem 2rem;
}
.related-inner {
  max-width: 780px;
  margin: 0 auto;
}
.related-inner h2 {
  font-family: "Fraunces", serif;
  font-size: 1.5rem;
  color: #1e3a8a;
  margin-bottom: 1.5rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem;
}
.related-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.2rem;
  text-decoration: none;
  display: block;
}
.related-card:hover {
  border-color: #f97316;
}
.related-card span {
  color: #f97316;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.4rem;
}
.related-card p {
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
}

/* ── Guide Article – UX & Responsive Improvements ───────────────────────── */

/* Scrollable table wrapper (prevents horizontal overflow on mobile) */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}
.table-scroll table {
  margin: 0;
  min-width: 520px;
}

/* CTA inline button – add transition + hover */
.cta-inline a {
  display: inline-block;
  transition:
    background 0.2s,
    color 0.2s,
    transform 0.15s;
}
.cta-inline a:hover {
  background: #fff7ed;
  color: #c2410c;
  transform: translateY(-2px);
}

/* Back to top link */
.back-to-top {
  display: block;
  text-align: center;
  margin: 2.5rem 0 0;
  padding: 0.65rem 1rem;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.back-to-top:hover {
  color: #f97316;
  border-color: #f97316;
}

/* Widen related articles section */
.related-inner {
  max-width: 900px;
  margin: 0 auto;
}

/* ── Article – Mobile Responsive ────────────────────────────────────────── */
@media (max-width: 640px) {
  .article-hero {
    padding: 3.5rem 1.25rem 2.25rem;
  }
  .article-hero h1 {
    font-size: 1.75rem;
    line-height: 1.25;
  }
  .article-hero .meta {
    font-size: 0.82rem;
  }
  article {
    padding: 2.5rem 1.25rem;
  }
  article h2 {
    font-size: 1.4rem;
  }
  article h3 {
    font-size: 1.05rem;
  }
  .cta-inline {
    padding: 1.5rem 1.25rem;
  }
  .cta-inline h3 {
    font-size: 1.25rem;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
}
