/* Layout helpers */
.wrap { max-width: 1080px; margin: 0 auto; }

@media (max-width: 640px){
  .wrap{ padding: 0 16px; }
}

/* HERO */
.m-hero { position: relative; overflow: hidden; }
.m-hero__cover{
  height: clamp(280px, 36vw, 460px);
  width: 100%;
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.m-hero, .m-hero *{
  color: var(--brown);
}
.m-hero .meta{
  color: color-mix(in srgb, var(--brown) 75%, #ffffff);
}

.m-hero__cover{ filter: saturate(1.02) contrast(1.03); }


.m-hero__cover{ position: relative; }
/* postojeći gradient overlay (tvoj ::after) ostavi, ali neka je ispravan alpha */
.m-hero__cover::after{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(90deg,
    rgba(248,244,239,.80) 0%,
    rgba(248,244,239,.82) 18%,
    rgba(248,244,239,.78) 34%,
    rgba(248,244,239,.18) 48%,
    rgba(248,244,239,0) 70%);
  pointer-events:none;
}


/* NEW: subtle noise layer to kill banding stripes */
.m-hero__cover::before{
  content:"";
  position:absolute; inset:0;
  pointer-events:none;
  opacity: .14;               /* ↑ jače: ubija pruge */
  mix-blend-mode: overlay;    /* overlay radi bolje za banding */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  background-size: 180px 180px; /* sitnije = prirodnije */
  z-index: 1;
}

/* Da tekst i gumbi nikad ne “ispadnu” */
.m-hero__inner{
  position: absolute;
  min-height: 220px;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 0 22px 18px; /* ← horizontal padding + bottom */
  z-index: 2;
}

/* Na mobu je bolje stackat */
@media (max-width: 820px){
  .m-hero__cover{ height: clamp(300px, 70vw, 420px); } /* viši hero na mobu */
  .m-hero__inner{
    min-height: 0;
    padding: 0 16px 14px; /* malo uži padding na mobu */
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px){
  .m-hero__cover{ height: clamp(320px, 90vw, 460px); } /* još mrvu viši na baš malim ekranima */
  .m-hero__text{ max-width: 100%; }
  .m-hero__actions{ width: 100%; justify-content: flex-end; flex-wrap: wrap; }
}


.m-hero__text{
  padding: 10px 0 14px;
  max-width: 560px;
}

.m-counts{
  opacity: 1;
}


.m-title{
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: clamp(42px, 12vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.03em;
 
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
  max-width: 100%;
  overflow-wrap: anywhere; /* duga imena (npr. “Princess-Duchess...”) */
  word-break: break-word;
  hyphens: auto;
}
.m-years{
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(18px, 6vw, 34px);
  margin-top: 10px;
  opacity: 1;
  
}

.m-years__dash{ opacity: .6; }
.m-tagline{
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(16px, 5.2vw, 30px);
  margin-top: 18px;
  letter-spacing: .01em;
  opacity: 1;
  max-width: 100%;
}

.m-years--text{
  /*font-style: italic;*/
  opacity: .85;
}


.m-hero__actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.m-pill{
  border-radius: 999px;
  padding: 10px 14px;
  white-space: nowrap;
}
.m-pill--icon{ width: 44px; padding: 10px 0; text-align: center; }

/* Hero pills — force identical look (override global .btn) */
/* ===== HERO PILLS (cream glass like Bella reference) ===== */
.m-hero__actions{
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
}

.m-hero__actions .btn.m-pill--hero{
  height: 46px;
  padding: 0 20px !important;
  border-radius: 999px !important;

  background: var(--hero-cream) !important;
  border: 1px solid var(--hero-cream-border) !important;

  
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .01em;

  box-shadow:
    0 12px 28px rgba(0,0,0,.10),
    inset 0 1px 0 rgba(255,255,255,.70) !important;

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  text-decoration: none;
}

.m-hero__actions .btn.m-pill--hero:hover{
  filter: brightness(1.01);
  box-shadow:
    0 14px 34px rgba(0,0,0,.12),
    inset 0 1px 0 rgba(255,255,255,.78) !important;
  text-decoration: none;
}

.m-hero__actions .btn.m-pill--hero:active{
  transform: translateY(1px);
}

/* share icon pill (same “hero pill” look, but square icon size) */
.m-hero__actions .btn.m-pill--hero.m-pill--icon{
  width: 46px !important;
  padding: 0 !important;
  justify-content: center;
}

.m-hero__actions .btn.m-pill--hero.m-pill--icon svg{
  width: 20px;
  height: 20px;
  display: block;
}

/* kebab pill */
.m-hero__actions .btn.m-pill--kebab{
  width: 54px !important;
  padding: 0 !important;
  justify-content: center;
  font-size: 20px;
  letter-spacing: 2px;
}

@media (max-width: 860px){
  .m-hero__actions{ flex-wrap: wrap; justify-content: flex-end; width: 100%;
   }
}

@media (max-width: 520px){
  .m-hero__actions{
    width: 100%;
    display: flex;
    flex-wrap: wrap;           /* da "Uredi" (ako postoji) može u svoj red */
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
  }

  /* ako postoji "Uredi" link, neka bude puni red iznad */
  .m-hero__actions > a{
    flex: 1 1 100%;
    min-width: 0;
  }

  /* Light a candle rasteže se i uzima sav prostor */
  #heroSilentBtn{
    flex: 1 1 0;
    min-width: 0;
  }

  /* Share je fiksni square */
  #heroShareBtn{
    flex: 0 0 46px;
    width: 46px !important;
    padding: 0 !important;
    justify-content: center;
  }

  /* Kebab wrapper je fiksni */
  .m-heroMenu{
    flex: 0 0 54px;
  }

  /* Makni width:100% za sve hero pillove (to ti je uzrok 2+1 reda) */
  .m-hero__actions .btn.m-pill--hero{
    width: auto;
  }

  /* glavni gumb ispuni fleks prostor, ali ne smije biti width:100% (jer ruši u novi red) */
  #heroSilentBtn.btn.m-pill--hero{
    width: auto !important;     /* <-- KLJUČNO: bilo je 100% */
    flex: 1 1 0;                /* <-- uzme sav preostali prostor uz Share + kebab */
    min-width: 0;
    padding: 0 14px !important;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

}


/* ultra-mali ekrani: sve u 1 stupac, kebab desno */
@media (max-width: 360px){
  .m-hero__actions > a,
  .m-hero__actions > form,
  .m-hero__actions > button{
    flex-basis: 100%;
  }
  .m-hero__actions > .m-heroMenu{
    flex-basis: 100%;
    display: flex;
    justify-content: flex-end;
  }
}




.m-hero__actions .m-pill--hero:hover{
  text-decoration: none;
  filter: brightness(.985);
  box-shadow:
    0 10px 24px rgba(0,0,0,.10),
    inset 0 1px 0 rgba(255,255,255,.55);
}

.m-hero__actions .m-pill--hero:active{
  transform: translateY(1px);
}


/* INFO STRIP */
.m-strip{ margin-top: 12px; }
.m-strip__card{
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 18px;
  padding: 12px 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 820px){
  .m-strip__card{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 380px){
  .m-strip__card{ grid-template-columns: 1fr; }
}

.m-stat{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.65);
}
.m-stat__icon{ font-size: 18px; width: 24px; text-align:center; color: var(--brown) }
.m-stat__value{
  font-weight: 600;
  color: rgba(20,20,20,85);
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.m-stat__meta{ min-width: 0; }
.m-stat__label{ font-size: 12px; opacity: .7; margin-top: 2px; color: var(--muted) }

/* CARDS */
.m-card{
  margin-top: 18px;
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 22px;
  padding: 18px;
}
.m-card__head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.m-card__headRight{ display:flex; gap: 10px; flex-wrap: wrap; justify-content:flex-end; }
.m-h2{ margin: 0; font-size: 26px; color: var(--brown); }
.m-h2::after{
  content:"";
  display:block;
  height:1px;
  background: var(--line-brown);
  margin-top:10px;
}

/* STORY */
.m-story{
  display:grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 14px;
  align-items: stretch;
}
.m-story__cover{
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  display:block;
  min-height: 220px;
}
.m-story__cover img{ width:100%; height:100%; object-fit: cover; display:block; }
.m-badge{
  position:absolute; top: 12px; left: 12px;
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(0,0,0,.08);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}
.m-story__thumbs{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;

  /* fix: spriječi da grid rasteže trackove/iteme po visini */
  align-content: start;
  align-items: start;
}

.m-thumb{
  position: relative;
  border-radius: 16px;
  overflow:hidden;
  display:block;
  min-height: 90px;

  /* fix: drži tile normalnog oblika, bez “štapa” na mobu */
  aspect-ratio: 1 / 1;
  align-self: start;
}

.m-thumb img{ width:100%; height:100%; object-fit: cover; display:block; }
.m-heart{
  position:absolute;
  right: 10px;
  bottom: 10px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,.32);
  color:#fff;
  font-size: 14px;
}

@media (max-width: 640px){
  .m-story{
    grid-template-columns: 1fr; /* cover gore, thumbs dolje */
  }

  /* thumbs kao horizontalni scroller (stabilno bez obzira na broj slika) */
  .m-story__thumbs{
    display:flex;
    overflow-x:auto;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
  }
  .m-story__thumbs::-webkit-scrollbar{ display:none; }
  .m-story__thumbs{ scrollbar-width:none; }

  .m-thumb{
    flex: 0 0 96px;   /* fiksna širina thumbs na mobu */
    min-height: 0;    /* neka aspect-ratio kontrolira visinu */
    scroll-snap-align: start;
  }

  .m-heart{
    right: 8px;
    bottom: 8px;
    width: 24px;
    height: 24px;
    font-size: 13px;
  }
}


/* GALLERY + BIO */
.m-galleryBio{
  display:grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  align-items: start;
}
.m-photoCard{
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 18px;
  overflow:hidden;
}
.m-photoCard__img img{ width:100%; display:block; object-fit: cover; aspect-ratio: 4 / 3; }
.m-photoCard__actions{
  display:flex;
  gap: 10px;
  padding: 12px;
  flex-wrap: wrap;
}
.m-mini{
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 13px;
}
.m-bio__name{ margin: 0 0 8px; font-size: 34px; letter-spacing: -0.02em; }
.m-bio__text{ margin:0; line-height: 1.6; opacity: .92; }

/* STORY (Bella-like layout) */
.m-bio__name--warm{
  font-family: var(--font-serif);
  font-weight: 800;
  letter-spacing: -0.02em;
  
}

/* Story text malo “mekše” kao u Bella mocku */
.m-storyBio .m-bio__text{
  opacity: .92;
  line-height: 1.7;
}

/* Responsive: stack na mobu */
@media (max-width: 820px){
  .m-storyBio{
    grid-template-columns: 1fr;
  }

  .m-storyBio .m-photoCard{
    width: 100%;
    max-width: none;
    margin: 0;
  }

  /* SMANJI VISINU: override 4:3 samo na mobitelu */
  .m-storyBio .m-photoCard__img img{
    aspect-ratio: 21 / 9;   /* probaj 16/9 prvo */
    width: 100%;
    height: auto;
    object-fit: cover;
  }
}



/* CANDLES */
.m-candles{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap:14px;
  margin-top:10px;
}

.m-candleHero{
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.06);            /* cream border */

  background: url("img/candles.jpg") center / cover no-repeat;
  min-height: 150px;
  background-position: 35% 55%;
}


.m-candle{
  position: relative;
  display:flex;
  gap:12px;
  padding:14px 14px;
  border-radius:16px;
  min-height: 150px;
  border: 1px solid rgba(0,0,0,.06);         /* cream border */
  

  --candle-bg: url("img/card-a.jpg"); /* default fallback */

  background-image: var(--candle-bg);

  

 background-position: right top;     /* da se vidi gore-desno */
background-size: 120% 120%;         /* "zoom out": bliže 100% = više zoom out */
background-repeat: no-repeat;

}

@media (max-width: 520px){
  .m-candle{
    background-size: 100% 100%;    /* na malom ekranu još malo više zoom out */
    background-position: 112% -8%; /* lagano izvan ruba da corner bude vidljiv */
  }
}


.m-candle--a{ --candle-bg: url("img/card-a.jpg"); }
.m-candle--b{ --candle-bg: url("img/card-b.jpg"); }
.m-candle--c{ --candle-bg: url("img/card-c.jpg"); }
.m-candle--d{ --candle-bg: url("img/card-d.jpg"); }



.m-candle::after{
  content:"";
  position:absolute;
  inset:0;
  /*background: linear-gradient(
    120deg,
    rgba(255,255,255,.25),
    rgba(255,255,255,0) 45%
  );*/
  pointer-events:none;
}


.m-candle__img{
  width:44px;
  height:44px;
  flex:0 0 44px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  background: radial-gradient(circle at 30% 30%, rgba(255,210,140,.55), rgba(255,210,140,.15));
  border:1px solid rgba(255,180,80,.22);
}

.candleIcon{ color:#b8892e; }  /* ako koristiš SVG */

/* Date always at the bottom of candle card */
.m-candle__meta{
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.m-candle__date{
  margin-top: auto;
}

.m-candle__who{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.m-candle__avatar{
  width:28px;
  height:28px;
  flex:0 0 28px;
  border-radius:999px;
  overflow:hidden;
  border:1px solid rgba(99,64,58,.18);
  background: rgba(255,255,255,.65);
}

.m-candle__avatarImg{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}

.m-candle__avatar--fallback{
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  font-size:12px;
  line-height:1;
  background:rgba(99,64,58,.14);
  color: var(--brown);
}


.m-candle__name{
  font-weight:600;
  font-size:20px;
  line-height:1.15;
  margin-bottom:6px;
  color: var(--brown);
}

.m-candle__msg{
  font-size:16px;
  line-height:1.35;
  color: var(--brown);
  margin-bottom:0px;

  display:-webkit-box;
  -webkit-line-clamp:2;
  line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  cursor: pointer;
}



/* Wrap so button sits nicely */
.m-candle__msgWrap{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Read more button (only shown when overflow) */
.m-candle__readMore{
  align-self: flex-end;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  color: rgba(20,20,20,.68);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 12px;
}
.m-candle__readMore:hover{ color: rgba(20,20,20,.85); }

/* ===== Modal ===== */
.m-cmsgOverlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 9999;
}

/* IMPORTANT: make hidden attribute actually hide the modal overlay */
.m-cmsgOverlay[hidden]{ display: none !important; }

.m-cmsgModal{
  width: min(620px, 100%);
  background: rgba(255,255,255,.96);
  border-radius: 18px;
  border: 1px solid rgba(214,197,176,.85); /* cream */
  box-shadow: 0 28px 90px rgba(0,0,0,.22);
  overflow: hidden;
}

.m-cmsgHeader{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.70));
  border-bottom: 1px solid rgba(214,197,176,.55);
}

.m-cmsgTitle{
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 18px;
  color: rgba(20,20,20,.88);
}

.m-cmsgClose{
  appearance:none;
  border: 0;
  background: rgba(238,225,214,.55);
  color: rgba(20,20,20,.75);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  cursor:pointer;
  font-size: 20px;
  line-height: 1;
}
.m-cmsgClose:hover{ filter: brightness(1.03); }

.m-cmsgBody{
  padding: 14px 16px 16px;
  color: rgba(20,20,20,.82);
  line-height: 1.5;
  white-space: pre-wrap;
  max-height: min(60vh, 520px);
  overflow: auto;
}

/* expanded state */
.m-candle.is-open .m-candle__msg{
  display:block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
  white-space: normal;

  max-height: 140px;
  overflow: auto;
  padding-right: 6px;
}

/*.m-candle__msg--muted{ color: rgba(0,0,0,.55); }*/

.m-candle__date{
  font-size:12px;
  color: rgba(0,0,0,.55);
}


.m-footerNote{
  text-align:center;
  opacity: .7;
  font-size: 13px;
  margin-top: 14px;
}

.m-counts{ margin-top:10px; opacity:.9; }

.m-h3{ margin: 0 0 10px; font-size: 18px; }

.m-form{ display:grid; gap: 12px; }
.m-field{ display:grid; gap: 6px; }
.m-label{ font-size: 13px; opacity:.75; }

.m-msgList{ list-style:none; padding:0; margin:0; display:grid; gap: 12px; }
.m-msg{
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(0,0,0,.06);
}
.m-msg__top{ display:flex; justify-content: space-between; gap: 12px; }
.m-msg__date{ font-size: 12px; opacity:.65; }
.m-msg__body{ margin-top: 8px; line-height: 1.6; }
.m-msg__actions{ margin-top: 10px; display:flex; gap: 8px; flex-wrap: wrap; }

.m-more{ margin-top: 14px; }
.m-empty{ padding: 14px; opacity:.75; }
.m-storyText{ margin-top: 14px; line-height: 1.7; opacity:.92; }

/* HERO menu wrapper */
.m-heroMenu{ position:relative; display:inline-block; }

/* Kebab pill tweaks */
.m-pill--kebab{ width:54px; padding-left:0; padding-right:0; text-align:center; }

/* Dropdown panel */
.m-heroMenu__panel{
  position:absolute;
  right:0;
  top:calc(100% + 10px);
  min-width:240px;
  background: rgba(255,255,255,.90);
  border: 1px solid rgba(220,220,220,.95);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 18px 45px rgba(0,0,0,.14);
  backdrop-filter: blur(10px);
  display:none;
  z-index:9999;
}

.m-hero { overflow: visible !important; }

.m-heroMenu__panel.is-open{ display:block; }

.m-heroMenu__item{
  width:100%;
  border:0;
  background:transparent;
  padding:12px 12px;
  border-radius:12px;
  text-align:left;
  font-weight:600;
  cursor:pointer;
  color: var(--brown);
}
.m-heroMenu__item:hover{ background:rgba(0,0,0,.05); }

.m-heroMenu__sep{
  height: 1px;
  background: rgba(0,0,0,.08);
  margin: 6px 8px;
  border-radius: 1px;
}


/* ===== INFO STRIP ICONS (SVG, warm orange) ===== */
.m-stat__icon{
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brown);
  flex: 0 0 auto;
}

.m-stat__icon svg{
  width: 22px;
  height: 22px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ===== HERO DEFAULT COVER (when no photos exist) ===== */

.m-hero__cover--empty{
  background: radial-gradient(1200px 600px at 65% 30%,
    rgba(255,255,255,.95) 0%,
    rgba(248,244,239,.92) 35%,
    rgba(238,226,212,.92) 70%,
    rgba(227,207,188,.94) 100%);
}

/* subtle pattern overlay */
.m-hero__cover--empty::before{
  content:"";
  position:absolute; inset:0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(199,121,82,.14) 0 2px, transparent 3px),
    radial-gradient(circle at 42% 60%, rgba(199,121,82,.10) 0 2px, transparent 3px),
    radial-gradient(circle at 75% 40%, rgba(199,121,82,.12) 0 2px, transparent 3px),
    radial-gradient(circle at 60% 75%, rgba(199,121,82,.10) 0 2px, transparent 3px);
  background-size: 220px 220px;
  opacity: .9;
  pointer-events:none;
}

/* show fallback card only when no photos at all */
.m-hero__cover--no-photos{
  position: relative;
}

.m-heroFallback{
  position:absolute;
  right: 26px;
  bottom: 22px;
  width: min(420px, calc(100% - 52px));
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(247,235,220,.82);
  border: 1px solid rgba(214,197,176,.92);
  box-shadow: 0 18px 40px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.70);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.m-heroFallback__badge{
  display:inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .02em;
  color: rgba(25,25,25,.75);
  background: rgba(255,255,255,.45);
  border: 1px solid rgba(214,197,176,.55);
  margin-bottom: 10px;
}

.m-heroFallback__row{
  display:flex;
  align-items:center;
  gap: 12px;
}

.m-heroFallback__icon{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(214,197,176,.55);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 22px;
}

.m-heroFallback__title{
  font-weight: 800;
  font-size: 16px;
  color: rgba(25,25,25,.85);
}

.m-heroFallback__sub{
  margin-top: 2px;
  font-weight: 500;
  font-size: 13px;
  color: rgba(25,25,25,.62);
}

/* mobile */
@media (max-width: 720px){
  .m-heroFallback{
    right: 14px;
    left: 14px;
    width: auto;
  }
}

/* FIX: prevent old negative margin from pushing absolute hero content off-screen */
@media (max-width: 980px){
  .m-hero__inner{ margin-top: 0 !important; }
}
@media (max-width: 640px){
  .m-hero__inner{ margin-top: 0 !important; }
}


.m-hero__cover{
  min-height: 280px;
}
@media (max-width: 820px){
  .m-hero__cover{
    min-height: 240px;
  }
}

/* Mobile: spusti tekst bliže gumbovima + bolja čitljivost */
@media (max-width: 820px){
  /* sve u donju zonu hero-a */
  .m-hero__inner{
    justify-content: flex-end;
  }

  /* tekst dobije auto prostor gore -> padne dolje */
  .m-hero__text{
    margin-top: auto;
    padding-bottom: 6px;
  }

  /* gumbi da ne zalijepe uz rub */
  .m-hero__actions{
    padding-bottom: 2px;
  }

  /* jači fade pri dnu da tekst + gumbi uvijek čitljivi */
 
}

/* =========================
   MESSAGES (mockup style)
========================= */

.m-messages{
  margin-top: 18px;
}

/* Decorative hero background strip behind title (image optional) */
.m-messages__hero{
  height: 86px;
  border-radius: 22px;
  margin-bottom: 10px;
  background:
    radial-gradient(1200px 120px at 50% 50%, rgba(255,255,255,0) 0%, rgba(248,244,239,.85) 55%, rgba(248,244,239,0) 100%),
    url("img/messages-hero.png") center / cover no-repeat;
  opacity: .95;
}

/* Title line */
.m-messages__title{
  margin: 0 0 14px;
  text-align: center;
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: clamp(28px, 5vw, 44px);
  letter-spacing: -0.02em;
  color: var(--brown);
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
}

/* Form card */
.m-msgFormCard{
  border-radius: 22px;
  background: rgba(255,255,255,72);
  border: 1px solid rgba(0,0,0,06);
  box-shadow: 0 18px 45px rgba(0,0,0,10);
  overflow: hidden;
  position: relative;
}

.m-msgFormCard__inner{
  padding: 16px;
  border-radius: 22px;
  background:
    radial-gradient(900px 220px at 50% 0%, rgba(255,255,255,.75) 0%, rgba(255,255,255,0) 60%),
    url("img/messages-form-bg.jpg") center / cover no-repeat;
}

.m-msgFormCard__h{
  margin: 0 0 10px;
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 800;
  color: var(--brown);
}

/* Form layout */
.m-msgForm{ display:grid; gap: 12px; }
.m-msgForm__row{ display:block; }

.m-msgForm__input,
.m-msgForm__textarea{
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,08);
  background: rgba(255,255,255,85);
  color: var(--brown);
}

