/* ==========================================================================
   TEMA HALAMAN SERTIFIKAT UMUM - SEEDS STARS MONTESSORI
   ========================================================================== */
:root {
    --ms-orange: #f97316;
    --ms-orange-hover: #ea580c;
    --ms-slate: #0f172a;
    --ms-border: #e2e8f0;
}

/* --- 1. HERO --- */
.cert-hero-section {
    padding: 5rem 0 3rem 0;
    background: radial-gradient(circle at top, #fffdfb 0%, #ffffff 100%);
}

.cert-badge-top {
    background-color: #fff4eb;
    color: var(--ms-orange);
    border: 1px solid #ffd1b3;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 2px;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    display: inline-block;
}

.cert-main-title {
    font-size: calc(1.8rem + 1.2vw);
    font-weight: 850;
    letter-spacing: -0.5px;
}

.text-orange {
    color: var(--ms-orange);
}

.cert-sub-title {
    font-size: 1.1rem;
    line-height: 1.6;
}

/* --- 2. CARD LAYOUT (AUTO-GRID 3 KOLOM) --- */
.cert-item-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid var(--ms-border);
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.02);
    transition: all 0.3s ease;
    overflow: hidden;
}

.cert-item-card:hover {
    transform: translateY(-5px);
    border-color: #ffd1b3;
    box-shadow: 0 15px 30px rgba(249, 115, 22, 0.08);
}

/* Ukuran media seragam */
.cert-card-media {
    height: 200px;
    width: 100%;
    position: relative;
    background-color: #f8fafc;
    overflow: hidden;
    border-bottom: 1px solid #f1f5f9;
}

.cert-img-fluid {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.cert-media-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fdfaf7;
}

.text-orange-light {
    color: #ffedd5;
}

.cert-media-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.75);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
}

/* Konten Card */
.cert-date-badge {
    font-size: 0.775rem;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
}

.cert-card-title {
    font-size: 1.15rem;
    font-weight: 750;
    color: var(--ms-slate);
    line-height: 1.4;
    margin-bottom: 0.5rem;
    /* Batasi judul maksimal 2 baris agar layout seragam */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cert-card-text {
    font-size: 0.925rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Tombol Aksi */
.btn-view-cert {
    background-color: #ffffff;
    color: var(--ms-orange);
    border: 1px solid var(--ms-orange);
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.btn-view-cert:hover {
    background-color: var(--ms-orange);
    color: #ffffff;
}

/* --- 3. CLEAN MODAL --- */
.clean-cert-modal {
    border-radius: 20px;
    border: none;
}

.bg-light-smooth {
    background-color: #f8fafc;
    padding: 1rem 0;
}

.img-modal-view {
    max-height: 450px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.bg-dark-pill {
    background-color: rgba(15, 23, 42, 0.6) !important;
    padding: 10px;
    border-radius: 50%;
}

.cert-full-html-content {
    font-size: 1rem;
    line-height: 1.7;
    color: #334155;
    border-top: 1px solid #e2e8f0;
    padding-top: 1.25rem;
}

.btn-orange-action {
    background-color: var(--ms-orange);
    border: 1px solid var(--ms-orange);
}

.btn-orange-action:hover {
    background-color: var(--ms-orange-hover);
    border-color: var(--ms-orange-hover);
}

.cert-empty-state {
    border: 2px dashed var(--ms-border);
    border-radius: 16px;
    background: #fafafa;
}

/* --- 4. OPTIMASI RESPONSIVE --- */
@media (max-width: 768px) {
    .cert-hero-section {
        padding: 3.5rem 0 2rem 0;
    }
    .cert-card-media {
        height: 180px;
    }
    .img-modal-view {
        max-height: 320px;
    }
}
