/* ── Nav ── */
#cert-header {
    width: 100%;
    padding-bottom: 10px;
    background: #080808;
    border-bottom: 1px solid #1a1a1a;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* ensure sidemenu overlays sticky nav on mobile */
@media only screen and (max-width: 600px) {
    #cert-header nav ul {
        z-index: 200;
    }
}

/* ── Hero ── */
.cert-hero {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a0008 50%, #0f0f0f 100%);
    padding: 80px 10% 70px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cert-hero::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,0,79,0.12) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.cert-hero-tag {
    display: inline-block;
    color: #ff004f;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: 1px solid rgba(255,0,79,0.4);
    padding: 6px 18px;
    border-radius: 20px;
    margin-bottom: 20px;
    background: rgba(255,0,79,0.08);
}

.cert-hero-tag i {
    margin-right: 8px;
}

.cert-hero h1 {
    font-size: 58px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 14px;
    line-height: 1.1;
}

.cert-hero h1 span {
    color: #ff004f;
}

.cert-hero-sub {
    color: #ababab;
    font-size: 16px;
    max-width: 500px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.cert-stats {
    display: inline-flex;
    align-items: center;
    gap: 40px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 20px 50px;
}

.cert-stats div h2 {
    font-size: 30px;
    font-weight: 700;
    color: #ff004f;
}

.cert-stats div p {
    font-size: 12px;
    color: #ababab;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    padding: 0 !important;
}

/* ── Section ── */
#certificates {
    padding: 70px 0 90px;
}

/* ── Grid ── */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

/* ── Card ── */
.cert-item {
    background: #141414;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #222;
    transition: transform 0.4s, box-shadow 0.4s, border-color 0.4s;
    cursor: pointer;
}

.cert-item:hover {
    transform: translateY(-10px);
    border-color: #ff004f;
    box-shadow: 0 20px 50px rgba(255, 0, 79, 0.2);
}

/* ── Image area ── */
.cert-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.cert-card img {
    width: 100%;
    display: block;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform 0.5s;
}

.cert-item:hover .cert-card img {
    transform: scale(1.06);
}

.cert-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(255,0,79,0.3) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.4s;
}

.cert-item:hover .cert-overlay {
    opacity: 1;
}

.overlay-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #ff004f;
    transition: transform 0.3s;
}

.cert-item:hover .overlay-icon {
    transform: scale(1.1);
}

.cert-overlay p {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
}

/* ── Info bar ── */
.cert-info {
    padding: 22px 24px 24px;
    position: relative;
}

.cert-number {
    font-size: 11px;
    font-weight: 700;
    color: #ff004f;
    letter-spacing: 2px;
    margin-bottom: 8px;
    opacity: 0.7;
}

.cert-info h3 {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    line-height: 1.5;
    margin-bottom: 8px;
}

.cert-platform {
    font-size: 13px;
    color: #ababab;
    margin-bottom: 16px;
}

.cert-platform i {
    color: #ff004f;
    margin-right: 7px;
}

.cert-verify-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    background: linear-gradient(135deg, #ff004f, #cc003f);
    padding: 9px 20px;
    border-radius: 8px;
    letter-spacing: 0.5px;
    transition: opacity 0.3s, transform 0.3s;
}

.cert-verify-btn:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}

/* ── Lightbox Modal ── */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(6px);
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-content {
    position: relative;
    max-width: 900px;
    width: 100%;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.85); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.modal-content img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.8);
    display: block;
}

.modal-close {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ff004f;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.3s;
    z-index: 10;
}

.modal-close:hover {
    background: #cc003f;
    transform: rotate(90deg);
}

/* ── Responsive: Tablet (max 900px) ── */
@media only screen and (max-width: 900px) {
    .cert-hero h1 {
        font-size: 44px;
    }
    .cert-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .cert-stats {
        gap: 24px;
        padding: 16px 30px;
    }
}

/* ── Responsive: Mobile (max 600px) ── */
@media only screen and (max-width: 600px) {
    .cert-hero {
        padding: 50px 6% 40px;
    }
    .cert-hero h1 {
        font-size: 32px;
    }
    .cert-hero-sub {
        font-size: 14px;
    }
    .sub-tytle {
        font-size: 36px;
    }
    .cert-stats {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
        padding: 16px 20px;
        width: 100%;
    }
    .stat-divider {
        display: none;
    }
    .cert-grid {
        grid-template-columns: 1fr;
    }
    .cert-info h3 {
        font-size: 14px;
    }
    .modal {
        padding: 16px;
        align-items: flex-end;
    }
    .modal-content {
        max-width: 100%;
        margin-bottom: 10px;
    }
    .modal-close {
        top: -14px;
        right: 0;
    }
}
