/* العرض العام */
body {
  font-family: 'Amiri', serif;
  background-color: #f9f9f9;
  direction: rtl;
  text-align: center;
  padding: 40px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  color: #000;
}

.indented-line {
  text-align: right;
  direction: rtl;
  display: block;
  padding-right: 140px;
  text-indent: -20px;
  line-height: 1.8;
}

.na3wa-container {
  background-color: #fff;
  border: 2px solid #000;
  padding: 30px;
  max-width: 800px;
  margin: auto;
}

.title {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 10px;
}

.separator {
  border: none;
  border-top: 2px solid #000;
  margin: 10px 0 20px;
}

.family-info p,
.extended-family p,
.announcement p,
.details p,
.condolences p,
.closing p {
  text-align: right;
  margin: 5px 0;
}

.header-image,
.footer-image {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}

.header-image img,
.footer-image img {
  max-width: 100%;
  height: auto;
}


.relative-line {
  margin: 0.2em 0;
  line-height: 1.2;
  page-break-inside: avoid;
  display: flex;
  flex-direction: row-reverse;
}

.label {
  font-weight: bold;
  min-width: 140px;
  text-align: right;
}

.names {
  flex: 1;
  text-align: right;
}



.highlight {
  font-weight: 900;
  font-size: 22px;
  margin-top: 20px;
  color: #000;
}

.family-line {
  font-weight: bold;
  text-align: center;
  font-size: 20px;
  margin: 30px 0;
  line-height: 1.6;
}

.na3wa-wrapper {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 0.5cm;
}

/* الطباعة */
@media print {
	

  
    body {
    margin: 0 !important;
    padding: 0 !important;
  }

  .na3wa-container {
    padding: 0 !important;
    margin: 0 auto !important;
	border: none !important; /* اختياري لتقليل المساحة */
    max-width: 100% !important;

  }


  
  
  

  @page {
    margin: 0;
  }

  .na3wa-wrapper {
    padding: 0;
    margin: 0;
  }

  .na3wa-top,
  .na3wa-bottom {
    padding: 0.2cm 0.5cm;
    page-break-inside: auto; /* بدل avoid */
  }

  .relative-item {
    font-size: 10px;
    line-height: 1.1;
    margin-bottom: 2px;
  }

  .highlight {
    font-size: 16px;
    font-weight: bold;
  }

  p {
    margin: 3px 0;
  }

  img[alt="رأس النعوة"] {
    width: 100%;
    height: auto;
    object-fit: cover;
    margin: 0;
    display: block;
  }

  img[alt="ذيل النعوة"] {
    max-height: 2cm;
    width: 100%;
    object-fit: contain;
    margin: 0;
  }
}