/* Memorial page template 2 «حرم و باغ» (resources/views/memorials/Show_temp2.blade.php).
   Everything is scoped to .t2 / .t2-stage. Palette: navy #2C3E50, gold #C5A059, sage #5D7052, warm cream page.
   Gold is never used for small text (too faint): gold-looking text uses #7A5D24, text on gold is navy. */
.t2-stage{--t2-cream:#F7F2E7;--t2-card:#FFFDF8;--t2-line:rgba(122,93,36,.18);--t2-gold:#C5A059;--t2-gold-text:#7A5D24;--t2-navy:#2C3E50;--t2-sage:#5D7052;
  position:relative;padding:18px 16px 70px;background:linear-gradient(180deg,#F6F0E2 0,#F8F4EA 640px,#F7F2E7 100%);overflow:hidden}
/* isolation + z-index:-1 keep the leaves behind the content without positioning the children: dialogs and the
   floating share button must keep their own (fixed / top-layer) positioning, or opening a modal scrolls the page. */
.t2{position:relative;isolation:isolate;max-width:1240px;width:100%;margin-inline:auto}

/* Background: olive leaves only, the same branches mirrored on both sides; fades out before the cards. */
.t2-scenery{position:absolute;z-index:-1;inset:-18px -16px auto;height:760px;overflow:clip;pointer-events:none;
  -webkit-mask-image:linear-gradient(#000 0,#000 58%,transparent 96%);mask-image:linear-gradient(#000 0,#000 58%,transparent 96%)}
.t2-scenery span{position:absolute;top:0;bottom:0;background-repeat:no-repeat;background-size:contain}
.t2-leaves{width:min(34%,430px);background-image:url(../images/memorial-temp2/scenery-leaves.svg?v=2);background-position:right top;opacity:.75}
.t2-leaves-end{right:-1%}
.t2-leaves-start{left:-1%;transform:scaleX(-1)}

/* Hero: name banner, framed photo between branches, years. */
.t2-hero{display:flex;flex-direction:column;align-items:center;text-align:center;padding:4px 0 8px;overflow:clip;overflow-clip-margin:12px}
.t2 .t2-verse{margin:0 0 10px;color:var(--t2-navy);font-size:clamp(.95rem,2.4vw,1.1rem);line-height:2}
.t2-banner{position:relative;width:100%;display:flex;justify-content:center;margin-bottom:22px}
.t2-banner::before{content:"";position:absolute;inset-inline:6%;top:50%;height:1px;background:linear-gradient(90deg,transparent,var(--t2-gold) 18%,var(--t2-gold) 82%,transparent)}
.t2-banner h1{position:relative;margin:0;max-width:min(680px,100%);padding:10px clamp(28px,5vw,58px);border-radius:14px;background:var(--t2-navy);color:#fff;
  font-size:clamp(1.05rem,2.3vw,1.45rem);font-weight:800;line-height:1.7;box-shadow:0 0 0 2px var(--t2-cream),0 0 0 3.5px var(--t2-gold),0 12px 26px -16px rgba(44,62,80,.7);overflow-wrap:anywhere}
.t2-banner h1::before,.t2-banner h1::after{content:"";position:absolute;top:50%;width:12px;height:12px;border:2px solid var(--t2-gold);background:var(--t2-cream);transform:translateY(-50%) rotate(45deg)}
.t2-banner h1::before{right:-8px}.t2-banner h1::after{left:-8px}

/* Photo at its own aspect ratio (2026-11-11): the frame hugs the photo, whatever its shape. Landscape photos are
   capped by width, portrait ones by height; small photos are never enlarged. */
.t2-portrait{position:relative;margin:0;width:fit-content;max-width:min(calc(100% - 150px),520px)}
.t2-portrait::before{content:"";position:absolute;inset:-14% -34% 4%;border-radius:50%;background:radial-gradient(closest-side,rgba(255,252,243,.95),rgba(255,252,243,.6) 55%,transparent);z-index:-1}
.t2-frame{position:relative;width:fit-content;max-width:100%;margin-inline:auto;overflow:hidden;border-radius:16px;background:#E9DFC9;
  box-shadow:0 0 0 6px #E4CC92,0 0 0 8px var(--t2-gold),0 0 0 11px #FBF6EA,0 0 0 12px rgba(197,160,89,.65),0 26px 44px -22px rgba(44,62,80,.55)}
.t2-photo{display:block;width:auto;height:auto;max-width:100%;max-height:min(440px,64vh)}
.t2-branch{position:absolute;bottom:-12%;height:min(132%,340px);width:auto;pointer-events:none;filter:drop-shadow(0 6px 8px rgba(93,112,82,.18))}
.t2-branch-start{right:calc(100% - 4px)}
.t2-branch-end{left:calc(100% - 4px);transform:scaleX(-1)}
.t2-dates{display:flex;align-items:center;gap:14px;width:min(560px,92%);margin:22px 0 0;color:var(--t2-navy);font-weight:800;font-size:1.05rem;letter-spacing:.02em}
.t2-dates::before,.t2-dates::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,transparent,var(--t2-gold))}
.t2-dates::after{transform:scaleX(-1)}
.t2-code{margin:6px 0 0;font-size:.7rem;color:#7a8187;opacity:.85} /* small: few visitors need it */
.t2-portrait+.t2-code{margin-top:22px}.t2-code b{color:inherit;font-weight:600}
.t2-status:empty{display:none}
.t2-status{margin:12px 0 0;padding:8px 16px;border-radius:999px;background:#EBEFE6;color:#3F5236;font-size:.86rem;font-weight:700}

/* Card groups */
.t2-group{margin-top:34px;scroll-margin-top:90px}
.t2-group-title{display:flex;align-items:center;gap:12px;margin:0 0 14px;font-size:1.06rem;font-weight:800;color:var(--t2-navy)}
.t2-group-title::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,var(--t2-line),transparent);transform:scaleX(-1)}
/* Flex, not grid: a group with fewer cards than a row stays centred instead of hugging one side. */
.t2-grid{--t2-cols:4;--t2-gap:16px;display:flex;flex-wrap:wrap;justify-content:center;gap:var(--t2-gap)}
.t2-grid>*{flex:0 0 calc((100% - (var(--t2-cols) - 1) * var(--t2-gap)) / var(--t2-cols));min-width:0}
.t2-card{display:flex;align-items:center;gap:14px;min-height:112px;padding:16px;border:1px solid var(--t2-line);border-radius:14px;background:var(--t2-card);
  color:var(--t2-navy);text-align:start;text-decoration:none;font:inherit;cursor:pointer;box-shadow:0 1px 0 rgba(255,255,255,.8) inset,0 10px 24px -20px rgba(44,62,80,.55);
  transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease}
.t2-card:hover{transform:translateY(-2px);border-color:rgba(197,160,89,.55);box-shadow:0 16px 30px -20px rgba(44,62,80,.6)}
.t2-card:focus-visible{outline:2px solid var(--t2-gold);outline-offset:3px}
.t2-card-icon{flex:none;display:grid;place-items:center;width:58px;height:58px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#FFFDF6,#EFE4CC);
  color:#5E4A1E;box-shadow:0 0 0 1px rgba(197,160,89,.35),0 6px 12px -8px rgba(94,74,30,.5)}
.t2-card-icon .ui-icon{width:28px;height:28px}
.t2-card-body{flex:1;min-width:0;display:grid;gap:3px}
.t2-card-body strong{font-size:.95rem;font-weight:800;line-height:1.6;color:#2D3134}
.t2-card-body small{font-size:.78rem;line-height:1.6;color:#5C636B}
.t2-card-body small b{color:var(--t2-navy);font-weight:800}
.t2-card-go{flex:none;display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--t2-gold);color:#1F2D3A}
.t2-card-go .ui-icon{width:16px;height:16px;transform:rotate(90deg)}
.t2-card.is-done{border-color:var(--t2-sage)}

/* Sections shared with the classic page, on the warm background. */
/* Gift cards box: the same box and «باز کردن / بستن» button as the Quran gift (gift-quran), open by default. */
.t2 .t2-gifts{margin-block:34px 0}
.t2 .t2-gifts>summary{color:var(--t2-navy)}
.t2 .gift-mark-icon{display:inline-flex}
.t2 .gift-mark-icon .ui-icon{width:44px;height:44px}
.t2 .t2-about,.t2 .remembrance-section,.t2 .readings-section,.t2 .share-panel,.t2 .memorial-create-cta{margin-top:34px}
.t2 .t2-about{background:var(--t2-card);border:1px solid var(--t2-line);text-align:center}
.t2 .t2-about :is(h2,p,.dedication){text-align:center}

@media(max-width:1180px){.t2-grid{--t2-cols:3}}
@media(max-width:900px){
  .t2-grid{--t2-cols:2;--t2-gap:12px}
  .t2-scenery{height:620px}
  .t2-leaves{width:40%;opacity:.6}
}
@media(max-width:600px){
  .t2-stage{padding:12px 12px 90px}
  .t2-scenery{inset:-12px -12px auto;height:520px}
  .t2-leaves{width:52%;opacity:.42}
  .t2-leaves-end{right:-14%}.t2-leaves-start{left:-14%}
  .t2-banner{margin-bottom:18px}
  .t2-banner::before{display:none}
  .t2-banner h1{padding:9px 26px}
  .t2-portrait{max-width:min(calc(100% - 96px),320px)}
  .t2-photo{max-height:min(380px,58vh)}
  .t2-branch{height:min(120%,260px);bottom:-8%}
  .t2-branch-start{right:calc(100% - 10px)}
  .t2-branch-end{left:calc(100% - 10px)}
  .t2-group{margin-top:26px}
  .t2-grid{--t2-cols:1;--t2-gap:10px}
  .t2-card{min-height:0;padding:12px 14px}
  .t2-card-icon{width:50px;height:50px}.t2-card-icon .ui-icon{width:24px;height:24px}
}
@media(prefers-reduced-motion:reduce){.t2-card{transition:none}.t2-card:hover{transform:none}}

/* Quran pages read for the memorial (GroupKhatmService::pagesReadFor) */
.t2-card-body .t2-card-read{display:block;margin-top:2px}
