/* ============================================
   OBITUARY CARD STYLES (Umrlice)
   ============================================ */

/* Override grid layout for obituaries - one per row */
.obituaries-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 30px !important;
  grid-template-columns: none !important;
}

.obituary-card {
  margin: 40px auto;
  max-width: 900px; /* Much wider */
  width: 100%;
  font-family: "Times New Roman", serif;
  background: #2d5016; /* Outer thick green border */
  border-radius: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  overflow: visible; /* Allow crescent to extend outside */
  padding: 60px; /* Very thick green border like Facebook */
  position: relative;
}

.obituary-frame {
  background: white; /* White middle layer */
  position: relative;
  padding: 10px; /* White space between outer and inner borders */
}

.obituary-content {
  background: white;
  border: 10px solid #2d5016; /* Inner border same thickness as white space */
  padding: 10px; /* Space inside the inner border */
}

/* Crescent moon and star positioned inside the frame at top */
.obituary-card::before {
  content: "☪";
  position: absolute;
  top: 0px; /* Move down a bit */
  left: 50%;
  transform: translateX(-50%);
  background: transparent; /* No circular background */
  color: white; /* White crescent and star */
  font-size: 60px; /* Smaller to fit in frame height */
  width: auto; /* Auto width */
  height: 60px; /* Limit height to fit in frame */
  border-radius: 0; /* No circle */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 0; /* Remove padding to save space */
  line-height: 1; /* Tight line spacing */
}

/* Header with Arabic text */
.obituary-header {
  text-align: center;
  padding: 30px 20px 20px;
  background: white; /* Pure white like Facebook examples */
  border-bottom: none; /* No border since it's all white content */
  margin-top: 10px;
}

.crescent-moon {
  display: none; /* Hidden since we use ::before pseudo-element */
}

.arabic-text {
  font-size: 24px;
  font-weight: bold;
  color: #2d5016;
  margin-bottom: 5px;
  font-family: "Amiri", "Scheherazade New", "Arabic Typesetting",
    "Noto Sans Arabic", serif;
  direction: rtl;
  unicode-bidi: bidi-override;
  letter-spacing: 2px;
}

.arabic-calligraphy-image {
  height: 40px;
  width: auto;
  margin: 0 auto 5px auto;
  display: block;
  filter: hue-rotate(100deg) saturate(1.5); /* Make it green like the border color */
}

/* Body content */
.obituary-body {
  padding: 15px 25px; /* Less vertical padding, same horizontal */
  line-height: 1.5; /* Tighter line spacing */
  color: #333;
}

.death-announcement {
  text-align: center;
  font-size: 16px;
  margin-bottom: 15px; /* Reduced margin */
  color: #444;
}

.deceased-name {
  text-align: center;
  font-size: 28px;
  font-weight: bold;
  color: #000;
  margin: 15px 0; /* Reduced margin */
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hatar-info {
  margin: 15px 0;
  padding: 0;
  background: transparent;
  border: none;
}

.hatar-detail {
  margin: 10px 0;
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
}

.hatar-detail strong {
  color: #000;
  font-weight: normal;
}

.funeral-info {
  margin: 15px 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.funeral-detail,
.burial-detail {
  margin: 10px 0;
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
}

.funeral-detail strong,
.burial-detail strong {
  color: #000;
  font-weight: normal;
}

.rahmet-text {
  text-align: center;
  font-size: 16px;
  font-weight: bold;
  color: #2d5016;
  margin: 15px 0; /* Reduced margin */
  padding: 12px; /* Reduced padding */
  background: #f0f7e8;
  border: 1px solid #2d5016;
  letter-spacing: 0.5px;
}

.family-members {
  margin-top: 15px;
  padding: 0;
  background: transparent;
  border: none;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}

.family-members strong {
  color: #000;
  font-weight: normal;
  display: block;
  margin-bottom: 8px;
}

/* Footer */
.obituary-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
  background: #f8f9fa;
  border-top: 1px solid #dee2e6;
  font-size: 13px;
}

.obituary-stats {
  display: flex;
  gap: 15px;
  color: #666;
}

.obituary-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.obituary-actions .btn {
  background: #2d5016;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 12px;
  transition: background-color 0.3s ease;
}

.obituary-actions .btn:hover {
  background: #1a2f0c;
  color: white;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .obituary-card {
    margin: 10px;
    max-width: none;
    padding: 40px; /* Thick padding on mobile too */
  }

  .obituary-frame {
    padding: 15px; /* Less white space on mobile */
  }

  .obituary-content {
    border: 15px solid #2d5016; /* Inner border same thickness as white space on mobile */
    padding: 15px; /* Less inner padding on mobile */
  }

  .obituary-card::before {
    top: 8px;
    font-size: 30px; /* Proportional to mobile frame */
    height: 30px; /* Limit height on mobile */
    padding: 0;
  }

  .obituary-header {
    padding: 25px 15px 15px;
  }

  .obituary-body {
    padding: 20px;
  }

  .deceased-name {
    font-size: 24px;
    margin: 15px 0;
  }

  .arabic-text {
    font-size: 16px;
  }
}

/* Print styles */
@media print {
  .obituary-card {
    box-shadow: none;
    margin: 0;
    max-width: none;
  }

  .obituary-footer {
    display: none;
  }

  .obituary-frame {
    border-color: #000;
  }

  .arabic-text,
  .rahmet-text,
  .funeral-detail strong,
  .burial-detail strong {
    color: #000;
  }
}
