/* =========================
   CERTIFICATES (IMAGE GRID)
========================= */
.certs{
    background:#fff;
    padding: 26px 0 70px;
}

.certs-head{
    max-width: 860px;
    margin-bottom: 18px;
}

.certs-line{
    width: 70px;
    height: 2px;
    background: var(--blue);
    margin-bottom: 12px;
}

.certs-lead{
    margin: 0;
    color: #475569;
    line-height: 1.9;
    font-size: 15px;
}

/* Grid */
.certs-grid{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.cert-item{
    text-align: left;
    border: 1px solid rgba(15, 46, 87, .14);
    border-radius: 16px;
    box-shadow: 0 14px 30px rgba(2, 8, 23, .08);
    background: #fff;
    padding: 12px;
    cursor: pointer;
    display: grid;
    gap: 10px;
    transition: transform .2s ease, box-shadow .2s ease;
}

.cert-item:hover{
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(2, 8, 23, .14);
}

.cert-item img{
    width: 100%;
    height: 260px;
    object-fit: contain;       /* sertifika dikeyse cover iyi durur */
    border-radius: 12px;
    border: 1px solid rgba(15, 46, 87, .12);
    background: #f1f5f9;
    display: block;
}

.cert-cap{
    font-weight: 950;
    color: var(--blue);
    letter-spacing: .2px;
}

/* =========================
   MODAL (LIGHTBOX)
========================= */
.cert-modal{
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
}

.cert-modal.open{
    display: block;
}

.cert-modal-backdrop{
    position: absolute;
    inset: 0;
    background: rgba(2, 8, 23, .72);
}

.cert-modal-dialog{
    position: relative;
    width: min(980px, 92vw);
    max-height: 88vh;
    margin: 6vh auto 0;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(15, 46, 87, .14);
    box-shadow: 0 18px 50px rgba(2, 8, 23, .28);
    overflow: hidden;
}

.cert-modal-close{
    position: absolute;
    top: 10px;
    right: 10px;
    height: 42px;
    width: 42px;
    border-radius: 12px;
    border: 1px solid rgba(15, 46, 87, .18);
    background: #fff;
    cursor: pointer;
    font-weight: 700;
    color: var(--blue);
    z-index: 2;
}

.cert-modal-close:hover{
    background: rgba(15, 46, 87, .06);
}

.cert-modal-figure{
    margin: 0;
    padding: 14px;
    display: grid;
    gap: 10px;
}

.cert-modal-figure img{
    width: 100%;
    max-height: 72vh;
    object-fit: contain;  /* modalde net okumak için contain */
    border-radius: 14px;
    background: #f1f5f9;
    border: 1px solid rgba(15, 46, 87, .12);
}

#certModalCap{
    color: #475569;
    font-weight: 800;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 980px){
    .certs-grid{ grid-template-columns: repeat(2, 1fr); }
    .cert-item img{ height: 240px; }
}

@media (max-width: 620px){
    .certs-grid{ grid-template-columns: 1fr; }
    .cert-item img{ height: 220px; }
}
