:root {
  --bg: #f4f7fb;
  --surface: rgba(255,255,255,0.95);
  --text: #14213d;
  --muted: #64748b;
  --border: rgba(20, 33, 61, 0.1);
  --shadow: 0 1rem 2.25rem rgba(20, 33, 61, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #f5f7fb, #e8eef8);
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }

.page {
  width: 92%; 
  max-width: 1200px; 
  margin: 0 auto;
  padding: 4% 0; 
}

.hero {
  border-radius: 1.25rem;
  padding: 6% 5%; 
  margin-bottom: 5%;
  color: white;
  box-shadow: var(--shadow);
}
.hero h1 { 
  margin: 0 0 0.5rem; 
  font-size: clamp(1.4rem, 5vw, 2.2rem); 
}
.hero p { 
  margin: 0; 
  line-height: 1.5; 
  opacity: 0.95;
  font-size: clamp(0.9rem, 3.5vw, 1.05rem);
}
.hero.certificates { background: linear-gradient(-120deg, #00812c, #005c86, #071f9e); }
.hero.coursera { background: linear-gradient(135deg, #0056d2, #000); }
.hero.forage { background: linear-gradient(135deg, #114178, #000); }
.hero.infosys { background: linear-gradient(135deg, #007cc3, #000); }
.hero.linkedin { background: linear-gradient(135deg, #0a66c2, #000); }
.hero.oracle { background: linear-gradient(135deg, #c74634, #000); }
.hero.udemy { background: linear-gradient(135deg, #a435f0, #000); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); 
  gap: 1rem;
  padding-right: 0.25rem;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.home-card {
  padding: 1rem;
}
.certificate-card {
  padding: 0.5rem; 
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 1.25rem 2.3rem rgba(20, 33, 61, 0.12);
}

.preview {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255,255,255,0.85), rgba(255,255,255,0.25));
}
.home-preview {
  flex-grow: 1;         /* Allows it to expand to fill the entire container height */
  min-height: 180px;     /* Increased baseline height since the text area is gone */
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 0;      /* Removed margin since there is no text below it anymore */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.certificate-preview {
  width: 100%;
  max-width: 100%;
  min-height: 220px;
  max-height: 320px;
  aspect-ratio: 4 / 3;
  border-radius: 0.75rem;
  padding: 0;
  margin: 0; 
  display: block;
}

.preview-link-overlay {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  z-index: 1;
}

.preview-link-overlay object {
  pointer-events: none;
  width: 100%;
  height: 100%;
  border: none;
}

/* --- 45-degree angle gradient targeting the top-right corner --- */
.certificate-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Darkest zone anchors in the top-right corner (45deg), dissolving cleanly out toward the bottom-left */
  background: linear-gradient(45deg, transparent 30%, rgba(10, 17, 40, 0.35) 60%, rgba(10, 17, 40, 0.8) 100%);
  z-index: 2;
  pointer-events: none;
}

.certificate-embed {
  width: 100%;
  height: 100%;
  min-height: 220px;
  max-height: 320px;
  border: 0;
  display: block;
  background: white;
}

.preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255,255,255,0.35) 50%, transparent 75%);
  transform: translateX(-120%);
  animation: sheen 3s infinite;
  z-index: 3;
  pointer-events: none;
}

.brand-card {
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
}
.brand-mark {
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: white;
  background: rgba(255,255,255,0.22);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.22);
}
.coursera-brand { background: linear-gradient(135deg, #0056d2, #000); }
.forage-brand { background: linear-gradient(135deg, #114178, #000); }
.infosys-brand { background: linear-gradient(135deg, #007cc3, #000); }
.linkedin-brand { background: linear-gradient(135deg, #0a66c2, #000); }
.oracle-brand { background: linear-gradient(135deg, #c74634, #000); }
.udemy-brand { background: linear-gradient(135deg, #a435f0, #000); }

.card span {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  color: var(--text);
  word-break: break-all;
  margin-top: auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.viewer-shell {
  background: var(--surface);
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.viewer-frame {
  width: 100%;
  min-height: 75vh;
  border: 0;
  display: block;
  background: white;
}

/* --- Repositioned Rounded Icon Button UI Properties --- */
.verify-btn {
  position: absolute;
  top: 8%;       /* Positioned top right */
  right: 8%;
  z-index: 10;
  width: 36px;   /* Perfect circular scaling */
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: background 250ms ease, box-shadow 250ms ease, transform 150ms ease;
}

/* Sizing constraints for the inner SVG icon shape */
.verify-btn svg {
  width: 16px;
  height: 16px;
}

/* --- Brand Specific Default States --- */
.verify-btn.coursera-btn {
  background: linear-gradient(135deg, #0056d2 0%, #000000 100%);
}
.verify-btn.forage-btn {
  background: linear-gradient(135deg, #114178 0%, #000000 100%);
}
.verify-btn.infosys-btn {
  background: linear-gradient(135deg, #007cc3 0%, #000000 100%);
}
.verify-btn.linkedin-btn {
  background: linear-gradient(135deg, #0a66c2 0%, #000000 100%);
}
.verify-btn.oracle-btn {
  background: linear-gradient(135deg, #c74634 0%, #000000 100%);
}
.verify-btn.udemy-btn {
  background: linear-gradient(135deg, #a435f0 0%, #000000 100%);
}

/* --- Brand Specific Hover Actions --- */
.verify-btn.coursera-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(0, 86, 210, 0.5);
  background: #0056d2; 
}
.verify-btn.forage-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(17, 65, 120, 0.5);
  background: #114178; 
}
.verify-btn.infosys-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(0, 124, 195, 0.5);
  background: #007cc3; 
}
.verify-btn.linkedin-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(10, 102, 194, 0.5);
  background: #0a66c2; 
}
.verify-btn.oracle-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(199, 70, 52, 0.5);
  background: #c74634; 
}
.verify-btn.udemy-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(164, 53, 240, 0.5);
  background: #a435f0; 
}

@keyframes sheen { to { transform: translateX(120%); } }

@media (min-width: 48rem) {
  .page { padding: 24px 0; }
  .hero { padding: 32px; margin-bottom: 24px; }
}