/* ================= RESET ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  font-size: 16px; /* Bättre för Safari/mobil – minskar auto-zoom */
}
body {
  width: 100%;
  overflow-x: hidden;
  font-family: 'Inter', sans-serif;
  color: #1a1a1a;
  line-height: 1.85;
}
/* Safe-area för iPhone-notch/dynamic island */
.floating-header {
  padding-top: env(safe-area-inset-top);
}
/* ================= LOGO ================= */
.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  color: #1a1a1a;
}
.logo-img {
  height: 65px;
  width: auto;
}
.logo-text {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
/* ISOTHEA */
.isothea {
  font-family: "Playfair Display", serif;
  font-size: 28px;
  color: #444444;
  letter-spacing: 1px;
}
/* FÖRVALTNING */
.forvaltning {
  font-family: "Playfair Display", serif;
  font-size: 16px;
  color: #1a1a1a;
  font-weight: 500;
}
/* ================= HEADER ================= */
.floating-header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 1320px;
  padding: 6px 20px;
  background: rgba(255,255,255,0.9);
  border-radius: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px); /* För äldre iOS */
  box-shadow: 0 18px 50px rgba(0,0,0,0.12);
  z-index: 1000;
}
nav {
  display: flex;
  align-items: center;
}
nav a {
  margin-left: 20px;
  text-decoration: none;
  color: #1a1a1a;
  font-size: 14px;
  padding: 8px 18px;
  border-radius: 18px;
  transition: all 0.25s ease;
}
nav a:hover {
  background: rgba(240,240,240,0.9);
}
.contact-btn {
  border: 1px solid #1a1a1a;
  border-radius: 40px;
  padding: 8px 26px;
}
/* ================= HAMBURGER ================= */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 7px;
  cursor: pointer;
}
.hamburger span {
  width: 26px;
  height: 3px;
  background: #1a1a1a;
  border-radius: 2px;
}
/* ================= HERO ================= */
.hero {
  min-height: 80vh;
  background: url("https://images.unsplash.com/photo-1503387762-592deb58ef4e") center/cover no-repeat;
  display: flex;
  align-items: center;
  padding: 0 20px;
  position: relative;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.8);
}
.hero-text {
  position: relative;
  max-width: 720px;
}
.hero h1 {
  font-size: 26px;
  margin-bottom: 20px;
  line-height: 1.3;
}
.hero p {
  font-size: 15px;
}
.hero .btn-primary {
  display: inline-block;
  margin-top: 20px;
  background: #0f172a;
  color: white;
  font-size: 14px;
  font-weight: 600;
  padding: 14px 36px;
  border-radius: 70px;
  text-decoration: none;
  box-shadow: 0 14px 36px rgba(0,0,0,0.25);
  transition: all 0.35s ease;
}
/* ================= SECTIONS ================= */
.section {
  padding: 80px 20px;
}
.section.light {
  background: #f8f9fa;
}
.content {
  max-width: 1320px;
  margin: auto;
}
/* ================= GRID / COLUMNS ================= */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}
.two-col.reverse .text { order: 1; }
.two-col.reverse .image { order: 2; }
.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
.service-card {
  background: white;
  padding: 24px;
  border-radius: 26px;
}
/* ================= IMAGE REVEAL ================= */
.image {
  opacity: 0;
  transform: translateX(0);
  transition: all 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}
.slide-left { transform: translateX(-60px); }
.slide-right { transform: translateX(60px); }
.reveal.active .image {
  opacity: 1;
  transform: translateX(0);
}
.image img {
  width: 100%;
  border-radius: 26px;
  box-shadow: 0 28px 70px rgba(0,0,0,0.14);
}
/* ================= CONTACT ================= */
.contact {
  background: #f8f9fa;
  padding: 100px 20px;
}
.contact-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}
.contact-text h2 {
  font-size: 30px;
  margin-bottom: 20px;
}
.contact-text p {
  font-size: 15px;
  max-width: 520px;
  color: #475569;
}
.contact-form {
  background: white;
  padding: 32px;
  border-radius: 24px;
  box-shadow: 0 34px 90px rgba(0,0,0,0.1);
}
.contact-form input,
.contact-form textarea {
font-family: inherit;
  width: 100%;
  padding: 16px 20px;
  margin-bottom: 16px;
  border-radius: 14px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}
