/**
 * Hjælp — premium SaaS (samme principper som rådgivning v1)
 * Layout / full-width: assets/css/mda-layout-tt5.css (mda-help-active)
 */

.mda-help-page {
  --mda-help-premium-border: #e3ebf7;
  --mda-help-premium-shadow: 0 16px 40px rgba(20, 35, 73, 0.08);
  --mda-help-soft-shadow: 0 10px 28px rgba(18, 34, 68, 0.07);
  --mda-help-accent: #2e6cff;
  --mda-help-accent-2: #7a5cff;
  font-family: var(--mda-font-sans);
  color: #17325c;
  font-size: 16px;
  line-height: 1.6;
  /* Som .mda-raad-page: gennemsigtig, så temaets sidebaggrund vises (ikke --mda-bg fra shared-frame) */
  background: transparent;
}

.mda-help-page,
.mda-help-page * {
  font-family: var(--mda-font-sans) !important;
}

.mda-help-page h1,
.mda-help-page h2,
.mda-help-page h3,
.mda-help-page h4,
.mda-help-page h5,
.mda-help-page h6 {
  color: #17325c !important;
  letter-spacing: -0.02em !important;
  font-weight: 700 !important;
  text-transform: none !important;
}

.mda-help-page p,
.mda-help-page li,
.mda-help-page label,
.mda-help-page input,
.mda-help-page textarea,
.mda-help-page button {
  color: #3e597a !important;
  font-size: 16px !important;
  line-height: 1.7 !important;
}

.mda-help-page a {
  color: var(--mda-help-accent) !important;
}

.mda-help-page .mda-help-btn {
  color: #fff !important;
}

/* --- Tema / shell --- */
body:has(.mda-help-page) #main-content .container {
  width: 100% !important;
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body:has(.mda-help-page) .entry-title,
body.mda-help-active .entry-title {
  display: none !important;
}

/* --- Ydre container: samme spor som .mda-v2-hero .mda-v2-container (mda-layout-tt5) --- */
.mda-help-container {
  width: var(--mda-universal-card-width, min(var(--mda-content-max), calc(100% - 16px)));
  max-width: var(--mda-universal-card-width, min(var(--mda-content-max), calc(100% - 16px)));
  margin-left: auto;
  margin-right: auto;
  /* Vandret: ingen ekstra “dobbelt-gutter”; kort/indhold bærer indryk */
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
}

/* --- Hero: løftet kort --- */
.mda-help-page .mda-help-hero {
  position: relative;
  margin: var(--mda-universal-menu-gap, 32px) 0 0;
  padding: 0;
  background: transparent;
  overflow: visible;
}

.mda-help-page .mda-help-hero .mda-help-container {
  background: var(--mda-universal-card-bg, #fff);
  border: 1px solid var(--mda-universal-card-border, var(--mda-help-premium-border));
  border-radius: var(--mda-universal-card-radius, 28px);
  box-shadow: var(--mda-universal-card-shadow, var(--mda-help-premium-shadow));
  padding: var(--mda-universal-card-padding-desktop, 32px) !important;
  box-sizing: border-box !important;
}

.mda-help-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  line-height: 1.12;
  color: #17325c !important;
  text-wrap: balance;
}

.mda-help-hero p {
  margin: 0;
  font-size: 17px !important;
  line-height: 1.68 !important;
  color: #5e6b84 !important;
  max-width: 52rem;
}

/* --- Hovedindhold under hero --- */
.mda-help-main {
  background: transparent;
  margin: 0;
  padding: 0;
}

.mda-help-page > .mda-help-hero + .mda-help-main {
  margin-top: 28px;
}

.mda-help-page .mda-help-main > .mda-help-container {
  padding-bottom: var(--mda-universal-card-padding-desktop, 32px);
}

.mda-help-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 24px;
  align-items: start;
  min-width: 0;
}

.mda-help-grid > * {
  min-width: 0;
}

.mda-help-aside {
  margin: 0;
  padding: 0;
  min-width: 0;
}

/* Indhold + kontaktkort */
.mda-help-content,
.mda-help-card {
  margin: 0 !important;
  padding: var(--mda-universal-card-padding-desktop, 32px) !important;
  box-sizing: border-box !important;
  background: var(--mda-universal-card-bg, #fff);
  border: 1px solid var(--mda-universal-card-border, var(--mda-help-premium-border));
  border-radius: var(--mda-universal-card-radius, 28px);
  box-shadow: var(--mda-universal-card-shadow, var(--mda-help-soft-shadow));
}

.mda-help-content h2 {
  margin: 0 0 14px;
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  line-height: 1.15;
  color: #17325c !important;
}

.mda-help-content h2:not(:first-child) {
  margin-top: 28px;
}

.mda-help-content p {
  margin: 0 0 14px;
  color: #425f81 !important;
}

.mda-help-content ul {
  margin: 0 0 20px;
  padding-left: 1.25rem;
  color: #425f81 !important;
}

.mda-help-content li {
  margin-bottom: 6px;
}

.mda-help-card h3 {
  margin: 0 0 12px;
  font-size: 1.35rem;
  line-height: 1.2;
  color: #17325c !important;
}

.mda-help-card > p {
  margin: 0 0 16px;
  color: #425f81 !important;
}

/* --- Formular (som rådgivning) --- */
.mda-help-form {
  display: block;
}

.mda-help-form label {
  display: block;
  margin: 0 0 8px;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #415c7d !important;
}

.mda-help-form input,
.mda-help-form textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid #dbe4f4;
  border-radius: 14px;
  min-height: 50px;
  padding: 14px 16px;
  margin-bottom: 16px;
  color: #17325c !important;
  background: #fff;
  font-size: 16px !important;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.mda-help-form textarea {
  min-height: 140px;
  resize: vertical;
}

.mda-help-form input:focus,
.mda-help-form textarea:focus {
  outline: none;
  border-color: var(--mda-help-accent);
  box-shadow: 0 0 0 4px rgba(46, 108, 255, 0.12);
}

/* --- Knap (samme udtryk som .mda-raad-btn-primary) --- */
.mda-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  position: relative;
  isolation: isolate;
  margin-top: 8px;
  border: 1px solid rgba(120, 140, 255, 0.45);
  border-radius: 16px;
  min-height: 54px;
  padding: 15px 26px;
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  background: linear-gradient(
    165deg,
    #5b8cff 0%,
    var(--mda-help-accent) 38%,
    #5f4dff 78%,
    var(--mda-help-accent-2) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(15, 23, 42, 0.08),
    0 14px 36px rgba(46, 108, 255, 0.32),
    0 4px 12px rgba(15, 23, 42, 0.08);
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s ease,
    filter 0.2s ease;
}

.mda-help-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(15, 23, 42, 0.06),
    0 20px 48px rgba(46, 108, 255, 0.38),
    0 8px 20px rgba(15, 23, 42, 0.1);
}

