:root {
    --grid-gap: 20px;
    --color-placeholder: #d1d5db;
}

.smart-grid {
    display: flex;
    flex-direction: column;
    gap: var(--grid-gap);
    width: 100%;
    opacity: 1;
}

.smart-grid.fade-out {
    opacity: 0;
}

.grid-band {
    display: grid;
    gap: var(--grid-gap);
    width: 100%;
}

.card-item,
.card-horizontal {
    border: 1px solid var(--color-gray-mid) !important;
    color: var(--color-gray-mid);
    padding: 10px;
    border-radius: 8px;
    background-color: var(--color-white-soft);
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
    cursor: pointer;
    transition: outline 0.1s ease;
}

.card-img-placeholder {
    background-color: var(--color-placeholder);
    border-radius: 4px;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: top center;
    flex-shrink: 0;
}

/* --- 1. کارت عمودی --- */
.card-vertical {
    grid-column: span 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card-vertical.v-bottom {
    flex-direction: column-reverse;
}

/* --- 2. کارت افقی --- */
.horizontal-stack {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    gap: var(--grid-gap);
    height: 100%;
    min-height: 0;
    padding: 0;
    border: none;
    cursor: default;
}

.card-horizontal {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-height: 0;
}

/* تنظیم عرض عکس در کارت افقی */
.card-horizontal .card-img-placeholder {
    /* چون کارت افقی دو برابر عرض دارد، ۵۰ درصد آن می‌شود برابر با ۱ واحد (یک مربع استاندارد) */
    width: calc(50% - 21px);
}

.card-horizontal .card-content-placeholder {
    width: 50%;
}

/* --- 3. کارت مربعی --- */
.card-square {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
    direction: ltr;
}

/* عکس در کارت مربعی */
.card-square .card-img-placeholder {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    width: calc(100% - 11px);
    height: calc(100% - 11px);
}

/* محتوا در کارت مربعی */
.card-square .card-content-placeholder {
    direction: rtl;
    grid-column: 2 / 3;
    grid-row: 1 / span 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- محتوای متنی --- */
.card-content-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    font-size: 0.9rem;
    overflow: hidden;
}

.card-item:hover,
.card-horizontal:hover {
    outline: 1px solid var(--color-primary-hover);
    border-color: var(--color-primary-hover) !important;
}

/* assets/css/component/cards.css */

/* --- استایل یکپارچه برای تمام کارت‌های آرامگاه (مربع، افقی، عمودی) --- */

/* کانتینر اصلی متن‌های آرامگاه */
.tomb-layout {
    display: flex;
    flex-direction: column;
    
    /* چسبیدن به بالا */
    justify-content: flex-start !important; 
    
    /* راست‌چین کردن متن (در RTL می‌شود سمت راست) */
    align-items: flex-start !important; 
    text-align: right !important;
    
    width: 100%;
    height: 100%;
    

    
    /* حذف پدینگ‌های اضافه پیش‌فرض */
    box-sizing: border-box;
}

/* عنوان (دقیقا همان سایز کارت مربعی) */
.tomb-title {
    font-size: 1rem;      /* سایز اصلی */
    margin-bottom: 20px;
    font-weight: bold;
    color: var(--color-back-soft, #333);
    display: block;
}

/* توضیحات (دقیقا همان سایز کارت مربعی) */
.tomb-desc {
    font-size: 0.875rem;  /* سایز اصلی */
    line-height: 1.4;
    color: var(--color-gray-dark, #666);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tomb-desc span {
    display: block;
}

/* assets/css/component/cards.css */

/* --- استایل اختصاصی کارت‌های اعلامیه --- */

/* کانتینر نگهدارنده متن‌های اعلامیه */
.announcement-layout {
    display: flex;
    flex-direction: column;
    align-items: center;    /* وسط‌چین افقی */
    justify-content: space-evenly;
    width: 100%;
    height: 100%;
    gap: 8px; /* فاصله بین خطوط */
    padding: 10px;
    display: flex;
    /*background-image: url(../../img/pages/announcements/pattern-Model.svg);*/
    background-repeat: no-repeat;
    background-position: top center;
}

/* خط اول: هوالباقی / سالگرد و... */
.card-caption-announcements {
    font-size: 1rem;
    font-weight: bold;
    color: var(--color-black-soft, #000); /* فال‌بک مشکی */
    text-align: center;
}

/* خط دوم: عنوان (مرحومه مغفوره...) */
.card-title-announcements {
    font-size: 1rem;
    color: var(--color-black-soft, #333);
    text-align: center;
}

/* خط سوم: نام متوفی (مریم محمدی) */
.card-name-announcements {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary-hover, #d32f2f); /* فال‌بک قرمز */
    text-align: center;
}