* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: #050505;
    color: #fff;
    overflow-x: hidden;
}

.certificates-page {
    min-height: 100vh;
    padding: 120px 5% 80px;
    position: relative;
    z-index: 2;
}

#stars {
    width: 1px;
    height: 1px;
    background: transparent;
    box-shadow: 779px 1331px #FFF, 324px 42px #FFF, 303px 586px #FFF, 1312px 276px #FFF, 451px 625px #FFF, 521px 1931px #FFF, 1087px 1871px #FFF, 36px 1546px #FFF, 132px 934px #FFF, 1698px 901px #FFF;
    animation: animStar 50s linear infinite;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 0;
}

#stars:after {
    content: " ";
    position: absolute;
    top: 2000px;
    width: 1px;
    height: 1px;
    background: transparent;
    box-shadow: 779px 1331px #FFF, 324px 42px #FFF, 303px 586px #FFF, 1312px 276px #FFF, 451px 625px #FFF, 521px 1931px #FFF, 1087px 1871px #FFF, 36px 1546px #FFF, 132px 934px #FFF, 1698px 901px #FFF;
}

#stars2 {
    width: 2px;
    height: 2px;
    background: transparent;
    box-shadow: 779px 1331px #FFF, 324px 42px #FFF, 303px 586px #FFF, 1312px 276px #FFF, 451px 625px #FFF, 521px 1931px #FFF, 1087px 1871px #FFF, 36px 1546px #FFF, 132px 934px #FFF, 1698px 901px #FFF;
    animation: animStar 100s linear infinite;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 0;
}

#stars2:after {
    content: " ";
    position: absolute;
    top: 2000px;
    width: 2px;
    height: 2px;
    background: transparent;
    box-shadow: 779px 1331px #FFF, 324px 42px #FFF, 303px 586px #FFF, 1312px 276px #FFF, 451px 625px #FFF, 521px 1931px #FFF, 1087px 1871px #FFF, 36px 1546px #FFF, 132px 934px #FFF, 1698px 901px #FFF;
}

#stars3 {
    width: 3px;
    height: 3px;
    background: transparent;
    box-shadow: 779px 1331px #FFF, 324px 42px #FFF, 303px 586px #FFF, 1312px 276px #FFF, 451px 625px #FFF, 521px 1931px #FFF, 1087px 1871px #FFF, 36px 1546px #FFF, 132px 934px #FFF, 1698px 901px #FFF;
    animation: animStar 150s linear infinite;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 0;
}

#stars3:after {
    content: " ";
    position: absolute;
    top: 2000px;
    width: 3px;
    height: 3px;
    background: transparent;
    box-shadow: 779px 1331px #FFF, 324px 42px #FFF, 303px 586px #FFF, 1312px 276px #FFF, 451px 625px #FFF, 521px 1931px #FFF, 1087px 1871px #FFF, 36px 1546px #FFF, 132px 934px #FFF, 1698px 901px #FFF;
}

@keyframes animStar {
    from {
        transform: translateY(0px);
    }
    to {
        transform: translateY(-2000px);
    }
}


/* Fireflies Animation */
.fireflies {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.firefly {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #FFE66D;
    border-radius: 50%;
    box-shadow: 0 0 10px #FFE66D, 0 0 20px #FFE66D, 0 0 30px #FFE66D;
    animation: fireflyFloat 15s infinite ease-in-out;
    opacity: 0;
}

.firefly:nth-child(1) {
    left: 10%;
    top: 20%;
    animation-delay: 0s;
}

.firefly:nth-child(2) {
    left: 20%;
    top: 60%;
    animation-delay: 1s;
}

.firefly:nth-child(3) {
    left: 30%;
    top: 80%;
    animation-delay: 2s;
}

.firefly:nth-child(4) {
    left: 40%;
    top: 40%;
    animation-delay: 3s;
}

.firefly:nth-child(5) {
    left: 50%;
    top: 70%;
    animation-delay: 4s;
}

.firefly:nth-child(6) {
    left: 60%;
    top: 30%;
    animation-delay: 5s;
}

.firefly:nth-child(7) {
    left: 70%;
    top: 90%;
    animation-delay: 6s;
}

.firefly:nth-child(8) {
    left: 80%;
    top: 50%;
    animation-delay: 7s;
}

.firefly:nth-child(9) {
    left: 90%;
    top: 25%;
    animation-delay: 8s;
}

.firefly:nth-child(10) {
    left: 15%;
    top: 45%;
    animation-delay: 9s;
}

.firefly:nth-child(11) {
    left: 25%;
    top: 15%;
    animation-delay: 10s;
}

.firefly:nth-child(12) {
    left: 35%;
    top: 65%;
    animation-delay: 11s;
}

.firefly:nth-child(13) {
    left: 45%;
    top: 85%;
    animation-delay: 12s;
}

.firefly:nth-child(14) {
    left: 55%;
    top: 35%;
    animation-delay: 13s;
}

.firefly:nth-child(15) {
    left: 65%;
    top: 75%;
    animation-delay: 14s;
}

@keyframes fireflyFloat {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}


/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 80px;
    animation: fadeInUp 0.8s ease-out;
}

