/* ========================================
   LANDNINGSSIDA – KOMPLETT CSS
   ======================================== */

/* ----------- FÄRGVARIABLER - Ändra här för att anpassa färgschema ----------- */
:root {
  /* ===== PRIMÄRA FÄRGER ===== */
  --primary-color: #111;        /* Huvudfärg: CTA-knappar, länkar, accordion-ikoner */
  --primary-hover: #333;        /* Hover-färg för knappar och länkar */
  
  /* ===== TEXTFÄRGER ===== */
  --text-dark: #fff;               /* Mörk text: Rubriker (h1, h2, h3) */
  --text-medium: #fff;             /* Normal text: Brödtext, paragrafer */
  --text-light: #555;              /* Ljusare text: FAQ-svar, mindre viktiga texter */
  --text-white: #fff;              /* Vit text: Hero-titel, knappar */
  
  /* ===== CONTENT BLOCKS FÄRGER ===== */
  --content-heading-color: #fff;   /* Content block rubriker (h2) */
  --content-text-color: #fff;      /* Content block brödtext */
  
  /* ===== FAQ FÄRGER ===== */
  --faq-bg: #222;               /* FAQ-sektion bakgrund */
  --faq-item-bg: #000;             /* Enskild FAQ-item bakgrund */
  --faq-heading-color: #fff;       /* FAQ huvudrubrik (h2) */
  --faq-question-color: #fff;      /* FAQ-frågor text */
  --faq-answer-color: #fff;        /* FAQ-svar text */
  --faq-hover-bg: #222;         /* FAQ-fråga hover bakgrund */
  
  /* ===== FORMULÄR FÄRGER ===== */
  --form-bg: #222;                 /* Formulär-sektion bakgrund */
  --form-heading-color: #fff;      /* Formulär huvudrubrik (h2) */
  --form-label-color: #fff;        /* Formulär labels */
  --form-input-bg: #000;        /* Inputfält bakgrund */
  --form-input-border: #000;    /* Inputfält kantlinje */
  --form-input-text: #fff;         /* Text i inputfält */
  
  /* ===== BAKGRUNDSFÄRGER ===== */
  --bg-page: #000;              /* Hela sidans bakgrundsfärg (body) */
  
  /* ===== KANTLINJER ===== */
  --border-color: #c5d2e7;         /* Kantlinje: Formulärfält, ramar */
  
  /* ===== SKUGGOR ===== */
  --shadow-light: 0 1px 4px rgba(0,0,0,0.06);      /* Lätt skugga: FAQ-items */
  --shadow-medium: 0 2px 8px rgba(0,0,0,0.1);      /* Medium skugga: FAQ hover */
  --shadow-large: 0 4px 24px rgba(0,0,0,0.08);     /* Stor skugga: Content block-bilder */
  --shadow-section: 0 2px 18px rgba(0,0,0,0.06);   /* Sektion-skugga: FAQ & formulär-box */
  
  /* ===== HERO OVERLAY ===== */
  --hero-overlay-start: rgba(0,0,0,0.35);  /* Övertoningens startvärde (toppen, ljusare) */
  --hero-overlay-end: rgba(0,0,0,0.50);    /* Övertoningens slutvärde (botten, mörkare) */
}

/* ===== SIDANS BAKGRUNDSFÄRG (täcker hela sidan) ===== */
body.single-landningssida {
  background-color: var(--bg-page);
  margin: 0;
  padding: 0;
}

/* ----------- Hero (titel + bakgrundsbild) ----------- */
.hero {
  width: 100%;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}
.hero-inner {
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 2;
}
.hero-title {
  font-size: 3rem;
  color: var(--text-white);
  text-shadow: 0 2px 20px rgba(0,0,0,.6);
  margin: 0;
  padding: 2.5rem 1rem;
  letter-spacing: 0.04em;
  font-weight: 700;
}
.hero:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--hero-overlay-start) 0%, var(--hero-overlay-end) 100%);
  z-index: 1;
}

/* ----------- Allt under hero i 70% bredd ----------- */
.landning-content-wrap {
  width: 70%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 0;
}

/* ----------- Content Blocks (50/50 med varannan layout) ----------- */
.content-blocks {
  width: 100%;
  margin: 2rem 0;
}
.content-block {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 5rem;
}
.content-block .block-img {
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.content-block .block-img img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 12px;
  max-height: 380px;
  box-shadow: var(--shadow-large);
}
.content-block .block-fields {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.2em;
}
.content-block .block-fields h2 {
  font-size: 1.8rem;
  margin: 0;
  color: var(--content-heading-color);
  font-weight: 600;
}