.contact-form textarea {
  min-height: 150px;
}
.contact-form button {
  width: 100%;
  background: #0f172a;
  color: white;
  font-size: 14px;
  font-weight: 600;
  padding: 16px;
  border-radius: 70px;
  border: none;
  cursor: pointer;
  transition: all 0.35s ease;
}
/* ================= FOOTER ================= */
footer {
  text-align: center;
  padding: 20px;
  font-size: 14px;
  color: #475569;
}
/* ================= MOBILE NAV ================= */
@media (min-width: 769px) {
  /* Desktop grids */
  .two-col { grid-template-columns: 1fr 1fr; gap: 120px; }
  .grid-4 { grid-template-columns: repeat(4, 1fr); gap: 40px; }
  .contact-inner { grid-template-columns: 1.1fr 0.9fr; gap: 120px; }
  .hero { min-height: 100vh; padding: 0 160px; }
  .hero h1 { font-size: 34px; }
  .section { padding: 190px 160px; }
  .contact { padding: 200px 160px; }
}
/* ================= MOBILE MENU ================= */
@media (max-width: 820px) { /* Högre brytpunkt för att behålla desktop-nav längre */
  nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    width: 220px;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  }
  nav.active {
    display: flex;
  }
  nav a {
    margin: 8px 0;
  }
  .hamburger {
    display: flex;
  }
  .floating-header {
    padding: 6px 32px; /* Mer sidluft för att rymma lång logo-text */
    gap: 28px; /* Naturligt mellanrum mellan logo och hamburger */
  }
  .logo-img {
    height: 55px;
  }
  .isothea {
    font-size: 26px;
  }
  .forvaltning {
    font-size: 15px;
  }
  .hamburger span {
    width: 24px;
    height: 3px;
  }
}

/* Extra för väldigt små skärmar (t.ex. iPhone SE) */
@media (max-width: 480px) {
  .floating-header {
    padding: 4px 28px;
    border-radius: 60px; /* Lite mindre radius för att rymma bättre, men fortfarande rund */
  }
  .logo-img {
    height: 48px;
  }
  .isothea {
    font-size: 24px;
  }
  .forvaltning {
    font-size: 14px;
  }
  .hero h1 {
    font-size: 24px;
  }
}

/* ================= SUCCESS POPUP ================= */
.success-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s ease;
  z-index: 9999;
}
.success-overlay.active {
  opacity: 1;
  visibility: visible;
}
.success-popup {
  background: #ffffff;
  padding: 60px 50px;
  max-width: 520px;
  width: 90%;
  text-align: center;
  border-radius: 28px;
  box-shadow: 0 40px 100px rgba(0,0,0,0.18);
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}
.success-overlay.active .success-popup {
  transform: translateY(0);
}
.success-popup h2 {
  font-family: "Playfair Display", serif;
  font-size: 28px;
  color: #1a1a1a;
  margin-bottom: 18px;
}
.success-popup p {
  font-size: 15px;
  color: #475569;
  margin-bottom: 30px;
  line-height: 1.7;
}
.success-popup button {
  background: #0f172a;
  color: white;
  padding: 14px 34px;
  border: none;
  border-radius: 70px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}