.mda-help-btn:active {
  transform: translateY(0);
  filter: brightness(0.98);
  box-shadow:
    inset 0 2px 6px rgba(15, 23, 42, 0.12),
    0 8px 20px rgba(46, 108, 255, 0.22);
}

.mda-help-btn:focus-visible {
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(15, 23, 42, 0.08),
    0 14px 36px rgba(46, 108, 255, 0.32),
    0 4px 12px rgba(15, 23, 42, 0.08),
    0 0 0 3px #fff,
    0 0 0 6px rgba(46, 108, 255, 0.45);
}

.mda-help-mail {
  margin: 16px 0 0;
  font-size: 14px !important;
  line-height: 1.6 !important;
  color: #5e6b84 !important;
}

.mda-help-mail a {
  font-weight: 600;
  color: var(--mda-help-accent) !important;
}

.mda-help-feedback {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 15px !important;
  line-height: 1.5 !important;
}

.mda-help-feedback--success {
  background: #ecfdf3;
  color: #166534 !important;
  border: 1px solid #bbf7d0;
}

.mda-help-feedback--error {
  background: #fef2f2;
  color: #991b1b !important;
  border: 1px solid #fecaca;
}

.mda-help-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* --- body.mda-help-active: bredde synk (TT5 / shared frame) --- */
@media (max-width: 980px) {
  .mda-help-page {
    width: 100% !important;
    max-width: none !important;
  }

  .mda-help-container {
    padding-left: 0;
    padding-right: 0;
  }

  .mda-help-page .mda-help-hero .mda-help-container {
    width: var(--mda-universal-card-width) !important;
    max-width: var(--mda-universal-card-width) !important;
    padding: var(--mda-universal-card-padding-mobile) !important;
    border-radius: 24px !important;
  }

  .mda-help-page .mda-help-hero {
    margin-top: var(--mda-universal-menu-gap, 32px);
    padding-top: 0;
  }

  .mda-help-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .mda-help-content,
  .mda-help-card {
    padding: var(--mda-universal-card-padding-mobile) !important;
  }

  .mda-help-page > .mda-help-hero + .mda-help-main {
    margin-top: 28px;
  }

  body.mda-help-active .mda-help-hero,
  body.mda-help-active .mda-help-main {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body.mda-help-active #main-content .container,
  body.mda-help-active #main-content {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.mda-help-active .mda-help-container,
  body.mda-help-active .mda-help-hero > .mda-help-container,
  body.mda-help-active .mda-help-main > .mda-help-container {
    width: var(--mda-universal-card-width) !important;
    max-width: var(--mda-universal-card-width) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
  }
}

@media (min-width: 981px) {
  body.mda-help-active .mda-help-hero,
  body.mda-help-active .mda-help-main {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body.mda-help-active .mda-help-container,
  body.mda-help-active .mda-help-hero > .mda-help-container,
  body.mda-help-active .mda-help-main > .mda-help-container {
    width: var(--mda-universal-card-width) !important;
    max-width: var(--mda-universal-card-width) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
  }

  body.mda-help-active .mda-help-hero > .mda-help-container {
    padding: var(--mda-universal-card-padding-desktop) !important;
  }
}

/*
 * Sidste skanse: block-tema — samme tokens som mda-layout-tt5 (universelt topkort)
 */
body.mda-help-active .entry-content .mda-help-page .mda-help-hero .mda-help-container {
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
  padding: var(--mda-universal-card-padding-desktop) !important;
}

body.mda-help-active .entry-content .mda-help-page .mda-help-content,
body.mda-help-active .entry-content .mda-help-page .mda-help-card {
  margin: 0 !important;
  padding: var(--mda-universal-card-padding-desktop) !important;
  box-sizing: border-box !important;
}

@media (max-width: 980px) {
  body.mda-help-active .entry-content .mda-help-page .mda-help-content,
  body.mda-help-active .entry-content .mda-help-page .mda-help-card {
    padding: var(--mda-universal-card-padding-mobile) !important;
  }

  body.mda-help-active .entry-content .mda-help-page .mda-help-hero .mda-help-container {
    padding: var(--mda-universal-card-padding-mobile) !important;
  }
}