.m-msgForm__textarea{ min-height: 120px; }

/* Big orange button (full width) */
.m-msgForm__btn{
  width: 100%;
  height: 52px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: .01em;
  color: #fff;
  background: linear-gradient(90deg, #d77a3a, #cf6f33);
  box-shadow: 0 14px 30px rgba(0,0,0,14);
}
.m-msgForm__btn:hover{ filter: brightness(1.02); }
.m-msgForm__btn:active{ transform: translateY(1px); }

/* Count strip background image */
.m-msgCountStrip{
  height: 74px;
  margin: 14px 0 6px;
  border-radius: 22px;
  background:
    radial-gradient(1200px 140px at 50% 50%, rgba(255,255,255,0) 0%, rgba(248,244,239,.92) 55%, rgba(248,244,239,0) 100%),
    url("img/messages-count-strip.jpg") center / cover no-repeat;
  opacity: .95;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* Count line */
.m-msgCount{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 14px;
  margin: 0;
}
.m-msgCount__line{
  height: 1px;
  width: min(180px, 22vw);
  background: rgba(99,64,58,.25);
}
.m-msgCount__text{
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 22px;
  color: var(--brown);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* Feed list */
.m-msgFeed{
  list-style:none;
  padding: 0;
  margin: 0;
  display:grid;
  gap: 12px;
}

/* Message card */
.m-condolence{
  position: relative;
  overflow:hidden;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,.06);
  background: rgba(255,255,255,70);
}

.m-condolence__bg{
  position:absolute;
  inset:0;
  background:
    radial-gradient(800px 220px at 70% 40%, rgba(255,255,255,.35) 0%, rgba(255,255,255,0) 60%),
    url("img/messages-card-bg.jpg") center / cover no-repeat;
  opacity: .85;
  pointer-events:none;
}

.m-condolence__row{
  position: relative;
  z-index: 1;
  display:flex;
  gap: 12px;
  padding: 14px;
}

/* Avatar circle */
.m-condolence__avatar{
  width: 44px;
  height: 44px;
  overflow: hidden;
  flex: 0 0 44px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  color: rgba(99,64,58,.9);
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.85), rgba(255,255,255,.45)),
    url("img/messages-avatar.jpg") center / cover no-repeat;
  border: 1px solid rgba(99,64,58,.18);
}

