/* ==================== PENGUMUMAN CARD - HOME ==================== */

.pengumuman-card {
    display: block;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.25s ease;
    height: 100%;
}

.pengumuman-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: #ffc107;
}

.pengumuman-card-expired {
    opacity: 0.7;
}

/* Image area */
.pengumuman-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;   
    overflow: hidden;
    background: #f1f3f5;
}
.pengumuman-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;  
    display: block;
    transition: transform 0.35s ease;
}

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

/* Placeholder when no image */
.pengumuman-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #d97706;
    font-size: 2.5rem;
}

/* Fallback class added by onerror JS */
.pengumuman-card-img-fallback {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d97706;
    font-size: 2.5rem;
}

/* Category badge — bottom-left overlay */
.pengumuman-cat-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Priority badge — top-right */
.pengumuman-priority-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.pengumuman-priority-badge.priority-high {
    background: #ff4c51;
    color: #fff;
}

.pengumuman-priority-badge.priority-pin {
    background: #ff9f43;
    color: #fff;
}

/* Body */
.pengumuman-card-body {
    padding: 1rem;
}

.pengumuman-card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #2d3748;
    line-height: 1.5;
    margin-bottom: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pengumuman-card-excerpt {
    font-size: 0.825rem;
    color: #718096;
    line-height: 1.55;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pengumuman-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.375rem;
    font-size: 0.775rem;
    color: #94a3b8;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
}

.pengumuman-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.pengumuman-card-meta .text-danger {
    color: #ff4c51 !important;
}

/* ==================== DARK MODE ==================== */
[data-bs-theme="dark"] .pengumuman-card {
    background: #2b2c40;
    border-color: #3a3c52;
}

[data-bs-theme="dark"] .pengumuman-card:hover {
    border-color: #ffc107;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .pengumuman-card-img {
    background: #1e1e2d;
}

[data-bs-theme="dark"] .pengumuman-card-img-placeholder {
    background: linear-gradient(135deg, #3d2c00 0%, #5a4000 100%);
    color: #fbbf24;
}

[data-bs-theme="dark"] .pengumuman-card-title {
    color: #e7e7e7;
}

[data-bs-theme="dark"] .pengumuman-card-excerpt {
    color: #94a3b8;
}

[data-bs-theme="dark"] .pengumuman-card-meta {
    color: #64748b;
    border-top-color: #3a3c52;
}