.title {
    font-size: 4rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 20px;
    letter-spacing: 5px;
}

/* Certificates Grid */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
}

.cert-card {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 107, 107, 0.1);
    transition: all 0.4s ease;
    cursor: pointer;
    animation: fadeInUp 0.6s ease-out backwards;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.cert-card:nth-child(1) {
    animation-delay: 0s;
}

.cert-card:nth-child(2) {
    animation-delay: 0.1s;
}

.cert-card:nth-child(3) {
    animation-delay: 0.2s;
}

.cert-card:nth-child(4) {
    animation-delay: 0.3s;
}

.cert-card:nth-child(5) {
    animation-delay: 0.4s;
}

.cert-card:nth-child(6) {
    animation-delay: 0.5s;
}

.cert-card:nth-child(7) {
    animation-delay: 0.6s;
}

.cert-card:nth-child(8) {
    animation-delay: 0.7s;
}

.cert-card:nth-child(9) {
    animation-delay: 0.8s;
}

.cert-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(255, 107, 107, 0.3);
    border-color: rgba(255, 107, 107, 0.3);
}

.cert-image-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.cert-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.cert-iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
    transition: transform 0.5s ease;
}

.cert-card:hover .cert-image,
.cert-card:hover .cert-iframe {
    transform: scale(1.1);
}

.cert-info {
    padding: 25px;
}

.cert-category {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 107, 107, 0.2);
    color: #FF6B6B;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
    animation: pulse 2s ease-in-out infinite;
}

.cert-title {
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 8px;
    font-weight: 700;
    line-height: 1.4;
}

.cert-org {
    font-size: 1rem;
    color: #aaa;
    margin-bottom: 6px;
}

.cert-date {
    font-size: 0.9rem;
    color: #777;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .certificates-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

@media (max-width: 968px) {
    .certificates-page {
        padding: 100px 5% 60px;
    }

    .title {
        font-size: 3rem;
    }

    .certificates-grid {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .certificates-page {
        padding: 90px 5% 50px;
    }

    .title {
        font-size: clamp(2.5rem, 10vw, 3.5rem);
        letter-spacing: 2px;
        line-height: 1.1;
    }


    .certificates-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .cert-image-container {
        height: 250px;
    }
}

@media (max-width: 568px) {
    .certificates-page {
        padding: 80px 5% 40px;
    }

    .title {
        font-size: clamp(2rem, 12vw, 2.5rem);
        letter-spacing: 1px;
    }


    .certificates-grid {
        gap: 20px;
    }

    .cert-image-container {
        height: 220px;
    }

    .cert-info {
        padding: 20px;
    }

    .cert-title {
        font-size: 1.2rem;
    }

    .cert-org {
        font-size: 0.95rem;
    }

    .cert-date {
        font-size: 0.85rem;
    }
}

@media (max-width: 420px) {
    .title {
        font-size: 1.8rem;
    }

    .cert-image-container {
        height: 200px;
    }

    .cert-info {
        padding: 18px;
    }

    .cert-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 360px) {
    .title {
        font-size: 1.6rem;
    }

    .cert-image-container {
        height: 180px;
    }
}

.back-button {
    display: flex;
    height: 48px;
    width: 120px;
    align-items: center;
    justify-content: center;
    background: rgba(255, 107, 107, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 12px;
    letter-spacing: 1.5px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    margin-bottom: 40px;
    gap: 10px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    color: #FF8E8E;
    text-transform: uppercase;
}

.back-button svg {
    width: 18px;
    height: 18px;
    transition: all 0.4s ease;
    fill: #FF8E8E;
}

.back-button:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: #FF6B6B;
    color: #fff;
    transform: translateX(-5px);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.2);
}

.back-button:hover svg {
    fill: #fff;
    transform: translateX(-3px);
}