/* ============================================
   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;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.obituary-card.clickable-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.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: #adff2f; /* Match bright green Nova objava button */
  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: 15px auto;
    max-width: calc(100% - 20px);
    padding: 6px; /* Debljina spoljnog okvira */
  }

  .obituary-frame {
    padding: 3px; /* Polovni padding */
  }

  .obituary-content {
    border: 3px solid #2d5016; /* Tanki unutrašnji okvir */
    padding: 6px; /* Polovni padding */
  }

  .obituary-card::before {
    top: -5px;
    font-size: 28px;
    height: 28px;
    padding: 0;
  }

  .obituary-header {
    padding: 30px 4px 4px; /* Polovni padding */
  }

  .obituary-body {
    padding: 4px 5px; /* Polovni padding */
  }

  .deceased-name {
    font-size: 22px;
    margin: 5px 0; /* Polovni margin */
  }

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

  .death-announcement {
    font-size: 14px;
    margin-bottom: 4px; /* Polovni margin */
    line-height: 1.4; /* Tighter line height */
  }

  .hatar-detail,
  .funeral-detail,
  .burial-detail {
    font-size: 14px;
    margin: 3px 0; /* Polovni margin */
    line-height: 1.4;
  }

  .hatar-info,
  .funeral-info {
    margin: 5px 0; /* Polovni margin */
  }

  .rahmet-text {
    font-size: 11px; /* Manji font da stane u 1 red */
    padding: 4px; /* Polovni padding */
    margin: 5px 0; /* Polovni margin */
    letter-spacing: 0.3px; /* Malo manje razmaka između slova */
    white-space: nowrap; /* Forsiraj 1 red */
  }

  .family-members {
    font-size: 13px;
    margin-top: 5px; /* Polovni margin */
    line-height: 1.4;
  }

  .family-members strong {
    margin-bottom: 3px; /* Polovni margin */
  }
}

/* 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;
  }
}
