@font-face { font-family: CertificateVazir; src: url('../Fonts/certificates-vazir-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: CertificateVazir; src: url('../Fonts/certificates-vazir-700.woff2') format('woff2'); font-weight: 600 900; font-display: swap; }
.certificates {
    --cert-bg: #0d1c2e;
    --cert-text: #f2f6ff;
    --cert-muted: #b5c4d7;
    --cert-accent: #a6caec;
    --cert-gold: #d9bd8b;
    direction: rtl;
    color: var(--cert-text);
    background: radial-gradient(ellipse at 95% 0, #29496666 0, transparent 30%), radial-gradient(ellipse at 0 30%, #b3966520 0, transparent 32%), linear-gradient(180deg, #14283e, var(--cert-bg) 45%, #142638);
    font-family: CertificateVazir, Vazir, sans-serif;
    isolation: isolate;
}
@supports (color: oklch(81% .075 80)) {
    .certificates { --cert-gold: oklch(81% .075 80); }
}
.certificates *, .certificates *::before, .certificates *::after { box-sizing: border-box; }
.certificates h1, .certificates h2, .certificates h3 { color: var(--cert-text); font-family: CertificateVazir, Vazir, sans-serif; letter-spacing: 0; }
.certificates a { color: inherit; text-decoration: none; }
.certificates a:focus-visible, .certificates button:focus-visible { outline: 3px solid #ffce81; outline-offset: 6px; }
.cert-wrap { width: min(1180px, calc(100% - 80px)); margin-inline: auto; }
.cert-hero { position: relative; padding: 32px 0 0; overflow: hidden; border-bottom: 1px solid #ffffff16; background: radial-gradient(ellipse at 22% 35%, #aa936b16, transparent 55%); }
.cert-hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(#a6c2de09 1px, transparent 1px), linear-gradient(90deg, #a6c2de09 1px, transparent 1px);
    background-size: 64px 64px; mask-image: linear-gradient(#000, transparent);
}
.cert-breadcrumb { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--cert-muted); position: relative; }
.cert-hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; align-items: center; gap: 60px; min-height: 500px; padding: 65px 0 60px; position: relative; }
.cert-eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--cert-accent); font-size: 12px; font-weight: 600; margin-bottom: 23px; }
.cert-eyebrow > span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 15px currentColor; }
.certificates .cert-hero h1 { font-size: clamp(32px, 4.4vw, 59px); font-weight: 700; line-height: 1.65; margin: 0 0 20px; }
.cert-hero h1 em { font-style: normal; color: var(--cert-gold); text-shadow: 0 3px 28px #d2b68715; }
.cert-intro { color: #bac9dd; font-size: 15px; line-height: 2.2; margin-bottom: 28px; }
.cert-button { display: inline-flex; justify-content: center; align-items: center; gap: 22px; min-height: 50px; padding: 11px 18px 11px 12px; border: 1px solid #fff6; border-radius: 12px; background: linear-gradient(135deg,#f3e7cd,#d9bd8b); color: #18293a !important; font-size: 13px; font-weight: 700; box-shadow: 0 4px 0 #927747, 0 12px 24px #020b163b, inset 0 1px 0 #fff9; transition: background .2s, box-shadow .2s; }
.cert-button:hover { background: linear-gradient(135deg,#fff3db,#e4cb9f); box-shadow: 0 4px 0 #927747, 0 15px 30px #020b1655; }
.cert-button:active { transform: scale(.98); }
.cert-button span { font-size: 20px; line-height: 1; width: 30px; height: 30px; display: grid; place-items: center; background: #13243d0b; border-radius: 8px; }
.cert-hero-art { position: relative; display: grid; place-items: center; height: 350px; perspective: 1100px; }
.cert-hero-art::after { content: ""; position: absolute; width: 310px; height: 55px; bottom: 2px; border-radius: 50%; background: radial-gradient(ellipse,#02081488,transparent 70%); filter: blur(9px); }
.cert-art-plane { position: absolute; width: 260px; height: 285px; border-radius: 25px; border: 1px solid #d9bd8b35; background: linear-gradient(135deg,#8fabca26,#3c526d12 55%,#d9bd8b15); box-shadow: 0 12px 25px #030b1a26, inset 0 1px 0 #ffffff24; transform: rotateY(-20deg) rotateZ(12deg) translate3d(-25px,-12px,-30px); }
.cert-art-plane-back { transform: rotateY(-20deg) rotateZ(-12deg) translate3d(20px,0,-65px); border-color: #a6caec22; background: linear-gradient(140deg,#54749236,#10253855); }
.cert-seal { width: 270px; height: 270px; border-radius: 50%; margin-inline: auto; display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; z-index: 1; color: var(--cert-gold); background: radial-gradient(circle at 28% 10%,#f6e7c536,transparent 55%), linear-gradient(140deg,#30475d,#172b40 65%,#2c3d4b); border: 1px solid #e3c99b8c; box-shadow: 5px 6px 0 #1d3041, 6px 7px 0 #a08b6573, inset 0 2px 1px #fff5, inset 0 -10px 25px #06121c66, 0 30px 45px #030b1a80; transform: rotateY(-12deg) rotateX(6deg); }
.cert-seal::after { content: ""; position: absolute; inset: 12px; border: 1px solid #d9bd8b46; border-radius: inherit; box-shadow: inset 0 0 0 5px #d9bd8b05; }
.cert-seal svg { width: 70px; height: 78px; margin: 15px 0; filter: drop-shadow(0 2px 0 #061220) drop-shadow(0 -1px 0 #ffe6b655); }
.cert-seal-top { font-size: 12px; }
.cert-seal strong { font-size: 20px; font-weight: 500; }
.cert-seal-bottom { font-size: 10px; margin-top: 12px; color: #c9c6bc; }
.cert-seal-orbit { position: absolute; inset: -40px; border: 1px solid #c1cfe820; border-radius: inherit; transform: rotate(-28deg) scaleY(.85); }
.cert-seal-orbit::after { content: ""; position: absolute; top: 22px; right: 50px; width: 9px; height: 9px; background: #d7b77b; border-radius: 50%; box-shadow: 0 0 25px #d7b77b99; }
.cert-art-caption { position: absolute; bottom: -14px; z-index: 2; font-size: 10px; color: #d3ddea; background: linear-gradient(135deg,#31445be6,#1b2f45ef); border: 1px solid #d4c0993b; border-radius: 8px; padding: 10px 22px; box-shadow: 0 8px 20px #020b1640, inset 0 1px 0 #ffffff18; }
.cert-hero-foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; position: relative; border-top: 1px solid #e4d3b52b; padding: 23px 0; font-size: 12px; color: var(--cert-muted); }
.cert-hero-foot strong { font-size: 23px; color: var(--cert-gold); margin-left: 6px; }
.cert-collection { padding-top: 78px; }
.cert-section-heading { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 28px; }
.cert-section-heading .cert-eyebrow { margin-bottom: 8px; }
.certificates .cert-section-heading h2 { font-size: clamp(23px, 3vw, 34px); font-weight: 600; margin: 0; line-height: 1.8; }
.cert-section-heading p { color: var(--cert-muted); line-height: 2; font-size: 12px; margin: 0 0 4px; }
.cert-index { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 9px; padding-bottom: 38px; }
.cert-index a { display: flex; align-items: center; gap: 9px; min-height: 76px; min-width: 0; border: 1px solid #b3cefa24; padding: 12px 10px; border-radius: 12px; color: #d5e0ee; background: linear-gradient(135deg,#d8eaff08,#07172a22); box-shadow: 0 4px 12px #030b1a14, inset 0 1px 0 #ffffff0b; transition: color .2s, background .2s, border-color .2s; }
.cert-index-number { color: #9fb4ca; font-size: 12px; flex-shrink: 0; }
.cert-index-label { display: flex; flex-direction: column; gap: 5px; min-width: 0; font-size: 11px; line-height: 1.8; }
.cert-index-label bdi { font-size: 10px; color: #9fb4ca; align-self: start; direction: ltr; }
.cert-index a:hover, .cert-index a[aria-current="true"] { color: #fff2da; background: linear-gradient(135deg,#d9bd8b1c,#21354c); border-color: #dac09280; }
.cert-index a[aria-current="true"] .cert-index-number { color: var(--cert-gold); }
.cert-stack { position: relative; padding-bottom: 70px; }
.cert-step { position: relative; padding-bottom: 75px; scroll-margin-top: 150px; --cert-rgb: 151,190,225; }
.cert-tone-teal { --cert-rgb: 143,191,178; }
.cert-tone-amber { --cert-rgb: 217,189,139; }
.cert-tone-rose { --cert-rgb: 160,178,206; }
.cert-tone-cyan { --cert-rgb: 151,196,210; }
.cert-tone-green { --cert-rgb: 183,199,159; }
.cert-card {
    display: grid; grid-template-columns: 1fr 1fr; gap: 45px; padding: 35px 45px;
    border-radius: 25px; position: relative; isolation: isolate; transform-origin: center top;
    background: radial-gradient(ellipse at 100% 0,rgba(var(--cert-rgb),.08),transparent 60%), linear-gradient(145deg,#2a4055fa,#14283dfc 65%);
    border: 1px solid rgba(var(--cert-rgb),.36); box-shadow: 0 5px 0 #0a192be6, 0 6px 0 #9fb8d026, 0 28px 60px #020a1770, inset 0 2px 0 #ffffff18, inset 0 -1px 0 #020a1744;
    backdrop-filter: blur(25px) saturate(150%);
}
.cert-card::before { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; padding: 1px; background: conic-gradient(from 40deg, transparent, rgba(var(--cert-rgb),.65) 60deg, transparent 130deg, rgba(var(--cert-rgb),.3) 240deg, transparent 320deg); mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask-composite: exclude; pointer-events: none; }
.cert-card::after { content: ""; position: absolute; top: -1px; right: 8%; left: 8%; height: 1px; background: linear-gradient(90deg, transparent,rgba(var(--cert-rgb),.9),transparent); pointer-events: none; }
.cert-card-copy { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.cert-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 36px; }
.cert-category { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 7px; border: 1px solid rgba(var(--cert-rgb),.2); background: rgba(var(--cert-rgb),.06); font-size: 10px; color: rgb(var(--cert-rgb)); }
.cert-category::before { content: "\2713"; font-size: 11px; }
.cert-number { font-size: 30px; line-height: 1; color: #d2c5ad; font-weight: 300; white-space: nowrap; }
.cert-number small { font-size: 12px; color: #8da2bf; }
.cert-standard { color: rgb(var(--cert-rgb)); font-size: clamp(18px,2.15vw,30px); font-weight: 600; line-height: 1.7; align-self: start; direction: ltr; }
.certificates .cert-card h3 { font-size: clamp(22px,2.5vw,33px); font-weight: 600; margin: 9px 0 20px; line-height: 1.8; }
.cert-description { color: #c6d4e3; font-size: 14px; line-height: 2.2; margin: 0 0 26px; overflow-wrap: anywhere; }
.cert-meta { display: flex; flex-wrap: wrap; gap: 20px 30px; border: 1px solid #ffffff12; border-radius: 10px; background: #06162723; padding: 16px 18px; margin-bottom: 26px; box-shadow: inset 0 1px 5px #04101d14; }
.cert-meta dt { color: #a5b8cd; font-size: 11px; font-weight: 400; margin-bottom: 5px; }
.cert-meta dd { color: #e5edf6; font-size: 12px; margin: 0; overflow-wrap: anywhere; }
.cert-button-outline { align-self: start; background: linear-gradient(135deg,#3b546c,#263e56); border-color: rgba(var(--cert-rgb),.4); color: #f1f6ff !important; font-weight: 400; box-shadow: 0 3px 0 #081a2de6, 0 8px 18px #03101c22, inset 0 1px 0 #ffffff18; }
.cert-button-outline span { background: #bdd5ef10; color: var(--cert-gold); }
.cert-button-outline:hover { background: linear-gradient(135deg,#45617c,#304c67); box-shadow: 0 3px 0 #081a2de6, 0 10px 22px #03101c33; }
.cert-document { position: relative; display: flex; justify-content: center; align-items: center; min-width: 0; padding: 22px 16px 45px; background: radial-gradient(ellipse,rgba(var(--cert-rgb),.15),transparent 72%); border-radius: 15px; perspective: 1200px; }
.cert-document::before { content: ""; position: absolute; bottom: 32px; width: 70%; height: 26px; background: radial-gradient(ellipse,#020a176b,transparent 70%); filter: blur(9px); }
.cert-document-frame { position: relative; display: inline-block; max-width: 100%; padding: 10px; border: 1px solid #eee3cc; border-radius: 5px; background: linear-gradient(135deg,#faf7f0,#d4dbe0); box-shadow: 1px 2px 0 #b8b1a4, 3px 4px 0 #596979, 0 22px 40px #020a175c, inset 0 1px 0 #fff; transform-style: preserve-3d; transition: transform .22s ease-out, box-shadow .22s ease-out; }
.cert-document-frame::before { content: ""; position: absolute; inset: 3px; border: 1px solid #aab9c9; background: #c3ced8; border-radius: 4px; transform: translate3d(7px,7px,-8px); box-shadow: 0 5px 15px #0002; }
.cert-document-frame::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(ellipse at var(--cert-shine-x,15%) var(--cert-shine-y,5%),#ffffff16,transparent 70%); pointer-events: none; }
.cert-document img { position: relative; display: block; width: auto; max-width: 100%; height: 420px; object-fit: contain; border-radius: 1px; background: #fff; box-shadow: 0 0 0 1px #64707d20; }
.cert-document-hint { position: absolute; bottom: 5px; font-size: 10px; color: #d4e0ec; display: inline-flex; gap: 8px; align-items: center; border-radius: 20px; padding: 4px 12px; background: #10233780; border: 1px solid #b3cefa16; }
.cert-document-hint > span { font-size: 17px; }
.cert-closing { text-align: center; padding: 42px 24px 48px; margin-bottom: 75px; border-radius: 22px; border: 1px solid #d9bd8b26; background: radial-gradient(ellipse at 50% 0,#d9bd8b0d,transparent 70%), linear-gradient(135deg,#ffffff06,#07182b22); box-shadow: inset 0 1px 0 #ffffff12, 0 15px 35px #04101d22; }
.cert-closing .cert-eyebrow { margin-bottom: 8px; }
.certificates .cert-closing h2 { font-size: clamp(23px,3vw,36px); line-height: 1.8; margin: 0 0 25px; }
.cert-empty { padding: 40px; color: #bdcde1; border: 1px solid #ffffff20; border-radius: 20px; }
.cert-viewer { border: 1px solid #d9bd8b60; border-radius: 16px; padding: 0; background: #152638; color: #f2f6ff; width: min(1100px,96vw); max-width: 96vw; height: 94dvh; max-height: 94dvh; overflow: hidden; box-shadow: 0 30px 100px #0008, inset 0 1px 0 #fff2; }
.cert-viewer::backdrop { background: #020814e8; backdrop-filter: blur(9px); }
.cert-viewer[open] { display: flex; flex-direction: column; }
.cert-viewer-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid #ffffff25; gap: 20px; flex-shrink: 0; }
.certificates .cert-viewer h2 { font-size: 13px; line-height: 1.8; margin: 0; }
.cert-viewer-bar > div { display: flex; align-items: center; gap: 20px; }
.cert-viewer-original { font-size: 11px; }
.cert-viewer-bar button { background: #ffffff10; color: #fff; border: 1px solid #ffffff30; border-radius: 9px; font: 28px/1 CertificateVazir,sans-serif; min-width: 44px; min-height: 44px; cursor: pointer; }
.cert-viewer-body { overflow: auto; padding: 25px; flex: 1; min-height: 0; text-align: center; overscroll-behavior: contain; }
.cert-viewer-image { width: auto; max-width: 100%; height: auto; background: white; box-shadow: 0 15px 45px #030b1a66; }
@media (min-width: 960px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .cert-document-frame { transform: translateY(var(--cert-lift,0px)) rotateX(var(--cert-tilt-x,3deg)) rotateY(var(--cert-tilt-y,-7deg)) rotateZ(-1.5deg); }
    .cert-document:hover, .cert-document:focus-visible { --cert-lift: -5px; }
    .cert-document:hover .cert-document-frame { box-shadow: 1px 2px 0 #b8b1a4, 3px 4px 0 #596979, 0 28px 45px #020a1770, inset 0 1px 0 #fff; }
}
@media (min-width: 960px) and (min-height: 740px) and (prefers-reduced-motion: no-preference) {
    .cert-step { position: sticky; top: calc(120px + var(--cert-index) * 7px); padding-bottom: 40px; }
    .cert-step:not(:last-child) { margin-bottom: 10vh; }
}
@media (max-width: 959px) {
    .cert-wrap { width: calc(100% - 40px); }
    .cert-hero-grid { gap: 30px; grid-template-columns: 1.6fr 1fr; padding: 50px 0; min-height: 400px; }
    .cert-seal { width: 210px; height: 210px; }
    .cert-hero-art { height: 285px; }
    .cert-art-plane { width: 200px; height: 230px; }
    .cert-art-caption { bottom: 0; font-size: 9px; padding: 8px 12px; }
    .cert-seal-orbit { inset: -15px; }
    .cert-seal strong { font-size: 16px; }
    .cert-seal svg { width: 50px; height: 58px; margin: 10px 0; }
    .cert-card { padding: 25px; gap: 25px; }
    .cert-document img { height: 350px; }
    .cert-document { padding-inline: 5px; }
    .cert-card-top { margin-bottom: 25px; }
    .cert-meta { gap: 18px; }
    .cert-index { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 640px) {
    .cert-wrap { width: calc(100% - 32px); }
    .cert-hero { padding-top: 20px; }
    .cert-hero-grid { display: block; min-height: 0; padding: 42px 0 30px; }
    .cert-hero-art { display: none; }
    .cert-hero h1 { font-size: 34px; }
    .cert-intro { font-size: 13px; }
    .cert-hero-foot { flex-wrap: wrap; gap: 15px; font-size: 10px; padding: 20px 0; }
    .cert-hero-foot > a { display: none; }
    .cert-collection { padding-top: 40px; }
    .cert-section-heading { display: block; }
    .cert-section-heading p { margin-top: 12px; }
    .cert-index { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding-bottom: 28px; }
    .cert-index a { min-height: 74px; padding: 10px; }
    .cert-step { padding-bottom: 26px; scroll-margin-top: 100px; }
    .cert-card { display: flex; flex-direction: column; padding: 24px 20px 16px; border-radius: 20px; gap: 16px; }
    .cert-card-top { margin-bottom: 20px; }
    .cert-standard { font-size: 22px; }
    .certificates .cert-card h3 { font-size: 23px; margin-bottom: 12px; }
    .cert-description { font-size: 12px; margin-bottom: 18px; }
    .cert-meta { margin-bottom: 20px; padding: 13px 14px; }
    .cert-document { padding: 12px 0 42px; }
    .cert-document-frame { max-width: calc(100% - 8px); padding: 7px; }
    .cert-document-frame::before { transform: translate3d(4px,4px,-8px); }
    .cert-document img { width: auto; height: auto; max-height: 440px; max-width: 100%; }
    .cert-stack { padding-bottom: 15px; }
    .cert-closing { padding: 30px 15px 35px; margin-bottom: 45px; }
    .cert-viewer-bar { padding: 10px 12px; gap: 10px; }
    .cert-viewer-bar > div { gap: 10px; }
    .cert-viewer-original { font-size: 10px; }
    .cert-viewer-body { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .certificates *, .certificates *::before, .certificates *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .cert-card, .cert-document-frame, .cert-seal, .cert-art-plane { transform: none !important; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
    .cert-card, .cert-viewer { background: #14253b; backdrop-filter: none; border-color: #9bb4d2; }
}
