/* ============================================================
   Certificate Verification System – Frontend Styles
   Version: 2.0
============================================================ */

/* ---- Portal wrapper ---- */
.certv-portal {
    font-family: 'Segoe UI', Arial, sans-serif;
    max-width: 720px;
    margin: 0 auto;
    padding: 10px 16px 40px;
}

/* ---- Hero section ---- */
.certv-hero {
    background: linear-gradient(135deg, #1a56db 0%, #1e3a8a 100%);
    border-radius: 20px;
    padding: 48px 36px 40px;
    text-align: center;
    color: #fff;
    box-shadow: 0 12px 40px rgba(30, 58, 138, 0.35);
    margin-bottom: 32px;
}

.certv-hero-icon {
    font-size: 52px;
    line-height: 1;
    margin-bottom: 14px;
}

.certv-hero-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 10px;
    color: #fff;
    letter-spacing: -.3px;
}

.certv-hero-sub {
    font-size: 15px;
    color: rgba(255,255,255,.80);
    margin: 0 0 30px;
    line-height: 1.6;
}

/* ---- Search box ---- */
.certv-search-box {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.certv-input-wrap {
    position: relative;
    flex: 1;
    min-width: 220px;
    max-width: 380px;
}

.certv-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 17px;
    pointer-events: none;
}

.certv-input {
    width: 100%;
    padding: 14px 16px 14px 46px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 12px;
    font-size: 16px;
    background: rgba(255,255,255,.12);
    color: #fff;
    outline: none;
    box-sizing: border-box;
    transition: border-color .2s, background .2s;
    letter-spacing: 1px;
}

.certv-input::placeholder { color: rgba(255,255,255,.55); }

.certv-input:focus {
    border-color: rgba(255,255,255,.75);
    background: rgba(255,255,255,.18);
}

.certv-btn {
    background: #fff;
    color: #1a56db;
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, background .15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0,0,0,.2);
}

.certv-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.25);
    background: #f0f6ff;
}

.certv-btn:disabled { opacity: .7; cursor: not-allowed; }

.certv-hint {
    font-size: 12px;
    color: rgba(255,255,255,.55);
    margin: 14px 0 0;
}

/* ---- Spinner ---- */
.certv-spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(26,86,219,.2);
    border-top-color: #1a56db;
    border-radius: 50%;
    animation: certv-spin .7s linear infinite;
    display: inline-block;
}

@keyframes certv-spin { to { transform: rotate(360deg); } }

/* ---- Fade-in animation ---- */
.certv-fade-in {
    animation: certv-fadein .4s ease-out;
}

@keyframes certv-fadein {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Result card ---- */
.certv-card-wrap {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,.10);
    border: 1px solid #e8edf5;
}

.certv-verified-badge {
    background: linear-gradient(90deg, #16a34a, #15803d);
    color: #fff;
    text-align: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .3px;
}

/* ---- Profile row ---- */
.certv-profile {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px 28px 20px;
    border-bottom: 1px solid #f0f4f8;
}

.certv-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a56db, #6366f1);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 1px;
}

.certv-name {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin: 0 0 6px;
}

.certv-id-badge {
    background: #eff6ff;
    color: #1a56db;
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .5px;
    font-family: monospace;
}

/* ---- Details grid ---- */
.certv-details-grid {
    padding: 8px 0;
}

.certv-detail-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 28px;
    border-bottom: 1px solid #f7f8fa;
    transition: background .15s;
}

.certv-detail-row:last-child { border-bottom: none; }
.certv-detail-row:hover { background: #fafbff; }

.certv-detail-icon {
    font-size: 18px;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.certv-detail-label {
    font-size: 13px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .5px;
    width: 130px;
    flex-shrink: 0;
}

.certv-detail-value {
    font-size: 15px;
    color: #1a1a2e;
    font-weight: 500;
    flex: 1;
}

/* ---- Download button ---- */
.certv-dl-wrap {
    padding: 20px 28px 24px;
    text-align: center;
}

.certv-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #1a56db, #4f46e5);
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 12px;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 700;
    transition: transform .15s, box-shadow .15s;
    box-shadow: 0 4px 16px rgba(26,86,219,.35);
    letter-spacing: .2px;
}

.certv-dl-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(26,86,219,.45);
    color: #fff !important;
}

/* ---- Error card ---- */
.certv-error-card {
    background: #fff;
    border-radius: 18px;
    text-align: center;
    padding: 40px 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,.09);
    border: 1px solid #fee2e2;
}

.certv-error-icon { font-size: 48px; margin-bottom: 12px; }

.certv-error-card h3 {
    font-size: 20px;
    color: #b91c1c;
    margin: 0 0 8px;
}

.certv-error-card p {
    color: #555;
    font-size: 15px;
    margin: 0 0 6px;
}

.certv-error-hint {
    color: #aaa !important;
    font-size: 13px !important;
}

/* ---- Responsive ---- */
@media (max-width: 560px) {
    .certv-hero { padding: 36px 20px 32px; }
    .certv-hero-title { font-size: 20px; }
    .certv-search-box { flex-direction: column; align-items: stretch; }
    .certv-input-wrap { max-width: 100%; }
    .certv-btn { justify-content: center; }
    .certv-profile { flex-direction: column; text-align: center; }
    .certv-detail-label { width: 100px; }
    .certv-detail-row { padding: 11px 18px; }
}
