/* ==================================================
   EMBED CSS — Publisher Export Mode (Freeze-grade)
   Clean UI + search bar human-like + 1-row desktop
   NO global site navbar/footer/cookie styles
================================================== */

/* ---------- Base reset ---------- */
:root{
  --accent: #7a1e2b;
  --gold: #b59b5b;

  --bg: #ffffff;
  --surface: #ffffff;

  --border: rgba(0,0,0,.12);
  --border2: rgba(0,0,0,.18);

  --text: #151515;
  --muted: rgba(0,0,0,.65);

  --shadow: 0 10px 30px rgba(0,0,0,.06);
}

*{ box-sizing: border-box; }

html, body{
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body{ overflow-x: hidden; }

a{ color: inherit; }
img{ max-width: 100%; }

/* ==================================================
   WRAPPER
================================================== */
.pp, .pp *{ box-sizing: border-box; }

.pp-container{
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 12px 12px 30px;
}

@media (min-width: 1100px){
  .pp-container{
    width: min(1800px, 100%);
    padding: 18px 22px 40px;
  }
}

/* ==================================================
   HERO
================================================== */
.pp-hero{
  width: 100%;
  aspect-ratio: 1920 / 400;
  min-height: 140px;
  max-height: 420px;
  border-radius: 18px;
  overflow: hidden;
  background: #111;
  margin: 0 0 16px;
  box-shadow: var(--shadow);
}

.pp-hero img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

/* ==================================================
   CARDS + LAYOUT
================================================== */
.pp-card{
  background: var(--surface);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,.06);
}

.pp-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

@media (min-width: 1100px){
  .pp-grid{
    grid-template-columns: 1.7fr 1fr;
    gap: 22px;
    align-items: start;
  }

  /* In embed disabilitiamo sticky */
.pp-card-side{
  position: relative !important;
  top: auto !important;
}

/* Publisher header */
.pp-publisher-head{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

@media (min-width: 1100px){
  .pp-publisher-head{
    grid-template-columns: 180px 1fr;
    align-items: center;
    gap: 18px;
  }
}

.pp-logo img{
  width: 120px;
  height: 120px;
  border-radius: 16px;
  display: block;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
}

@media (min-width: 1100px){
  .pp-logo img{
    width: 160px;
    height: 160px;
  }
}

.pp-title h1{
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -.01em;
}

@media (min-width: 1100px){
  .pp-title h1{ font-size: 1.9rem; }
}

.pp-subtitle{
  margin: 8px 0 0;
  opacity: .82;
}

.pp-h2{
  margin: 0 0 12px;
  font-size: 1.05rem;
  letter-spacing: -.01em;
}

.pp-text{
  line-height: 1.65;
  color: rgba(0,0,0,.78);
}

/* Meta list */
.pp-meta{
  list-style: none;
  padding: 0;
  margin: 0;
}

.pp-meta li{
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.pp-meta li:last-child{ border-bottom: 0; }
.pp-meta a{ word-break: break-word; }

/* Actions */
.pp-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.pp-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(122,30,43,.30);
  background: rgba(122,30,43,.08);
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
  transition: transform .12s ease, background .12s ease;
}

.pp-btn:hover{
  background: rgba(122,30,43,.12);
  transform: translateY(-1px);
}

/* ==================================================
   SEARCH — HUMAN LOOK + 1 ROW DESKTOP
================================================== */
.pp-search{ margin-top: 16px; }

.pp-form{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

/* Desktop: 1 row */
@media (min-width: 1100px){
  .pp-form{
    grid-template-columns: 2.2fr 1.1fr 1fr 1fr auto;
    align-items: end;
    gap: 12px;
  }
}

.pp-field label{
  display: block;
  margin: 0 0 6px;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .10em;
  opacity: .72;
}

/* Inputs */
.pp-form input,
.pp-form select{
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--border2);
  background: #fff;
  font-size: .98rem;
  color: var(--text);
  transition: box-shadow .12s ease, border-color .12s ease;
}

.pp-form select{ cursor: pointer; }

.pp-form input:focus,
.pp-form select:focus{
  outline: none;
  border-color: rgba(122,30,43,.55);
  box-shadow: 0 0 0 4px rgba(122,30,43,.12);
}

/* Submit */
.pp-submit{
  width: 100%;
  height: 44px;
  padding: 0 18px;
  border-radius: 14px;

  border: 1px solid rgba(122,30,43,.40);
  background: rgba(122,30,43,.12);

  color: var(--accent);
  font-weight: 900;
  letter-spacing: .02em;
  cursor: pointer;

  transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
}

.pp-submit:hover{
  background: rgba(122,30,43,.18);
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

.pp-submit:active{
  transform: translateY(0);
  box-shadow: none;
}

@media (min-width: 1100px){
  .pp-submit{
    width: auto;
    min-width: 150px;
  }
}

/* ==================================================
   NECROLOGI GRID — clean cards
================================================== */
.pp-necrologi{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 18px;
}

@media (min-width: 720px){
  .pp-necrologi{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (min-width: 1100px){
  .pp-necrologi{
    grid-template-columns: repeat(auto-fit, minmax(320px, 360px));
    justify-content: center;
    gap: 18px;
  }
}

.pp-empty{
  margin: 16px 0;
  opacity: .7;
}

/* Card */
.pp-n-card{
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,.06);
}

@media (min-width: 1100px){
  .pp-n-card{
    width: 100%;
    max-width: 360px;
  }
}

.pp-n-link{
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

/* Thumb */
.pp-n-thumb{
  width: 100%;
  height: 220px;
  background: #f2efe9;
  overflow: hidden;
}

.pp-n-thumb img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.pp-n-placeholder{
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .6;
  font-weight: 900;
}

/* Body */
.pp-n-body{ padding: 14px 16px 16px; }

.pp-n-title{
  margin: 0 0 8px;
  font-size: 1.06rem;
  font-weight: 900;
  color: var(--accent);
}

.pp-n-place{
  margin: 0;
  font-size: .86rem;
  opacity: .78;
}

.pp-n-snippet{
  margin: 10px 0 0;
  font-size: .95rem;
  line-height: 1.5;
  opacity: .90;

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;

  min-height: calc(1.5em * 3);
}

.pp-n-date{
  margin: 12px 0 0;
  font-size: .85rem;
  opacity: .7;
}

.pp-n-card:hover .pp-n-title{
  color: var(--gold);
}

/* EMBED: niente scroll interno, altezza reale per postMessage */
html, body { height: auto !important; min-height: 0 !important; overflow: visible !important; }
.page-content, .embed-inner-container { max-height: none !important; overflow: visible !important; height: auto !important; }