/* ============================================
   Certificate Verification - Premium UI
   arabianinfotech.sa
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --gold: #d4a017;
    --gold-dk: #b8860b;
    --gold-lite: #fcf6e5;
    --maroon: #7b1c2e;
    --maroon-dk: #5a1020;
    --maroon-lite: #f8eef0;
    --bg: #f8f9fa;
    --white: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 4px 6px -1px rgb(0 0 0 / 0.05);
    --shadow-md: 0 10px 25px -3px rgb(0 0 0 / 0.08);
    --shadow-lg: 0 20px 40px -4px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 20px rgba(212, 160, 23, 0.2);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

h1, h2, h3, h4, .outfit {
    font-family: 'Outfit', sans-serif;
}

/* ---- BACKGROUND DECORATIONS ---- */
.bg-shape {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}
.bg-shape-1 {
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--gold-lite) 0%, transparent 70%);
}
.bg-shape-2 {
    top: 40vh;
    left: -150px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--maroon-lite) 0%, transparent 70%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---- HEADER ---- */
.site-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 16px 0;
    box-shadow: var(--shadow-sm);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: center;
}
.site-header .logo-wrap img {
    height: 65px;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.site-header .logo-wrap img:hover {
    transform: scale(1.02);
}

/* ---- MAIN CONTENT ---- */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 0;
}

/* ---- VERIFY SECTION ---- */
.verify-section {
    width: 100%;
    max-width: 680px;
    margin: 0 auto 40px;
    text-align: center;
    padding: 0 20px;
    animation: fadeDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.badge-tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--maroon-lite);
    color: var(--maroon);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 30px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.verify-section h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 16px;
    line-height: 1.1;
    letter-spacing: -1px;
}

.verify-section .subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto 40px;
}

/* --- THE SEARCH INPUT --- */
.verify-form {
    width: 100%;
    position: relative;
    z-index: 10;
}

.input-group {
    display: flex;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 8px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.input-group:focus-within {
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: var(--gold);
    transform: translateY(-2px);
}

.input-icon {
    display: flex;
    align-items: center;
    padding: 0 16px 0 20px;
    color: var(--text-muted);
}

.input-group input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text-main);
    outline: none;
    padding: 16px 0;
}

.input-group input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.input-group button {
    background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-dk) 100%);
    color: var(--white);
    border: none;
    padding: 0 32px;
    border-radius: var(--radius-md);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-group button:hover {
    box-shadow: 0 8px 20px rgba(123, 28, 46, 0.3);
    transform: scale(1.02);
}

.input-group button:disabled {
    opacity: 0.8;
    cursor: wait;
    transform: none;
}

/* CSS Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 0.8s linear infinite;
}

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

/* ---- AJAX RESULTS CONTAINER ---- */
.result-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.slide-up-fade {
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
    0% { opacity: 0; transform: translateY(-20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ERROR CARD */
.error-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    border: 1px solid #fee2e2;
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.08);
}
.icon-circle {
    width: 80px;
    height: 80px;
    background: #fee2e2;
    color: #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.icon-circle svg {
    width: 40px;
    height: 40px;
}
.error-card h3 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 8px;
}
.error-card p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 24px;
}
.btn-retry {
    background: #f1f5f9;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-family: inherit;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
}
.btn-retry:hover {
    background: #e2e8f0;
}

/* SUCCESS CARD */
.success-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    position: relative;
}

.success-card .ribbon {
    position: absolute;
    top: 24px;
    right: -32px;
    background: #10b981;
    color: white;
    padding: 6px 40px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transform: rotate(45deg);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 10;
}

.success-card .card-header {
    background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-dk) 100%);
    padding: 30px 40px;
    position: relative;
    overflow: hidden;
}

.success-card .card-header::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: url('data:image/svg+xml;utf8,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h40v40H0V0zm20 20h20v20H20V20zM0 20h20v20H0V20z" fill="rgba(255,255,255,0.03)"/></svg>');
}

.header-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 16px;
}

.check-icon-wrap {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    backdrop-filter: blur(4px);
}
.check-icon-wrap svg {
    width: 26px;
    height: 26px;
}

