/* ===========================================
   ANGGUGU MY CERTIFICATES STYLES
   ============================================ */

.my-certificates-container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #2E3741; /* Gunmetal */
}

.my-certificates-container h1 {
    color: #4C191B; /* Dark Sienna */
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #FFD4D4; /* Pale Pink */
}

/* --- NEW ACHIEVEMENT HALL PROMO STYLES --- */
.achievement-hall-promo {
    background-color: #fff7f9; /* A very light brand pink */
    border: 1px solid #FFD4D4; /* Pale Pink */
    border-left: 4px solid #963d5a; /* Quinacridone Magenta */
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 8px;
}

.achievement-hall-promo p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
    color: #2E3741; /* Gunmetal */
}

.achievement-hall-promo a {
    color: #963d5a; /* Quinacridone Magenta */
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid #EDA2C0; /* Amaranth Pink */
    transition: all 0.2s ease;
}

.achievement-hall-promo a:hover {
    color: #4C191B; /* Dark Sienna */
    border-bottom-color: #4C191B;
}
/* --- END NEW STYLES --- */

.certs-empty-message {
    background-color: #fff7f9;
    border-left: 4px solid #EDA2C0;
    padding: 1rem 1.5rem;
    border-radius: 8px;
}

.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.certificate-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(46, 55, 65, 0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #FFD4D4; /* Pale Pink */
}

.certificate-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(46, 55, 65, 0.1);
}

.certificate-card.is-unlinked {
    border-left: 5px solid #EDA2C0; /* Amaranth Pink for emphasis */
}

.certificate-thumbnail-link {
    display: block;
    background-color: #f8fafc;
}

.certificate-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1.414 / 1; /* A4 paper aspect ratio */
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.certificate-thumbnail-link:hover img {
    opacity: 0.85;
}

.certificate-details {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.certificate-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #4C191B; /* Dark Sienna */
    margin: 0 0 0.5rem 0;
}

.certificate-journey {
    font-size: 0.9rem;
    margin: 0 0 1.5rem 0;
    flex-grow: 1;
    color: #2E3741;
}
.certificate-journey strong {
   font-weight: 600;
}
.certificate-journey.linked strong {
    color: #059669; /* Success Green */
}
.certificate-journey.unlinked strong {
    color: #963d5a; /* Quinacridone Magenta */
}

.certificate-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto; /* Pushes actions to the bottom */
}

.cert-btn {
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.cert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(46, 55, 65, 0.1);
}

.cert-btn.primary {
    background-color: #963d5a; /* Quinacridone Magenta */
    color: #ffffff;
}
.cert-btn.primary:hover {
    background-color: #4C191B; /* Dark Sienna */
}

.cert-btn.secondary, .cert-btn.link-btn {
    background-color: #F8FAFC;
    color: #963d5a; /* Quinacridone Magenta */
    border: 1px solid #FFD4D4; /* Pale Pink */
}
.cert-btn.secondary:hover, .cert-btn.link-btn:hover {
    background-color: #FFD4D4;
    color: #4C191B;
}

.cert-btn.unlink-btn {
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}
.cert-btn.unlink-btn:hover {
    background-color: #ef4444;
    color: #ffffff;
}

/* Modal Styles */
.cert-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(46, 55, 65, 0.6); /* Gunmetal with opacity */
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 2rem;
    border: 1px solid #EDA2C0; /* Amaranth Pink */
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    animation: modal-fade-in 0.3s ease-out;
}

@keyframes modal-fade-in {
    from { opacity: 0; transform: translateY(-20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
    color: #aaa;
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
}

.modal-close:hover,
.modal-close:focus {
    color: #4C191B; /* Dark Sienna */
    text-decoration: none;
    cursor: pointer;
}

.modal-content h2 {
    color: #4C191B;
    margin-top: 0;
    margin-bottom: 1rem;
}

.modal-content p {
    margin-bottom: 1.5rem;
    color: #2E3741;
}

.modal-content .form-group {
    margin-bottom: 1.5rem;
}
.modal-content .form-group:last-child {
    margin-bottom: 0;
}

.modal-content label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.modal-content select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #FFD4D4;
    border-radius: 8px;
    background-color: #fff;
    font-size: 1rem;
}
.modal-content select:focus {
    outline: none;
    border-color: #963d5a;
    box-shadow: 0 0 0 3px rgba(150, 61, 90, 0.1);
}

.feedback-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
    display: none; /* Hidden by default */
}
.feedback-message.success { display: block; background-color: #d1fae5; color: #065f46; }
.feedback-message.error { display: block; background-color: #fee2e2; color: #991b1b; }
.feedback-message.linking { display: block; background-color: #f1f5f9; color: #334155; }