/* ==========================================================
AZ HERO – SIMPLE STABLE VERSION (MATCHER NUVÆRENDE HTML)
========================================================== */

/* Ydre hero-wrapper */
.az-hero {
  position: relative;
  width: 100%;
  min-height: clamp(360px, 70vh, 520px);
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* Billedet fungerer som baggrund */
.az-hero-img-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.az-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%; /* midten lidt nedad – så man ser mere af loft/bund */
  display: block;
}

/* Overlay oven på billedet */
.az-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.25) 0%,
    rgba(0,0,0,0.40) 45%,
    rgba(0,0,0,0.55) 100%
  );
}

/* Tekstlaget ovenpå overlay */
.az-hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: clamp(80px, 10vw, 140px);
  padding-left: clamp(24px, 6vw, 80px);
  padding-right: clamp(24px, 6vw, 80px);
  color: #fff;
}

/* Overskrift */
.az-hero-content h1 {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 16px;
  max-width: 680px;
  color: #fff;
  text-shadow: 0 3px 10px rgba(0,0,0,0.6);
}

/* Brødtekst */
.az-hero-content p {
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.6;
  max-width: 620px;
  margin: 0 0 26px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.45);
}

/* CTA-knap */
.az-hero-cta {
  display: inline-block;
  background: var(--az-secondary);
  color: #fff;
  padding: 12px 28px;
  font-size: 18px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
}