.m-condolence__avatar img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  border-radius:999px;
}

.m-condolence__main{ flex: 1; min-width: 0; }

.m-condolence__top{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 12px;
}

.m-condolence__name{
  font-weight: 600;     /* isto kao .m-candle__name */
  font-size: 20px;      /* isto kao .m-candle__name */
  line-height: 1.15;    /* isto kao .m-candle__name */
  color: var(--brown);
}

.m-condolence__date{
  font-size: 13px;
  color: rgba(99,64,58,.75);
  white-space: nowrap;
  margin-top: 2px;
}

.m-condolence__body{
  margin-top: 6px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--brown);
  overflow-wrap: anywhere;
}

.m-condolence__bottom{
  margin-top: 10px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.m-condolence__rel{
  font-size: 13px;
  color: rgba(99,64,58,.70);
}

/* Small pill buttons (Report/Hide/Delete) */
.m-pillBtn{
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(99,64,58,.22);
  color: rgba(99,64,58,.9);
  font-weight: 800;
  cursor:pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}
.m-pillBtn:hover{ filter: brightness(1.02); }
.m-pillBtn:active{ transform: translateY(1px); }

.m-msgMore{ margin-top: 14px; }

/* Mobile tweaks */

/* Counts links (hero): clickable candles/messages */
#counts.m-counts{
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.m-countLink{
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--brown);
  cursor: pointer;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.m-countLink__icon{
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: .92;
  transform: translateY(1px);
}

.m-countLink__icon svg{
  width: 18px;
  height: 18px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.m-countLink__num{ font-weight: 700; }

.m-countLink__label{
  opacity: .86;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--brown) 35%, transparent);
  text-underline-offset: 3px;
}