/* WYSIWYG-innehåll i content blocks */
.block-text p {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--content-text-color);
  margin: 0 0 1em 0;
}
.block-text p:last-child {
  margin-bottom: 0;
}
.block-text ul,
.block-text ol {
  font-size: 1rem;
  margin: 0 0 1em 0;
  padding-left: 1.5em;
}
.block-text li {
  font-size: 1rem;
  margin-bottom: 0.5em;
  line-height: 1.65;
  color: var(--content-text-color);
  list-style-type: disc;
}
.block-text strong {
  font-size: 1rem;
  font-weight: 600;
  color: var(--content-heading-color);
}
.block-text em {
  font-size: 1rem;
  font-style: italic;
}
.block-text a {
  font-size: 1rem;
  color: var(--primary-color);
  text-decoration: underline;
}
.block-text a:hover {
  color: var(--primary-hover);
}

.content-block .cta-btn {
  background: var(--primary-color);
  color: var(--text-white);
  border-radius: 6px;
  text-decoration: none;
  padding: 0.75em 1.8em;
  border: 0;
  display: inline-block;
  font-weight: 600;
  margin-top: 0.8em;
  cursor: pointer;
  transition: background 0.2s ease;
  align-self: flex-start;
}
.content-block .cta-btn:hover {
  background: var(--primary-hover);
}

/* Varannan block: byt ordning (bild höger) */
.content-block:nth-child(even) {
  flex-direction: row-reverse;
}

/* ----------- FAQ och kontaktformulär bredvid varandra ----------- */
.faq-form-wrap {
  width: 100%;
  margin: 5rem 0;
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}
.faq-section {
  flex: 1 1 50%;
  background: var(--faq-bg);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: var(--shadow-section);
}
.faq-section h2 {
  font-size: 1.75rem;
  margin: 0 0 1.5rem 0;
  color: var(--faq-heading-color);
  font-weight: 600;
}

/* ----------- FAQ Accordion med smooth slide-animation ----------- */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.faq-item {
  background: var(--faq-item-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: box-shadow 0.2s ease;
  margin-bottom: 2em;
}
.faq-item:hover {
  box-shadow: var(--shadow-medium);
}
.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 1.1em 1.3em;
  text-align: left;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--faq-question-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s ease;
}
.faq-question:hover {
  background: var(--faq-hover-bg);
}
.faq-question:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: -2px;
}
.faq-icon {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--primary-color);
  transition: transform 0.3s ease;
  line-height: 1;
}
.faq-question[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
}

/* Smooth slide animation för FAQ-svar */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.faq-answer-inner {
  padding: 1.3em;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--faq-answer-color);
}
.faq-answer-inner p {
  margin: 0;
}
/* ----------- Kontaktformulär med alla CF7-fälttyper ----------- */
.contact-form-section {
  flex: 1 1 50%;
  background: var(--form-bg);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: var(--shadow-section);
}
.contact-form-section h2 {
  font-size: 1.75rem;
  margin: 0 0 1.5rem 0;
  color: var(--form-heading-color);
  font-weight: 600;
}
.contact-form-section label {
  font-weight: 500;
  margin-bottom: 0.5em;
  display: block;
  color: var(--form-label-color);
  font-size: 0.95rem;
}

/* Textfält, email, tel, url, number, date, textarea, select */
.contact-form-section input[type="text"],
.contact-form-section input[type="email"],
.contact-form-section input[type="tel"],
.contact-form-section input[type="url"],
.contact-form-section input[type="number"],
.contact-form-section input[type="date"],
.contact-form-section textarea,
.contact-form-section select {
  width: 100%;
  padding: 0.85em;
  border: 1px solid var(--form-input-border);
  border-radius: 6px;
  margin-bottom: 0.4em;
  background: var(--form-input-bg);
  color: var(--form-input-text);
  font-size: 1rem;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}
.contact-form-section input[type="text"]:focus,
.contact-form-section input[type="email"]:focus,
.contact-form-section input[type="tel"]:focus,
.contact-form-section input[type="url"]:focus,
.contact-form-section input[type="number"]:focus,
.contact-form-section input[type="date"]:focus,
.contact-form-section textarea:focus,
.contact-form-section select:focus {
  border-color: var(--primary-color);
  background: var(--form-bg);
}

/* Textarea */
.contact-form-section textarea {
  resize: vertical;
  min-height: 100px;
}

/* Select dropdown */
.contact-form-section select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%23333' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85em center;
  background-size: 12px;
  padding-right: 2.5em;
  cursor: pointer;
}

/* Radio buttons och checkboxes */
.contact-form-section input[type="radio"],
.contact-form-section input[type="checkbox"] {
  width: auto;
  margin-right: 0.5em;
  margin-bottom: 0;
  cursor: pointer;
}
.contact-form-section .wpcf7-list-item {
  margin: 0 0 0.8em 0;
  display: block;
}
.contact-form-section .wpcf7-list-item label {
  display: inline;
  font-weight: normal;
  cursor: pointer;
  color: var(--form-label-color);
}

