/* ============================================================
   Alfajri Related Posts — Public Style
   Design: Warm Editorial / Islamic Manuscript feel
   Font: Playfair Display + Source Sans 3
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Source+Sans+3:wght@300;400;500;600&display=swap');

/* ── Variables ── */
.arp-wrap {
  --arp-gold:       #c9a84c;
  --arp-gold-light: #e8c97a;
  --arp-gold-dim:   rgba(201,168,76,0.12);
  --arp-green:      #2d5a3d;
  --arp-green-soft: #3a7550;
  --arp-bg:         #faf8f3;
  --arp-bg-card:    #ffffff;
  --arp-text:       #1a1a1a;
  --arp-text-muted: #6b6b6b;
  --arp-border:     rgba(201,168,76,0.2);
  --arp-shadow:     0 2px 20px rgba(0,0,0,0.07);
  --arp-shadow-hov: 0 8px 32px rgba(0,0,0,0.13);
  --arp-radius:     12px;
  --arp-transition: 0.28s cubic-bezier(0.4,0,0.2,1);
}

/* ── Wrapper ── */
.arp-wrap {
  font-family: 'Source Sans 3', sans-serif;
  margin: 48px 0 24px;
  padding: 36px 32px;
  background: var(--arp-bg);
  border: 1px solid var(--arp-border);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

/* Decorative corner flourish */
.arp-wrap::before {
  content: '﷽';
  position: absolute;
  top: 12px;
  right: 20px;
  font-size: 13px;
  color: var(--arp-gold);
  opacity: 0.4;
  letter-spacing: 1px;
}

.arp-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--arp-green) 0%, var(--arp-gold) 50%, var(--arp-green) 100%);
}

/* ── Header ── */
.arp-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.arp-header-icon {
  font-size: 20px;
  line-height: 1;
}

.arp-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--arp-green);
  letter-spacing: -0.3px;
  margin: 0;
  line-height: 1;
}

.arp-header-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--arp-gold) 0%, transparent 100%);
  opacity: 0.5;
}

/* ── Grid ── */
.arp-layout-grid .arp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.arp-layout-list .arp-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Card ── */
.arp-card {
  display: flex;
  flex-direction: column;
  background: var(--arp-bg-card);
  border: 1px solid var(--arp-border);
  border-radius: var(--arp-radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: transform var(--arp-transition), box-shadow var(--arp-transition), border-color var(--arp-transition);
  box-shadow: var(--arp-shadow);
}

.arp-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--arp-shadow-hov);
  border-color: var(--arp-gold);
  text-decoration: none;
  color: inherit;
}

/* List layout card */
.arp-layout-list .arp-card {
  flex-direction: row;
  align-items: stretch;
}

/* ── Thumbnail ── */
.arp-thumb {
  position: relative;
  width: 100%;
  padding-top: 56%; /* 16:9 */
  overflow: hidden;
  flex-shrink: 0;
  background: var(--arp-gold-dim);
}

.arp-layout-list .arp-thumb {
  width: 120px;
  padding-top: 0;
  min-height: 90px;
}

.arp-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--arp-transition);
}

.arp-card:hover .arp-thumb img {
  transform: scale(1.04);
}

.arp-thumb-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.arp-thumb-placeholder .arp-placeholder-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  font-size: 28px;
  opacity: 0.4;
}

/* ── Category badge ── */
.arp-cat {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: var(--arp-green);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 3px 8px;
  border-radius: 4px;
  line-height: 1.4;
}

/* ── Body ── */
.arp-body {
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.arp-post-title {
  font-family: 'Playfair Display', serif;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--arp-text);
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--arp-transition);
}

.arp-card:hover .arp-post-title {
  color: var(--arp-green);
}

.arp-excerpt {
  font-size: 12.5px;
  color: var(--arp-text-muted);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Meta ── */
.arp-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.arp-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--arp-text-muted);
}

.arp-meta-item svg {
  opacity: 0.6;
  flex-shrink: 0;
}

/* ── Arrow ── */
.arp-arrow {
  position: absolute;
  bottom: 14px;
  right: 14px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--arp-gold-dim);
  color: var(--arp-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  opacity: 0;
  transform: translateX(-4px);
  transition: all var(--arp-transition);
}

.arp-card:hover .arp-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .arp-wrap {
    padding: 24px 16px;
    margin: 32px -4px 16px;
    border-radius: 12px;
  }

  .arp-layout-grid .arp-grid {
    grid-template-columns: 1fr;
  }

  .arp-layout-list .arp-thumb {
    width: 90px;
  }

  .arp-post-title {
    font-size: 13.5px;
  }
}

/* ── Dark mode support ── */
@media (prefers-color-scheme: dark) {
  .arp-wrap {
    --arp-bg:         #1a1a14;
    --arp-bg-card:    #232318;
    --arp-text:       #e8e4d8;
    --arp-text-muted: #9a9485;
    --arp-border:     rgba(201,168,76,0.15);
    --arp-shadow:     0 2px 20px rgba(0,0,0,0.3);
    --arp-shadow-hov: 0 8px 32px rgba(0,0,0,0.4);
  }
}
