/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:        #1A56DB;
  --primary-hover:  #1447C0;
  --primary-light:  #EFF6FF;
  --purple:         #7C3AED;
  --purple-light:   #F5F3FF;
  --green:          #059669;
  --green-light:    #ECFDF5;
  --red:            #DC2626;
  --red-light:      #FEF2F2;
  --bg:             #F1F5F9;
  --surface:        #FFFFFF;
  --border:         #E2E8F0;
  --text:           #0F172A;
  --text-mid:       #475569;
  --text-soft:      #94A3B8;
  --shadow-sm:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:      0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg:      0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.05);
  --shadow-xl:      0 20px 25px -5px rgba(0,0,0,.10), 0 10px 10px -5px rgba(0,0,0,.04);
  --radius-sm:      8px;
  --radius-md:      12px;
  --radius-lg:      20px;
  --radius-xl:      28px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-icon { display: flex; align-items: center; }

.brand-name {
  font-size: 1.2rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.brand-name strong { color: var(--primary); font-weight: 700; }

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-mid);
  transition: background 0.2s, color 0.2s;
}
.nav-link:hover { background: var(--bg); color: var(--text); }
.nav-link.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }

/* ===== PAGE SYSTEM ===== */
.page { display: none; flex: 1; }
.page.active { display: block; }

/* ===== CONTAINER ===== */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #EFF6FF 0%, #F0F9FF 50%, #F5F3FF 100%);
  padding: 80px 2rem 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
}

.hero-content {
  max-width: 480px;
}

.badge {
  display: inline-block;
  padding: 4px 14px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid #BFDBFE;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-mid);
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero .btn { margin-right: 12px; margin-bottom: 12px; }

/* Diploma visual card */
.hero-visual {
  flex-shrink: 0;
}

.diploma-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  width: 280px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.diploma-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--purple-light));
  opacity: 0.6;
}

.diploma-seal {
  position: relative;
  z-index: 1;
}

.diploma-text { text-align: center; }
.diploma-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.diploma-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}
.diploma-year { font-size: 0.85rem; color: var(--primary); font-weight: 500; margin-top: 4px; }

.diploma-stamp {
  font-size: 0.7rem;
  color: var(--text-soft);
  letter-spacing: 0.06em;
  padding: 6px 12px;
  border: 1px dashed var(--border);
  border-radius: 100px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(26,86,219,0.35);
}
.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26,86,219,0.4);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
  background: var(--border);
  border-color: var(--border);
  color: var(--text-soft);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-outline {
  background: white;
  color: var(--primary);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-outline:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.btn-block { width: 100%; margin-top: 16px; }

/* ===== FEATURES SECTION ===== */
.features {
  padding: 80px 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 12px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-mid);
  font-size: 1.05rem;
  margin-bottom: 48px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.icon-blue  { background: var(--primary-light); color: var(--primary); }
.icon-purple { background: var(--purple-light); color: var(--purple); }
.icon-green  { background: var(--green-light);  color: var(--green); }

.card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.card p  { font-size: 0.9rem; color: var(--text-mid); line-height: 1.6; }

/* ===== DIPLOMA INFO SECTION ===== */
.diploma-section { padding: 0 0 80px; }

.diploma-info-card {
  background: linear-gradient(135deg, var(--primary), var(--purple));
  border-radius: var(--radius-xl);
  padding: 48px;
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  color: white;
  box-shadow: var(--shadow-xl);
}

.diploma-info-text { flex: 1; min-width: 280px; }
.diploma-info-text h2 { font-size: 1.6rem; font-weight: 700; margin-bottom: 16px; line-height: 1.3; }
.diploma-info-text p  { opacity: 0.9; line-height: 1.7; margin-bottom: 24px; }

.diploma-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.diploma-list li { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; }
.check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.diploma-info-visual {
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
}

.stat-block {
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  text-align: center;
  min-width: 180px;
}
.stat-number {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.stat-label { font-size: 0.8rem; opacity: 0.85; }

/* ===== PAGE CONTENT (pages 2 & 3) ===== */
.page-content { padding: 48px 1.5rem 80px; }

.page-header {
  text-align: center;
  margin-bottom: 40px;
}
.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.page-header p { color: var(--text-mid); font-size: 1rem; max-width: 560px; margin: 0 auto; }

/* ===== FORM CARD ===== */
.form-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 40px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

/* ===== STEPS ===== */
.step { display: none; }
.step.active { display: block; }

.step-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}

.step-number {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid #BFDBFE;
}
.step-number.verif {
  background: var(--green-light);
  color: var(--green);
  border-color: #A7F3D0;
}

.step-header h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.step-header p  { font-size: 0.9rem; color: var(--text-mid); }

/* ===== DROP ZONE ===== */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 16px;
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.drop-zone-icon { margin-bottom: 12px; }
.drop-zone-title { font-weight: 600; color: var(--text); margin-bottom: 4px; }
.drop-zone-sub { font-size: 0.85rem; color: var(--text-soft); }

/* ===== FILE PREVIEW ===== */
.file-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--primary-light);
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}
.file-preview.hidden { display: none; }