/* Mobil */
@media (max-width: 600px) {
  .az-hero {
    min-height: clamp(340px, 65vh, 460px);
  }
  .az-hero-content {
    padding-top: 100px;
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* ==========================================================
AZ HERO – FIX PATCH (v4.1)
========================================================== */

/* 1) Billedet skal vise mere top/bund (ikke midten) */
.az-hero-img {
  object-position: center 40% !important;
}

/* 2) H1 skal IKKE knække unødvendigt */
.az-hero-content h1 {
  max-width: 900px !important;
  white-space: normal !important;
  word-break: normal !important;
}

/* 3) CTA må ALDRIG blive fuldbredde */
.az-hero-cta {
  display: inline-block !important;
  width: auto !important;
  max-width: fit-content !important;
  white-space: nowrap !important;
}

/* 4) Sikrer at Divi / RUCSS ikke overstyrer content layout */
.az-hero-content {
  align-items: flex-start !important;
  width: auto !important;
  max-width: none !important;
}

/* ==========================================================
AZ HERO – CENTER TEXT + FIX H1 LINE-BREAK (v4.2)
========================================================== */

/* 1) Centrér hele tekstblokken */
.az-hero-content {
  align-items: center !important;
  text-align: center !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* 2) H1 må ikke knække uden grund */
.az-hero-content h1 {
  max-width: 1000px !important;   /* masser af plads */
  font-size: clamp(32px, 4vw, 50px) !important;
  white-space: normal !important;
  text-align: center !important;
}

/* 3) Brødtekst centreret */
.az-hero-content p {
  text-align: center !important;
  max-width: 700px !important;
}

/* 4) CTA centreret (men beholder sin fine størrelse) */
.az-hero-cta {
  margin-left: auto !important;
  margin-right: auto !important;
}

/* ==========================================================
AZ HERO – FIX WHITE GAP + TEXT WIDTH (v4.3)
========================================================== */

/* 1) Billede: Stræk korrekt uden hvid kant */
.az-hero-img-wrap {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
}

.az-hero-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center 45% !important; /* viser loft + bund */
}

/* 2) Giv brødteksten lidt mere bredde */
.az-hero-content p {
  max-width: 820px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* 3) Sikrer at content fylder hele bredden i hero */
.az-hero-content {
  width: 100% !important;
  max-width: 100% !important;
}

/* ==========================================================
AZ HERO v4.4 – MOVE TEXT DOWN A BIT
========================================================== */

.az-hero-content {
  padding-top: clamp(120px, 14vw, 180px) !important;
}


/* ==========================================================
AZ HERO v4.12 – FORSIDE HEIGHT FIX (CRITICAL)
========================================================== */

/* 1) Overrule global hero-height (maks 520px) */
.az-hero.az-hero-frontpage {
  min-height: 900px !important;
  height: 900px !important;
  max-height: none !important;
}

/* 2) Billedet udfylder nu korrekt uden beskæring */
.az-hero.az-hero-frontpage .az-hero-img {
  object-fit: cover !important;
  object-position: center 50% !important;
  width: 100% !important;
  height: 100% !important;
}

/* 2) Overlay – lidt lysere */
.az-hero.az-hero-frontpage::before {
  background: rgba(0,0,0,0.66) !important;
}

/* 3) CTA-gruppe afstand */
.az-hero.az-hero-frontpage .az-hero-cta-group {
  display: flex;
  gap: 34px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 36px;
}

/* 4) Primær CTA */
.az-hero.az-hero-frontpage .az-hero-cta {
  background: var(--az-primary);
  color: #fff;
  padding: 14px 36px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

/* 5) Sekundær CTA – rød */
.az-hero.az-hero-frontpage .az-hero-cta-red {
  background: #C62828;
  color: #fff;
  padding: 14px 36px;
  border-radius: 8px;
  font-weight: 700;
  white-space: nowrap;
  border: 2px solid #ffffff33;
}

/* Mobil spacing */
@media (max-width: 600px) {
  .az-hero.az-hero-frontpage .az-hero-cta-group {
    flex-direction: column;
    gap: 24px;
  }
}

/* ==========================================================
AZ HERO v4.12 – FORSIDE HEIGHT FIX + C (55% position)
========================================================== */

/* 1) Overrule global hero height */
.az-hero.az-hero-frontpage {
  min-height: 900px !important;
  height: 900px !important;
  max-height: none !important;
}

/* 2) Billedet – vis lidt mere bund (C = 55%) */
.az-hero.az-hero-frontpage .az-hero-img {
  object-fit: cover !important;
  object-position: center 55% !important; /* 🔥 C-justering: mere bund */
  width: 100% !important;
  height: 100% !important;
}

/* ==========================================================
   AZ HERO – MÅR HOVEDSIDE (maarbekaempelse)
   ========================================================== */

/* Justér billedets fokus kun på mår-heroen */
.az-hero.az-hero-maar .az-hero-img {
  object-position: center 50% !important; /* evt. 45–55% hvis du vil teste */
}

/* Evt. lidt mindre top-padding end forsiden, hvis teksten sidder for højt/lavt */
.az-hero.az-hero-maar .az-hero-content {
  padding-top: clamp(110px, 12vw, 160px) !important;
}

/* ==========================================================
AZ HERO – STD v1.4 (BULLETPROOF + SAFE) – COPY READY
Påvirker KUN: .az-hero.az-hero--std
- Bruges i Divi fuldbredde sektion
- Overlay styres via HTML klasse
- Crop styres via HTML klasse
- Ægte vertikal centrering (som borebille)
- SAFE: Ingen globale Divi overrides (rammer ikke 100+ sider)
========================================================== */

/* ----------------------------------------------------------
0) Divi fullwidth "reset" – KUN når hero--std findes i sektionen
NOTE: :has() er progressive enhancement (rammer ikke andet hvis browser ikke understøtter)
---------------------------------------------------------- */
.et_pb_fullwidth_section:has(.az-hero.az-hero--std){
  padding: 0 !important;
}
.et_pb_fullwidth_section:has(.az-hero.az-hero--std) .et_pb_module{
  margin: 0 !important;
}
.et_pb_fullwidth_section:has(.az-hero.az-hero--std) .et_pb_code,
.et_pb_fullwidth_section:has(.az-hero.az-hero--std) .et_pb_text{
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
}

/* ----------------------------------------------------------
Fallback (rammer stadig kun heroen)
---------------------------------------------------------- */
.az-hero.az-hero--std{
  position: relative;
  overflow: hidden;
  min-height: 700px;
  margin: 0 !important;
  padding: 0 !important;
}
@media (max-width: 600px){
  .az-hero.az-hero--std{ min-height: 620px; }
}

/* Sluk legacy overlay KUN for std */
.az-hero.az-hero--std::before{ content: none !important; }

/* ----------------------------------------------------------
1) Billedlag
---------------------------------------------------------- */
.az-hero.az-hero--std .az-hero-img-wrap{
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.az-hero.az-hero--std .az-hero-img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  max-width: 100%;
  object-fit: cover;
  object-position: center 55% !important; /* vinder over legacy */
}

/* ----------------------------------------------------------
2) Overlay – default + varianter (styres via HTML klasse)
(Ny “stabil” skala så strong/heavy altid føles mørkere)
---------------------------------------------------------- */
.az-hero.az-hero--std .az-hero-img-wrap::after{
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(0,0,0,0.48); /* default */
}

.az-hero.az-hero--std.az-hero--overlay-soft .az-hero-img-wrap::after{
  background: rgba(0,0,0,0.32);
}
.az-hero.az-hero--std.az-hero--overlay-strong .az-hero-img-wrap::after{
  background: rgba(0,0,0,0.58);
}
.az-hero.az-hero--std.az-hero--overlay-heavy .az-hero-img-wrap::after{
  background: rgba(0,0,0,0.70);
}

/* ----------------------------------------------------------
3) Crop (styres via HTML klasse)
---------------------------------------------------------- */
.az-hero.az-hero--std.az-hero--crop-top    .az-hero-img{ object-position: center 40% !important; }
.az-hero.az-hero--std.az-hero--crop-mid    .az-hero-img{ object-position: center 55% !important; }
.az-hero.az-hero--std.az-hero--crop-bottom .az-hero-img{ object-position: center 70% !important; }

/* ----------------------------------------------------------
4) Content – TRUE vertical centering
---------------------------------------------------------- */
.az-hero.az-hero--std .az-hero-content{
  position: relative;
  z-index: 2;

  max-width: 1200px;
  margin: 0 auto;

  height: 100%;
  min-height: inherit;

  display: flex !important;
  flex-direction: column;
  justify-content: center !important;
  align-items: center !important;

  text-align: center;
  color: #fff;
  text-shadow: 0 6px 18px rgba(0,0,0,0.35);

  /* neutraliser gamle “move text down” */
  padding-top: 0 !important;

  /* standard padding (du ønskede 40 i stedet for 28) */
  padding: clamp(40px, 4vw, 56px) clamp(18px, 4vw, 28px) !important;
}

/* ----------------------------------------------------------
5) Typografi
---------------------------------------------------------- */
.az-hero.az-hero--std .az-h1-split{
  margin: 0;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.15;
}

.az-hero.az-hero--std .az-h1-split__sub{
  display: block;
  margin-top: 10px;
  font-size: clamp(16px, 1.8vw, 22px) !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  opacity: 0.95;
}

/* ----------------------------------------------------------
6) CTA
---------------------------------------------------------- */
.az-hero.az-hero--std .az-hero-cta-group{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 14px;
}

/* tilbud = rød */
.az-hero.az-hero--std .az-hero-cta-group .az-hero-cta.az-hero-cta-red{
  background: #C62828 !important;
  border-color: #C62828 !important;
  color: #fff !important;
}

/* telefon = blå (alt andet) */
.az-hero.az-hero--std .az-hero-cta-group .az-hero-cta:not(.az-hero-cta-red){
  background: #1D3F72 !important;
  border-color: #1D3F72 !important;
  color: #fff !important;
}

.az-hero.az-hero--std .az-hero-cta-group .az-hero-cta:hover{
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce){
  .az-hero.az-hero--std .az-hero-cta-group .az-hero-cta:hover{
    transform: none;
  }
}

/* microcopy under CTA (valgfri – kræver element i HTML) */
.az-hero.az-hero--std .az-hero-cta-note{
  margin: 10px 0 0;
  font-size: 14px;
  opacity: 0.92;
}

/* Luft under CTA før link */
.az-hero.az-hero--std .az-hero-link{
  margin-top: clamp(12px, 2vw, 18px);
}

/* Link */
.az-hero.az-hero--std .az-hero-link a{
  color: #fff !important;
  text-decoration: underline;
}
.az-hero.az-hero--std .az-hero-link a:hover{
  opacity: 0.85;
}

/* Mobil: CTA fuldbredde */
@media (max-width: 600px){
  .az-hero.az-hero--std .az-hero-cta{
    width: 100%;
    text-align: center;
  }
}

/* ==========================================================
AZ HERO – STD: TEXT SCRIM (lokal mørkning bag tekst)
Påvirker KUN: .az-hero.az-hero--std.az-hero--scrim
========================================================== */
.az-hero.az-hero--std.az-hero--scrim .az-hero-content{
  position: relative;
  z-index: 3; /* over overlay */
}

.az-hero.az-hero--std.az-hero--scrim .az-hero-content::before{
  content: "";
  position: absolute;
  inset: -22px -26px;
  z-index: -1;
  pointer-events: none;

  background: radial-gradient(
    120% 120% at 25% 25%,
    rgba(0,0,0,0.68) 0%,
    rgba(0,0,0,0.46) 45%,
    rgba(0,0,0,0.18) 75%,
    rgba(0,0,0,0.00) 100%
  );

  border-radius: 18px;
}

@media (max-width: 600px){
  .az-hero.az-hero--std.az-hero--scrim .az-hero-content::before{
    inset: -16px -16px;
    border-radius: 16px;
  }
}

/* ==========================================================
AZ HERO – STD: OFFER INTENT (Deskma-fokus)
Påvirker KUN: .az-hero.az-hero--std.az-hero--intent-offer
========================================================== */

/* 1) Rød CTA mere "primary" */
.az-hero.az-hero--std.az-hero--intent-offer .az-hero-cta-group .az-hero-cta.az-hero-cta-red{
  padding: 14px 26px !important;
  font-size: 17px !important;
  font-weight: 900 !important;

  border: 2px solid transparent !important; /* holder samme højde som blå */
  box-shadow: 0 14px 30px rgba(0,0,0,0.30) !important;
  transform: translateZ(0);
}

/* 2) Telefon knap = sekundær, men stadig blå og balanceret */
.az-hero.az-hero--std.az-hero--intent-offer .az-hero-cta-group .az-hero-cta.az-hero-cta-blue{
  background: rgba(29,63,114,0.75) !important;
  border: 2px solid rgba(255,255,255,0.35) !important;
  color: #fff !important;

  box-shadow: 0 10px 22px rgba(0,0,0,0.18) !important;
}

.az-hero.az-hero--std.az-hero--intent-offer .az-hero-cta-group .az-hero-cta.az-hero-cta-blue:hover{
  background: #1D3F72 !important;
  border-color: #1D3F72 !important;
}

/* Mobil */
@media (max-width: 600px){
  .az-hero.az-hero--std.az-hero--intent-offer .az-hero-cta-group .az-hero-cta.az-hero-cta-red{
    font-size: 16px !important;
  }
}

/* HERO GEO */
.az-hero.az-hero--std .az-hero-geo{
  margin-top:10px;
  font-size:17px;
  line-height:1.6;
  opacity:0.95;
  color:#fff;
}

.az-hero.az-hero--std .az-hero-geo strong{
  font-weight:600;
}

/* Hvepse hero overlay justering */
.az-hero-hvepsebo::before{
  opacity:0.35;
}

