:root{
  --amh-content: 760px;
  --amh-wide: 1120px;
  --amh-xwide: 1180px;

  --amh-height: 340px;
  --amh-radius: 22px;
  --amh-border-width: 1px;
  --amh-border-color: #d8b26b;

  --amh-focal-x: 50%;
  --amh-focal-y: 50%;
}
/* ================================
   AMICARE HEADER MANAGER – FRONTEND
   ================================ */

/* Behåll din reset – men återställ frame border efteråt */
.amh-hero,
.amh-hero *{
  border: none !important;
}

.amh-hero{
  padding: 1rem 0 1.25rem;
}

/* Robust: funkar även när heron inte är direktbarn */
.site-main .amh-hero:first-child{
  margin-top: 0;
}

.amh-hero__frame{
  margin: 0 auto;
  position: relative;
  overflow: hidden;

  border-radius: var(--amh-radius, 22px);
  border: var(--amh-border-width, 1px) solid var(--amh-border-color, #d8b26b) !important;
  background: #fff;

  box-shadow:
    0 18px 44px rgba(15,23,42,.08),
    0 8px 22px rgba(216,178,107,.12);
}

/* WIDTH MODES */
.amh-hero.is-width-content .amh-hero__frame{
  width: 100%;
  max-width: var(--amh-content, 760px);
}

.amh-hero.is-width-wide .amh-hero__frame{
  width: 100%;
  max-width: var(--amh-wide, 1120px);
}

.amh-hero.is-width-xwide .amh-hero__frame{
  width: 100%;
  max-width: var(--amh-xwide, 1180px);
}

.amh-hero.is-width-full .amh-hero__frame{
  width: 100%;
  max-width: 100%;
  padding: 0 1.25rem;
  box-sizing: border-box;
}

/* Bilden (stöder både img utan klass och ev. framtida klass) */
.amh-hero__box > img,
.amh-hero__media img,
.amh-hero__img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--amh-focal-x, 50%) var(--amh-focal-y, 50%);
  display: block;
}

/* OVERLAY */
.amh-hero.has-overlay .amh-hero__overlay{
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(19,43,93,.25),
      rgba(19,43,93,.15)
    );
  pointer-events: none;
}

/* CONTENT */
.amh-hero__inner{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
}

.amh-hero.is-align-center .amh-hero__inner{
  justify-content: center;
  text-align: center;
}

.amh-hero.is-align-left .amh-hero__inner{
  justify-content: flex-start;
}

.amh-hero__content{
  padding: 1.75rem;
  color: #fff;
  max-width: 640px;
}

.amh-hero__title{
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.amh-hero__subtitle{
  margin-top: .5rem;
  font-size: 1.05rem;
  color: #fff;
  opacity: .95;
}

@media (max-width: 900px){
  :root{ --amh-height: 260px; }
  .amh-hero__inner{ padding: 1rem; }
  .amh-hero__subtitle{ font-size: 1rem; }
}

@media (max-width: 520px){
  :root{ --amh-height: 220px; }
  .amh-hero__frame{ padding: 0 .95rem; }
}
/* ================================
   READABILITY BOOST (text too dark)
   ================================ */

/* 1) Lite starkare overlay så texten kan vara vit och tydlig (men inte mörka ner allt) */
.amh-hero.has-overlay .amh-hero__overlay{
  background:
    linear-gradient(
      180deg,
      rgba(19,43,93,.18),
      rgba(19,43,93,.10)
    ) !important;
}

/* 2) Säkra att texten alltid är ljus */
.amh-hero__content{
  color: rgba(255,255,255,.98) !important;
}

/* 3) Lägg “glass panel” bakom texten = alltid läsbart */
.amh-hero__content{
  position: relative;
  padding: 1.35rem 1.4rem !important;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(15,23,42,.38), rgba(15,23,42,.18));
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 18px 44px rgba(15,23,42,.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* 4) Title: mer kontrast + tydligare */
.amh-hero__title{
  color: #fff !important;
  text-shadow: 0 6px 22px rgba(0,0,0,.45);
  letter-spacing: -0.2px;
}

/* 5) Subtitle: lite mjuk men fortfarande läsbar */
.amh-hero__subtitle{
  color: rgba(255,255,255,.92) !important;
  text-shadow: 0 6px 18px rgba(0,0,0,.35);
}

/* Mobil: lite tightare panel */
@media (max-width: 520px){
  .amh-hero__content{
    padding: 1.05rem 1.1rem !important;
    border-radius: 14px;
  }
}