.file-preview-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: white;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.file-preview-info { flex: 1; min-width: 0; }
.file-name { font-weight: 600; font-size: 0.9rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-size { font-size: 0.8rem; color: var(--text-mid); }

.file-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-soft);
  font-size: 1rem;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}
.file-remove:hover { color: var(--red); background: var(--red-light); }

/* ===== FORM ===== */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.12);
}
.form-group input::placeholder { color: var(--text-soft); }

.form-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 8px; }

/* ===== RESULT STATES ===== */
.result-loading {
  text-align: center;
  padding: 48px 24px;
}
.result-loading p { color: var(--text-mid); margin-top: 16px; font-weight: 500; }
.result-sub { font-size: 0.85rem; color: var(--text-soft); margin-top: 4px !important; font-weight: 400 !important; }

.spinner {
  width: 52px; height: 52px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.result-success, .result-error {
  text-align: center;
  padding: 40px 24px;
}
.result-success.hidden, .result-error.hidden { display: none; }

.result-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.result-icon.success { background: var(--green-light); color: var(--green); }
.result-icon.error   { background: var(--red-light);   color: var(--red); }

.result-success h2 { color: var(--green); font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.result-error h2   { color: var(--red);   font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.result-success p, .result-error p { color: var(--text-mid); margin-bottom: 24px; }

.result-details {
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 20px auto;
  max-width: 460px;
  text-align: left;
  border: 1px solid var(--border);
}

.result-row {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.result-row:last-child { border-bottom: none; }
.result-key { font-weight: 600; color: var(--text); min-width: 160px; flex-shrink: 0; }
.result-value { color: var(--text-mid); word-break: break-all; }

/* ===== VERIF SECTIONS ===== */
.verif-section { display: none; }
.verif-section.active { display: block; }

/* ===== INFO BANNER ===== */
.info-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-top: 20px;
  color: #92400E;
}
.info-banner svg { flex-shrink: 0; margin-top: 2px; }
.info-banner p { font-size: 0.875rem; line-height: 1.6; }

/* ===== FOOTER ===== */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 24px 2rem;
  margin-top: auto;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-brand { display: flex; align-items: baseline; gap: 10px; }
.footer-tagline { font-size: 0.8rem; color: var(--text-soft); }
.footer-copy { font-size: 0.8rem; color: var(--text-soft); }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .navbar { padding: 0 1rem; }
  .nav-link { padding: 7px 10px; font-size: 0.82rem; }
  .hero { padding: 48px 1rem 40px; gap: 40px; }
  .diploma-card { width: 100%; max-width: 280px; }
  .form-card { padding: 24px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .diploma-info-card { padding: 32px 24px; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
}