.success-popup button:hover {
  background: #1e293b;
}
/* ================= FOOTER – FINAL VERSION ================= */
footer {
  text-align: center;
  padding: 28px 20px 40px;
  font-size: 13.5px;
  color: #475569;
  border-top: 1px solid #eee;
  background: #f9f9f9;
}
.footer-text {
  margin: 0;
  line-height: 1.6;
}
.footer-sep {
  margin: 0 10px;
  color: #d1d5db;
}
.footer-link {
  color: #475569;
  text-decoration: none;
  transition: color 0.25s ease;
}
.footer-link:hover {
  color: #0f172a;
  text-decoration: underline;
}
/* Mobil – snyggt brytande */
@media (max-width: 768px) {
  footer {
    padding: 24px 16px 36px;
    font-size: 13px;
  }
  .footer-text {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 14px;
  }
  .footer-sep {
    display: none;
  }
}
/* ================= MODAL – FINAL VERSION ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  z-index: 9999;
  transition: opacity 0.4s ease;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.modal-content {
  background: white;
  width: 90%;
  max-width: 760px;
  max-height: 88vh;
  border-radius: 24px;
  box-shadow: 0 40px 120px rgba(0,0,0,0.28);
  overflow: hidden;
  transform: scale(0.92);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.active .modal-content {
  transform: scale(1);
}
.modal-close {
  position: absolute;
  top: 18px;
  right: 24px;
  background: none;
  border: none;
  font-size: 36px;
  color: #64748b;
  cursor: pointer;
  transition: color 0.3s ease;
}
.modal-close:hover {
  color: #0f172a;
}
.modal-content h2 {
  font-family: "Playfair Display", serif;
  font-size: 30px;
  color: #1a1a1a;
  padding: 32px 32px 16px;
  margin: 0;
  border-bottom: 1px solid #eee;
}
.modal-body {
  padding: 28px 32px 36px;
  font-size: 14.5px;
  line-height: 1.75;
  color: #475569;
  overflow-y: auto;
  max-height: calc(88vh - 110px);
}
.modal-body h3 {
  font-size: 18px;
  color: #1a1a1a;
  margin: 28px 0 12px;
}
.modal-body ul {
  padding-left: 22px;
  margin: 12px 0;
}
.modal-body li {
  margin-bottom: 10px;
}
/* Mobil modal */
@media (max-width: 768px) {
  .modal-content {
    width: 94%;
    max-height: 92vh;
  }
  .modal-body {
    padding: 24px 26px 32px;
  }
}
/* FAQ – centrerad accordion som scaniabemanning.se */
#faq h2 {
  text-align: center;
  font-size: 32px;
  margin-bottom: 40px;
  color: #1a1a1a;
}
.faq-accordion {
  max-width: 900px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid #e5e7eb;
}
.faq-question {
  width: 100%;
  padding: 20px 0;
  background: none;
  border: none;
  text-align: left;
  font-size: 17px;
  font-weight: 500;
  color: #1a1a1a;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.3s ease;
}
.faq-question:hover {
  color: #0f172a;
}
.faq-icon {
  font-size: 20px;
  font-weight: bold;
  transition: transform 0.3s ease;
  color: #475569;
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, padding 0.4s ease-out;
  padding: 0;
}
.faq-item.open .faq-answer {
  max-height: 600px; /* justera vid behov om svar är längre */
  padding: 0 0 20px 0;
}
.faq-answer p {
  font-size: 15px;
  color: #475569;
  margin: 0;
  line-height: 1.7;
}
/* Mobil */
@media (max-width: 768px) {
  .faq-question {
    font-size: 16px;
    padding: 18px 0;
  }
  #faq h2 {
    font-size: 28px;
  }
}
/* ================= FORCE RESPONSIVE MOBILE OVERRIDE ================= */

/* Gör allt mobilanpassat som standard */
.two-col {
  grid-template-columns: 1fr !important;
  gap: 40px !important;
}

.grid-4 {
  grid-template-columns: 1fr !important;
  gap: 24px !important;
}

.contact-inner {
  grid-template-columns: 1fr !important;
  gap: 40px !important;
}

.hero {
  padding: 0 24px !important;
  min-height: auto !important;
}

.section {
  padding: 120px 24px !important;
}

.contact {
  padding: 120px 24px !important;
}

/* Responsiv text */
.hero h1 {
  font-size: clamp(24px, 6vw, 42px) !important;
}

.isothea {
  font-size: clamp(22px, 5vw, 30px) !important;
}

.forvaltning {
  font-size: clamp(14px, 3.5vw, 18px) !important;
}

/* ================= Desktop override ================= */

@media (min-width: 900px) {

  .two-col {
    grid-template-columns: 1fr 1fr !important;
    gap: 120px !important;
  }

  .grid-4 {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 40px !important;
  }

  .contact-inner {
    grid-template-columns: 1.1fr 0.9fr !important;
    gap: 120px !important;
  }

  .hero {
    padding: 0 160px !important;
    min-height: 100vh !important;
  }

  .section {
    padding: 190px 160px !important;
  }

  .contact {
    padding: 200px 160px !important;
  }
}