/* File upload */
.contact-form-section input[type="file"] {
  width: 100%;
  padding: 0.6em;
  border: 1px solid var(--form-input-border);
  border-radius: 6px;
  margin-bottom: 1.2em;
  background: var(--form-input-bg);
  color: var(--form-input-text);
  font-size: 0.95rem;
  cursor: pointer;
}
.contact-form-section input[type="file"]:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Submit-knapp */
.contact-form-section button,
.contact-form-section input[type="submit"] {
  background: var(--primary-color);
  color: var(--text-white);
  border-radius: 6px;
  padding: 0.85em 2.2em;
  border: 0;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  margin-top: 0.5em;
  transition: background 0.2s ease;
}
.contact-form-section input[type="submit"]:hover,
.contact-form-section button:hover {
  background: var(--primary-hover);
}

/* Acceptance checkbox (GDPR) */
.contact-form-section .wpcf7-acceptance {
  margin: 1em 0;
  font-size: 0.9rem;
}
.contact-form-section .wpcf7-acceptance label {
  font-weight: normal;
  display: inline;
  color: var(--form-label-color);
}

/* Felmeddelanden och validering */
.contact-form-section .wpcf7-not-valid-tip {
  color: #dc3545;
  font-size: 0.85rem;
  margin-top: -0.8em;
  margin-bottom: 1em;
  display: block;
}
.contact-form-section .wpcf7-response-output {
  border: 2px solid #dc3545;
  padding: 1em;
  margin: 1em 0;
  border-radius: 6px;
  font-size: 0.95rem;
}
.contact-form-section .wpcf7-mail-sent-ok {
  border-color: #28a745;
  color: #155724;
  background: #d4edda;
}
.contact-form-section .wpcf7-validation-errors {
  border-color: #dc3545;
  color: #721c24;
  background: #f8d7da;
}

/* Spinner (laddning) */
.contact-form-section .wpcf7-spinner {
  margin-left: 0.5em;
  display: inline-block;
}

/* ----------- Responsivitet (mobil/tablet) ----------- */
@media (max-width: 950px) {
  .landning-content-wrap {
    width: 90%;
  }
  .content-block,
  .faq-form-wrap {
    flex-direction: column;
    gap: 2rem;
  }
  .content-block .block-img,
  .content-block .block-fields,
  .faq-section,
  .contact-form-section {
    flex: 1 1 100%;
    max-width: 100%;
  }
  .content-block:nth-child(even) {
    flex-direction: column;
  }
  
  /* Formulär först på mobil */
  .contact-form-section {
    order: -1;
  }
  .faq-section {
    order: 0;
  }
}

@media (max-width: 600px) {
  .landning-content-wrap {
    width: 96%;
    padding: 2rem 0;
  }
  .hero {
    min-height: 280px;
  }
  .hero-title {
    font-size: 2rem;
    padding: 2rem 1rem;
  }
  .content-blocks {
    margin: 1.5rem 0;
  }
  .content-block {
    margin-bottom: 2rem;
    gap: 1.5rem;
  }
  .content-block .block-fields h2 {
    font-size: 1.5rem;
  }
  .faq-section,
  .contact-form-section {
    padding: 1.5rem;
  }
  .faq-section h2 {
    font-size: 1.5rem;
  }
  .contact-form-section h2 {
    font-size: 1.5rem;
  }
}

/* ===== ULTIMAT FAQ FIX - ÖVERSKRIVER ALLT ===== */

/* Force complete reset */
.landningssida .faq-answer,
.landningssida .faq-answer *,
.landningssida .faq-answer-inner,
.landningssida .faq-answer-inner * {
  all: unset !important;
}

/* Bygg upp från scratch */
.landningssida .faq-answer {
  display: block !important;
  width: 100% !important;
  max-height: 0 !important;
  overflow: hidden !important;
  transition: max-height 0.4s ease !important;
  box-sizing: border-box !important;
  position: static !important;
}

.landningssida .faq-answer-inner {
  display: block !important;
  width: 100% !important;
  padding: 1.3em !important;
  box-sizing: border-box !important;
  position: static !important;
  background: transparent !important;
}

.landningssida .faq-answer-inner p {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 0.98rem !important;
  line-height: 1.65 !important;
  color: var(--faq-answer-color, #555) !important;
  font-family: inherit !important;
  font-weight: normal !important;
  text-align: left !important;
  box-sizing: border-box !important;
}

/* Specifikt för öppnad FAQ */
.landningssida .faq-question[aria-expanded="true"] + .faq-answer {
  overflow: visible !important;
}

/* Fixa om tema har grid/flex på parent */
.landningssida .faq-item {
  display: block !important;
  width: 100% !important;
}

.landningssida .faq-accordion {
  display: block !important;
  width: 100% !important;
}
