/**
 * Digital India Yug — Certificate Verification & Download Stylesheet
 * Tricolor Theme & Exact 1:1 Canvas Coordinates (1123px x 794px)
 */

/* ==========================================================================
   1. HERO SECTION
   ========================================================================== */
.cert-hero {
  position: relative;
  background-color: #0a284b;
  background-image: url('../images/banners/portal-hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #ffffff;
  padding: 4rem 0 3.5rem;
  text-align: center;
  overflow: hidden;
}

.cert-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10, 40, 75, 0.88) 0%, rgba(15, 61, 110, 0.82) 50%, rgba(10, 40, 75, 0.90) 100%);
  pointer-events: none;
  z-index: 1;
}

.cert-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #FF9933 0%, #FFFFFF 50%, #138808 100%);
  z-index: 3;
}

.cert-hero .container {
  position: relative;
  z-index: 2;
}

.cert-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  padding: 0.35rem 1rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.cert-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
  animation: certPulse 2s infinite;
}

@keyframes certPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.cert-hero__title {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 800;
  color: #ffffff !important;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.cert-hero__subtitle {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.92) !important;
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.6;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}


/* ==========================================================================
   2. MAIN LOOKUP CONTAINER
   ========================================================================== */
.cert-lookup-section {
  background: var(--bg-page);
  padding: 3.5rem 0 5rem;
}

.cert-lookup-container {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem 2.5rem;
  max-width: 580px;
  margin: 0 auto;
  box-shadow: 0 10px 35px rgba(10, 40, 75, 0.08);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.cert-lookup-card__stripe {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #FF9933 0%, #FF9933 33%, #ffffff 33%, #ffffff 66%, #138808 66%, #138808 100%);
}

.download-counter-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.cert-lookup-emblem {
  margin-bottom: 1rem;
}

.cert-lookup-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: #0a284b;
  margin: 0 0 0.5rem;
}

.cert-lookup-instruction {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0 0 1.75rem;
}


/* ==========================================================================
   3. INPUT & BUTTONS
   ========================================================================== */
.cert-input-wrap {
  margin-bottom: 1.25rem;
}

.cert-input-field {
  width: 100%;
  padding: 1rem 1.25rem;
  font-family: monospace, var(--font-family);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #0a284b;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-sm);
  text-align: center;
  text-transform: uppercase;
  transition: var(--transition);
  box-sizing: border-box;
}

.cert-input-field:focus {
  outline: none;
  border-color: #0a284b;
  box-shadow: 0 0 0 4px rgba(10, 40, 75, 0.12);
  background: #fdfdfd;
}

.cert-input-field::placeholder {
  font-family: var(--font-family);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: normal;
  color: #94a3b8;
  text-transform: none;
}

.download-cert-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  background: linear-gradient(135deg, #15803d 0%, #166534 100%);
  color: #ffffff;
  font-family: var(--font-family);
  font-size: 1.05rem;
  font-weight: 800;
  padding: 1.05rem 1.75rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(21, 128, 61, 0.35);
  transition: var(--transition);
  letter-spacing: 0.5px;
}

.download-cert-btn:hover {
  background: linear-gradient(135deg, #166534 0%, #14532d 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(21, 128, 61, 0.45);
}

.download-cert-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
  background: #64748b !important;
}

.status-feedback-msg {
  min-height: 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
  line-height: 1.4;
  transition: all 0.25s ease;
}

.status-feedback-msg--success {
  color: #15803d;
}

.status-feedback-msg--error {
  color: #dc2626;
}

.status-feedback-msg--info {
  color: #0284c7;
}

.contact-support-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  background: #0a284b;
  color: #ffffff !important;
  text-decoration: none !important;
  font-family: var(--font-family);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.9rem 1.5rem;
  border-radius: var(--radius-sm);
  margin-top: 1rem;
  transition: var(--transition);
  box-sizing: border-box;
}

.contact-support-btn:hover {
  background: #071931;
  transform: translateY(-1px);
}

.cert-security-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.75rem;
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 500;
}


/* ==========================================================================
   4. OFF-SCREEN CANVAS RENDERING SANDBOX (1402px x 1122px - Native High-Res)
   ========================================================================== */
#certificate-render-sandbox {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1402px;
  height: 1122px;
  background-size: 1402px 1122px;
  background-repeat: no-repeat;
  background-position: center;
  font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
  user-select: none;
  box-sizing: border-box;
}

.cert-dynamic-name {
  position: absolute;
  width: 100%;
  text-align: center;
  top: 575px;
  left: 0;
  font-size: 46px;
  font-weight: 800;
  color: #0d2c54;
  line-height: 1;
  letter-spacing: 0.5px;
  font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
}

.cert-id-line {
  position: absolute;
  left: 830px;
  top: 890px;
  font-size: 18px;
  font-weight: 600;
  color: #475569;
  text-align: left;
  line-height: 1.4;
  font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
}

.cert-date-line {
  position: absolute;
  left: 830px;
  top: 935px;
  font-size: 18px;
  font-weight: 600;
  color: #475569;
  text-align: left;
  line-height: 1.4;
  font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
}

.cert-id-line strong,
.cert-date-line strong {
  font-weight: 800;
  color: #0a284b;
}

.cert-id-line strong {
  font-family: monospace, Arial, sans-serif;
  font-size: 19px;
  letter-spacing: 0.5px;
}


/* ==========================================================================
   5. RESPONSIVE
   ========================================================================== */
@media (max-width: 640px) {
  .cert-lookup-container {
    padding: 2.25rem 1.25rem 2rem;
  }
  .cert-hero__title {
    font-size: 1.8rem;
  }
  .cert-input-field {
    font-size: 1rem;
    padding: 0.85rem 1rem;
  }
  .download-cert-btn {
    font-size: 0.95rem;
    padding: 0.95rem 1.25rem;
  }
}