.m-countLink:hover .m-countLink__label{ opacity: 1; }

.m-countLink:focus-visible{
  outline: 2px solid color-mix(in srgb, var(--primary) 55%, transparent);
  outline-offset: 4px;
  border-radius: 10px;
}

.m-countSep{ opacity: .55; }

/* "Light a candle" button in Candles section header — match hero pill styling */
.m-card__headRight .btn.m-pill--hero{
  height: 46px;
  padding: 0 20px !important;
  border-radius: 999px !important;

  background: var(--hero-cream) !important;
  border: 1px solid var(--hero-cream-border) !important;

  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .01em;

  box-shadow:
    0 12px 28px rgba(0,0,0,.10),
    inset 0 1px 0 rgba(255,255,255,.70) !important;

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  text-decoration: none;
}

.m-card__headRight .btn.m-pill--hero:hover{
  filter: brightness(1.01);
  box-shadow:
    0 14px 34px rgba(0,0,0,.12),
    inset 0 1px 0 rgba(255,255,255,.78) !important;
  text-decoration: none;
}

.m-card__headRight .btn.m-pill--hero:active{ transform: translateY(1px); }

@media (max-width: 520px){
  .m-messages__hero{ height: 64px; }
  .m-msgCount{ gap: 10px; }
  .m-msgCount__line{ width: clamp(26px, 12vw, 90px); }
  .m-msgCount__text{ font-size: clamp(15px, 4.6vw, 18px); }
  .m-condolence__name{ font-size: 18px; }
  .m-condolence__row{ padding: 12px; }
  .m-msgForm__btn{ height: 50px; }
}

@media (max-width: 360px){
  .m-msgCount__line{ display: none; }
}



