/* ========== CERTIFICATES PAGE STYLES ========== */

/* Hero Section */
.cert-hero {
    background: linear-gradient(135deg, #111 0%, #111 100%);
    padding: 150px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cert-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
    font-family: 'Ubuntu', sans-serif;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 18px;
    color: #cbd5e1;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Certificates Section */
.certificates-section {
    padding: 80px 0;
    background: #fff;
}

.certificates-section.dark-section {
    background: #111;
    color: #fff;
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #111;
    font-family: 'Ubuntu', sans-serif;
}

.dark-section .section-title {
    color: #fff;
}

.section-title i {
    color: crimson;
    margin-right: 10px;
    font-size: 32px;
}

.section-description {
    text-align: center;
    font-size: 16px;
    color: #666;
    max-width: 700px;
    margin: 0 auto 50px;
    line-height: 1.7;
}

.dark-section .section-description {
    color: #ccc;
}

/* Subsection */
.subsection {
    margin-top: 60px;
}

.subsection-title {
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 40px;
    padding: 15px 30px;
    background: rgba(220, 20, 60, 0.1);
    border-left: 4px solid crimson;
    border-radius: 8px;
    display: inline-block;
}

.subsection-title i {
    color: crimson;
    margin-right: 10px;
}

/* Certificate Grid */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

/* Certificate Card */
.cert-card {
    background: #f9f9f9;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.dark-section .cert-card {
    background: #1a1a1a;
    border: 1px solid #333;
}

.cert-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(220, 20, 60, 0.2);
}

/* Certificate Image Wrapper */
.cert-image-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #e0e0e0;
}

.dark-section .cert-image-wrapper {
    background: #0a0a0a;
}

.cert-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.cert-card:hover .cert-image {
    transform: scale(1.1);
}

/* Certificate Overlay */
.cert-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.overlay-content {
    text-align: center;
    padding: 20px;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.cert-card:hover .overlay-content {
    transform: translateY(0);
}

.overlay-content .cert-title {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 10px;
}

.overlay-content .cert-issuer {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 20px;
}

.cert-btn {
    display: inline-block;
    padding: 12px 30px;
    background: crimson;
    color: #fff;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 2px solid crimson;
    text-decoration: none;
}

.cert-btn:hover {
    background: transparent;
    color: crimson;
    transform: scale(1.05);
}

.cert-btn i {
    margin-right: 5px;
}

/* Certificate Info */
.cert-info {
    padding: 10px;
    text-align: center;
}

.cert-info h4 {
    font-size: 18px;
    font-weight: 600;
    color: #111;
    margin-bottom: 5px;
}

.dark-section .cert-info h4 {
    color: #fff;
}

.cert-badge {
    display: inline-block;
    padding: 5px 15px;
    background: crimson;
    color: #fff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ml-badge {
    background: linear-gradient(135deg, crimson 0%, #764ba2 100%);
}

/* Back Section */
.back-section {
    padding: 80px 0;
    background: #f9f9f9;
    text-align: center;
}

.back-content {
    max-width: 600px;
    margin: 0 auto;
}

.back-content h3 {
    font-size: 32px;
    font-weight: 600;
    color: #111;
    margin-bottom: 15px;
    font-family: 'Ubuntu', sans-serif;
}

.back-content p {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.7;
}

.back-btn {
    display: inline-block;
    padding: 14px 40px;
    background: crimson;
    color: #fff;
    border-radius: 6px;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    border: 2px solid crimson;
    text-decoration: none;
}

.back-btn:hover {
    background: transparent;
    color: crimson;
    transform: translateX(-5px);
}

.back-btn i {
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.back-btn:hover i {
    transform: translateX(-5px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cert-card {
    animation: fadeInUp 0.6s ease forwards;
}

.cert-card:nth-child(1) { animation-delay: 0.1s; }
.cert-card:nth-child(2) { animation-delay: 0.2s; }
.cert-card:nth-child(3) { animation-delay: 0.3s; }
.cert-card:nth-child(4) { animation-delay: 0.4s; }
.cert-card:nth-child(5) { animation-delay: 0.5s; }

/* Responsive Design */
@media (max-width: 947px) {
    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .section-title {
        font-size: 28px;
    }

    .cert-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 690px) {
    .cert-hero {
        padding: 120px 0 80px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .section-title {
        font-size: 24px;
    }

    .subsection-title {
        font-size: 22px;
        display: block;
        text-align: left;
    }

    .back-content h3 {
        font-size: 24px;
    }
}

@media (max-width: 500px) {
    .cert-hero {
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 24px;
    }

    .cert-image-wrapper {
        height: 200px;
    }

    .overlay-content .cert-title {
        font-size: 20px;
    }

    .cert-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}