* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
  "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.mobile-menu { display: none; }
.mobile-menu.active { display: block; }

.card-hover { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.card-hover:hover { transform: translateY(-5px); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.05); }

.badge { position: absolute; top: 10px; right: 10px; padding: 4px 12px; border-radius: 9999px; font-size: 12px; font-weight: 600; color: #fff; }
.badge-red { background: #ef4444; }
.badge-green { background: #10b981; }
.badge-blue { background: #3b82f6; }
.badge-orange { background: #f97316; }

.equal-card { height: 100%; display: flex; flex-direction: column; }
.equal-body { flex: 1; display: flex; flex-direction: column; }
.bottom-stack { margin-top: auto; }

/* =========================================
   MODAL FIXES
   ========================================= */
.modal {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.85); overflow-y: auto; padding: 20px;
}
.modal.active { display: flex; align-items: flex-start; justify-content: center; }

.modal-content {
  width: 100%; max-width: 560px; background: #fff; border-radius: 14px;
  padding: 24px; position: relative; margin: 5vh auto; 
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.fade-in { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.show { opacity: 1; transform: translateY(0); }

.exam-option { border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px 12px; cursor: pointer; transition: all 0.2s ease; }
.exam-option:hover { border-color: #2563eb; background: #eff6ff; }
.exam-option input { margin-right: 8px; }

.tri-line .l2, .tri-line .l3 { font-size: 12px; color: #6b7280; margin-top: 2px; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #3b82f6; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #2563eb; }

/* =========================================
   PRO ANIMATIONS
   ========================================= */
.btn-pro {
  position: relative; overflow: hidden; transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
  z-index: 1; transform: translateZ(0); backface-visibility: hidden;
}
.btn-pro::after {
  content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-25deg); animation: shine 3s infinite; z-index: -1;
}
@keyframes shine { 0% { left: -100%; } 20% { left: 200%; } 100% { left: 200%; } }
.btn-pro:hover { transform: translateY(-3px) translateZ(0); box-shadow: 0 10px 20px -5px rgba(0,0,0,0.25); }
.btn-pro:active { transform: translateY(1px) translateZ(0); }

.ultra-pro-card { transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important; border: 1px solid rgba(229, 231, 235, 1); }
.ultra-pro-card:hover {
  transform: translateY(-12px) !important; border-color: transparent;
  box-shadow: 0 0 0 2px #8b5cf6, 0 25px 50px -12px rgba(139, 92, 246, 0.4) !important; z-index: 10;
}

.text-gradient-pro {
  background: linear-gradient(to right, #2563eb, #8b5cf6, #ec4899, #2563eb); background-size: 300% auto;
  color: transparent; -webkit-background-clip: text; background-clip: text; animation: textShine 4s linear infinite;
}
@keyframes textShine { to { background-position: 300% center; } }

/* =========================================
   PREMIUM CERTIFICATE CSS
   ========================================= */
.font-playfair { font-family: 'Playfair Display', serif; }
.font-lora { font-family: 'Lora', serif; }
.font-cursive { font-family: 'Great Vibes', cursive; }
.font-montserrat { font-family: 'Montserrat', sans-serif; }
.text-navy { color: #021a40; }
.text-gold { color: #b08d42; }

.cert-wrapper { width: 100%; min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 40px 20px 100px 20px; overflow-x: auto; }
.cert-outer { width: 950px; min-width: 950px; height: 670px; background: linear-gradient(to bottom, #021a40 50%, #b08d42 50%); padding: 26px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); position: relative; margin: auto; }
.cert-inner { background-color: #ffffff; background-image: url("data:image/svg+xml,%3Csvg width='60' height='103.9' viewBox='0 0 60 103.9' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 51.9l-15-8.6v-17.3L30 17.3l15 8.6v17.3L30 51.9zM0 103.9l-15-8.6V78l15-8.6 15 8.6v17.3L0 103.9zm60 0l-15-8.6V78l15-8.6 15 8.6v17.3L60 103.9z' fill='%23f1f5f9' fill-opacity='0.4' fill-rule='evenodd'/%3E%3C/svg%3E"); width: 100%; height: 100%; position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 60px; }
.cert-border { position: absolute; top: 15px; left: 15px; right: 15px; bottom: 15px; border: 2px solid #b08d42; pointer-events: none; }
.cert-border::before { content: ''; position: absolute; top: 6px; left: 6px; right: 6px; bottom: 6px; border: 1px solid #b08d42; }
.cert-corner { position: absolute; width: 16px; height: 16px; border: 2px solid #b08d42; background: #fff; z-index: 2; }
.cert-corner.tl { top: -8px; left: -8px; }
.cert-corner.tr { top: -8px; right: -8px; }
.cert-corner.bl { bottom: -8px; left: -8px; }
.cert-corner.br { bottom: -8px; right: -8px; }

.cert-title { font-size: 56px; letter-spacing: 2px; margin-bottom: -5px; }
.cert-subtitle { font-size: 26px; letter-spacing: 2px; margin-bottom: 25px; font-weight: 600; }
.cert-presented { font-size: 18px; margin-bottom: 12px; font-weight: 600; }
.cert-name { font-size: 46px; letter-spacing: 1px; margin-bottom: 15px; }
.cert-divider { width: 85%; height: 1.5px; background-color: #b08d42; margin: 0 auto 20px auto; }
.cert-body { font-size: 16px; text-align: center; line-height: 1.7; max-width: 85%; margin-bottom: 30px; font-weight: 600; }
.cert-footer { width: 85%; display: flex; justify-content: space-between; align-items: flex-end; margin-top: auto; }
.sig-block { text-align: center; width: 180px; }
.sig-line { width: 100%; height: 1px; background-color: #021a40; margin-bottom: 5px; }
.sig-name { font-size: 14px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 2px; font-weight: 700; }
.sig-title { font-size: 13px; font-weight: 500; }

.seal-container { position: relative; display: flex; justify-content: center; align-items: center; transform: translateY(15px); }
.seal { width: 95px; height: 95px; background: radial-gradient(circle, #fde047 0%, #d97706 100%); border-radius: 50%; border: 4px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.2); z-index: 2; display: flex; justify-content: center; align-items: center; }
.seal::before { content: ''; position: absolute; inset: 4px; border: 1px dashed #b45309; border-radius: 50%; }
.ribbon { position: absolute; bottom: -25px; width: 26px; height: 50px; background: linear-gradient(to bottom, #d97706, #fcd34d); z-index: 1; }
.ribbon.left { left: 14px; transform: rotate(20deg); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%); }
.ribbon.right { right: 14px; transform: rotate(-20deg); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%); }

@media print {
  @page { size: A4 landscape; margin: 0; }
  body * { visibility: hidden; }
  #certModal, #certModal * { visibility: visible; }
  #certModal { position: absolute; left: 0; top: 0; width: 100vw; height: 100vh; background: white !important; align-items: center; justify-content: center; display: flex; }
  .no-print { display: none !important; }
  .cert-outer { box-shadow: none !important; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; transform: scale(1) !important; margin: 0 !important; }
  .cert-wrapper { padding: 0 !important; }
}