.header-content h2 {
    color: var(--white);
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.success-card .card-body {
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.success-card .card-body.has-photo {
    display: grid;
    grid-template-columns: 140px 1fr;
    grid-template-rows: auto auto;
    gap: 32px 40px;
}

.student-profile {
    grid-column: 1;
    grid-row: 1;
}
.student-profile img {
    width: 140px;
    height: 140px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: var(--shadow-md);
    border: 4px solid var(--white);
    background: #f1f5f9;
}

.info-grid {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.success-card .card-body:not(.has-photo) .info-grid {
    grid-column: 1 / -1;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.info-item.full-width {
    grid-column: 1 / -1;
}

.info-item label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.info-item span {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.info-item span.highlight {
    color: var(--maroon);
    font-family: monospace;
    font-size: 1.2rem;
    padding: 4px 10px;
    background: var(--maroon-lite);
    border-radius: 6px;
    display: inline-block;
    width: fit-content;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ecfdf5;
    color: #059669 !important;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.95rem !important;
    border: 1px solid #a7f3d0;
    width: fit-content;
}
.status-badge .dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 6px #10b981;
}

/* Certificate Preview Box */
.cert-image-wrap {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 10px;
    border-top: 1px solid var(--border);
    padding-top: 32px;
}
.cert-image-wrap label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 16px;
}

.cert-preview-box {
    display: block;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    background: #f8fafc;
    transition: all 0.3s ease;
}
.cert-preview-box img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    display: block;
    transition: transform 0.5s ease;
}
.cert-preview-box .overlay {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: rgba(123, 28, 46, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}
.cert-preview-box .overlay span {
    color: white;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    background: rgba(255,255,255,0.2);
    padding: 12px 24px;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.4);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}
.cert-preview-box:hover {
    box-shadow: var(--shadow-lg);
}
.cert-preview-box:hover img {
    transform: scale(1.03);
}
.cert-preview-box:hover .overlay {
    opacity: 1;
}
.cert-preview-box:hover .overlay span {
    transform: translateY(0);
}


/* ---- ABOUT SECTION / LOGOS ---- */
.about-section {
    width: 100%;
    position: relative;
    padding: 60px 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.about-card {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 60px;
    align-items: center;
}

.section-tag {
    color: var(--gold);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.about-text h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: 24px;
}

.accent-line {
    width: 60px;
    height: 4px;
    background: var(--maroon);
    border-radius: 2px;
    margin-bottom: 24px;
}

.about-text p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.partners-container {
    background: #f8fafc;
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.partner-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.partner-item {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* aspect-ratio: 3/2; */
    box-shadow: var(--shadow-sm);
    border: 1px solid #f1f5f9;
}

.hover-float {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-float:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--gold-lite);
}

.partner-item img {
    max-width: 100%;
    /* max-height: 45px; */
    object-fit: contain;
    filter: none;
    transition: all 0.3s ease;
}
/*.partner-item:hover img {*/
/*    filter: grayscale(0%) opacity(1);*/
/*}*/

.partner-item.iec { background: #003087; }
.partner-item.iec img { filter: brightness(10); }
.partner-item.iec:hover img { filter: brightness(10) drop-shadow(0 0 4px rgba(255,255,255,0.5)); }

.fallback-logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    color: var(--maroon);
    font-size: 1rem;
    text-align: center;
    line-height: 1.2;
}
.fallback-logo.sm { font-size: 0.75rem; color: var(--text-muted); }
.fallback-logo.red { color: #c00; }
.fallback-logo.iec-text { color: white; font-size: 1.5rem; }


/* ---- FOOTER ---- */
.site-footer {
    background: var(--text-main);
    color: #94a3b8;
    padding: 24px 0;
    border-top: 4px solid var(--maroon);
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}
.admin-link {
    color: #cbd5e1;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: color 0.2s;
}
.admin-link:hover {
    color: var(--gold);
}


/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
    .about-card {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .about-text {
        text-align: center;
    }
    .accent-line {
        margin: 0 auto 24px;
    }
    .verify-section h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .verify-section h1 { font-size: 2.2rem; }
    .input-group { flex-direction: column; padding: 12px; gap: 12px; border-radius: var(--radius-md); }
    .input-group input { padding: 12px; text-align: center; }
    .input-icon { display: none; }
    .input-group button { padding: 16px; width: 100%; border-radius: var(--radius-sm); }
    
    .success-card .card-body.has-photo {
        grid-template-columns: 1fr;
    }
    .student-profile {
        display: flex;
        justify-content: center;
    }
    .student-profile img {
        width: 100px;
        height: 100px;
    }
    .info-grid {
        grid-template-columns: 1fr;
    }
    .partner-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}


.login-footer{
    color: #404040 !important;
    font-size: 12px !important;
    text-align: center !important;
    margin-top: 20px !important;
}

.login-footer a{
    color: #404040 !important;
    font-size: 12px !important;
    text-align: center !important;
    margin-top: 20px !important;
}
