گواهی و افتخارات
گواهی و افتخارات | ابزار بیات.cert-page {
--red:#c8102e;
--dark:#20252c;
--gray:#737b86;
--line:#e9ebef;
font-family:"Vazirmatn",Tahoma,sans-serif;
color:var(--dark);
background:#fff;
direction:rtl;
line-height:1.9;
}.cert-page * {box-sizing:border-box;}.cert-container {
max-width:1200px;
margin:auto;
padding:65px 22px 85px;
}/* Header */.cert-header {
text-align:center;
margin-bottom:45px;
}.cert-header h1 {
font-size:clamp(28px,4vw,43px);
font-weight:800;
margin:0;
color:#20252c;
}.cert-header p {
color:var(--gray);
font-size:15px;
font-weight:400;
max-width:600px;
margin:12px auto 0;
}/* Info */.cert-info {
display:flex;
justify-content:space-between;
align-items:center;
border:1px solid var(--line);
border-radius:12px;
padding:14px 20px;
margin-bottom:28px;
background:#fafbfc;
}.cert-info-title {
font-size:14px;
color:#555e69;
}.cert-count {
color:var(--red);
font-size:14px;
font-weight:700;
}/* Grid */.cert-grid {
display:grid;
grid-template-columns:repeat(4,minmax(0,1fr));
gap:22px;
}.cert-card {
position:relative;
display:block;
width:100%;
padding:0;
border:1px solid var(--line);
border-radius:12px;
overflow:hidden;
background:#fff;
cursor:pointer;
text-align:inherit;
font:inherit;
transition:transform .25s ease,box-shadow .25s ease,border-color .25s ease;
}.cert-card:hover {
transform:translateY(-5px);
border-color:#f0c2cb;
box-shadow:0 12px 30px rgba(32,37,44,.09);
}.cert-image {
display:flex;
align-items:center;
justify-content:center;
padding:14px;
height:280px;
background:#f6f7f9;
overflow:hidden;
}.cert-image img {
width:100%;
height:100%;
object-fit:contain;
transition:transform .35s ease;
}.cert-card:hover .cert-image img {
transform:scale(1.035);
}.cert-caption {
display:flex;
align-items:center;
justify-content:space-between;
padding:13px 15px;
border-top:1px solid var(--line);
background:#fff;
}.cert-caption span {
font-size:14px;
font-weight:600;
color:#343a43;
}.cert-caption i {
display:flex;
width:29px;
height:29px;
align-items:center;
justify-content:center;
border-radius:7px;
background:#fff0f2;
color:var(--red);
font-style:normal;
font-size:17px;
}/* Footer */.cert-footer {
margin-top:40px;
padding-top:20px;
border-top:1px solid var(--line);
text-align:center;
color:#9299a2;
font-size:13px;
}/* Lightbox */.cert-lightbox {
position:fixed;
inset:0;
z-index:999999;
background:rgba(17,21,27,.94);
display:none;
align-items:center;
justify-content:center;
padding:20px;
}.cert-lightbox.active {display:flex;}.cert-lightbox-inner {
width:100%;
max-width:1000px;
height:100%;
max-height:850px;
display:flex;
flex-direction:column;
}.cert-lb-top {
display:flex;
justify-content:space-between;
align-items:center;
color:#fff;
padding:8px 0 18px;
}.cert-lb-top button,
.cert-nav button {
border:1px solid rgba(255,255,255,.2);
background:rgba(255,255,255,.08);
color:white;
width:43px;
height:43px;
border-radius:9px;
font-size:22px;
cursor:pointer;
}.cert-lb-top button:hover,
.cert-nav button:hover {
background:var(--red);
border-color:var(--red);
}.cert-lb-stage {
flex:1;
min-height:0;
display:flex;
justify-content:center;
align-items:center;
}.cert-lb-stage img {
max-width:100%;
max-height:100%;
object-fit:contain;
background:white;
border-radius:5px;
}.cert-nav {
display:flex;
justify-content:center;
gap:12px;
padding-top:18px;
}@media(max-width:950px) {
.cert-grid {grid-template-columns:repeat(3,minmax(0,1fr));}
}@media(max-width:650px) {
.cert-container {padding:42px 15px 55px;}
.cert-header {margin-bottom:30px;}
.cert-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.cert-image {height:210px;padding:9px;}
.cert-caption {padding:10px;}
.cert-caption span {font-size:12px;}
.cert-info {padding:11px 13px;}
}@media(max-width:380px) {
.cert-grid {grid-template-columns:1fr;}
.cert-image {height:280px;}
}(function(){const base = "https://bayatco.com/wp-content/uploads/2026/11/";const items = [
{f:"لوح-تقدیر.webp",t:"لوح تقدیر"},
{f:"Untitled.webp",t:"گواهی"},
{f:"333-rotated-1.webp",t:"گواهی"},
{f:"222-rotated-1.webp",t:"گواهی"},
{f:"44-rotated-1.webp",t:"گواهی"},
{f:"6.webp",t:"گواهی"},
{f:"2.webp",t:"گواهی"},
{f:"1-1.webp",t:"گواهی"}
];const grid = document.getElementById("certGrid");
const lightbox = document.getElementById("certLightbox");
const bigImage = document.getElementById("certBigImage");
const number = document.getElementById("certNumber");let current = 0;document.getElementById("certCount").textContent =
items.length.toLocaleString("fa") + " گواهی و تقدیرنامه";items.forEach((item,index)=>{const card = document.createElement("button");
card.type = "button";
card.className = "cert-card";
card.setAttribute("aria-label","مشاهده "+item.t);const image = document.createElement("img");
image.src = base + item.f;
image.alt = item.t;
image.loading = "lazy";
image.decoding = "async";const imageBox = document.createElement("div");
imageBox.className = "cert-image";
imageBox.appendChild(image);const caption = document.createElement("div");
caption.className = "cert-caption";const title = document.createElement("span");
title.textContent = item.t;const icon = document.createElement("i");
icon.textContent = "↗";caption.append(title,icon);
card.append(imageBox,caption);card.addEventListener("click",()=>{
show(index);
lightbox.classList.add("active");
document.body.style.overflow="hidden";
document.getElementById("certClose").focus();
});grid.appendChild(card);});function show(index){
current = (index + items.length) % items.length;
bigImage.src = base + items[current].f;
bigImage.alt = items[current].t;
number.textContent =
(current+1).toLocaleString("fa") +
" از " + items.length.toLocaleString("fa");
}function close(){
lightbox.classList.remove("active");
document.body.style.overflow="";
}document.getElementById("certClose").onclick=close;
document.getElementById("certNext").onclick=()=>show(current+1);
document.getElementById("certPrev").onclick=()=>show(current-1);lightbox.addEventListener("click",e=>{
if(e.target===lightbox) close();
});document.addEventListener("keydown",e=>{
if(!lightbox.classList.contains("active")) return;if(e.key==="Escape") close();
if(e.key==="ArrowLeft") show(current+1);
if(e.key==="ArrowRight") show(current-1);
});})();