/* ========================================
   CERTIFICATIONS CAROUSEL SECTION
   Horizontal Auto-Scrolling Design
   ======================================== */

.certifications-section {
    padding: 60px 0;
    background: var(--bg-dark);
    position: relative;
    overflow: hidden;
}

.certifications-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

/* Section Header */
.section-header-cert {
    text-align: center;
    margin-bottom: 3rem;
}

.section-tag-cert {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: rgba(0, 242, 254, 0.06);
    border: 1px solid rgba(0, 242, 254, 0.2);
    border-radius: 50px;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Filter Controls */
.cert-filters-modern {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 3.5rem;
    flex-wrap: wrap;
}

.cert-filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.6rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 50px;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-fast);
    font-size: 0.9rem;
}

.cert-filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.cert-filter-btn.active {
    background: var(--gradient);
    color: #05050a;
    border-color: transparent;
    box-shadow: var(--glow);
}

.cert-filter-btn .count {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--text-primary);
    font-family: 'Fira Code', monospace;
}

.cert-filter-btn.active .count {
    background: rgba(5, 5, 10, 0.15);
    color: #05050a;
}

/* Control Row */
.carousel-action-controls {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    position: relative;
    z-index: 5;
}

.section-header-cert .section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header-cert .section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Carousel Wrapper */
.cert-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 2rem 0;
    margin-bottom: 3rem;
}

.cert-carousel-wrapper::before,
.cert-carousel-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 150px;
    z-index: 2;
    pointer-events: none;
}

.cert-carousel-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-dark), transparent);
}

.cert-carousel-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-dark), transparent);
}

/* Carousel Track */
.cert-carousel {
    display: flex;
    gap: 2rem;
    animation: scroll-left 80s linear infinite;
    width: fit-content;
}

.cert-carousel:hover {
    animation-play-state: paused;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Certificate Slide */
.cert-slide {
    flex: 0 0 320px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.cert-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.cert-slide:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary-color);
    box-shadow: 0 20px 60px rgba(0, 242, 254, 0.15);
}

.cert-slide:hover::before {
    transform: scaleX(1);
}

/* Certificate Image Container */
.cert-image-container {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
    background: rgba(0, 0, 0, 0.3);
}

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

.cert-slide:hover .cert-image-container img {
    transform: scale(1.1);
}

/* Certificate Overlay */
.cert-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.cert-overlay i {
    font-size: 2rem;
    color: var(--primary-color);
}

.cert-overlay span {
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Certificate Info */
.cert-info {
    padding: 0.5rem 0;
}

.cert-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cert-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Stats Section */
.cert-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 3rem;
}

.stat-box {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.stat-box i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.3rem;
}

/* ========================================
   CERTIFICATE MODAL
   ======================================== */

.cert-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.cert-modal.active {
    display: flex;
}

.cert-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.cert-modal-content {
    position: relative;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cert-modal-content img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 12px;
    box-shadow: 0 25px 100px rgba(0, 242, 254, 0.25);
    border: 2px solid var(--primary-color);
}

.cert-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.cert-modal-close:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: rotate(90deg);
}

.cert-download-btn {
    padding: 1rem 2rem;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.cert-download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 242, 254, 0.3);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .certifications-section {
        padding: 40px 0;
    }

    .section-header-cert .section-title {
        font-size: 2rem;
    }

    .cert-slide {
        flex: 0 0 280px;
    }

    .cert-image-container {
        height: 160px;
    }

    .cert-carousel-wrapper::before,
    .cert-carousel-wrapper::after {
        width: 50px;
    }

    .cert-stats {
        flex-direction: column;
        gap: 1.5rem;
        padding: 2rem;
    }

    .cert-modal {
        padding: 1rem;
    }

    .cert-modal-content img {
        max-height: 60vh;
    }

    .cert-modal-close {
        top: -40px;
        width: 40px;
        height: 40px;
    }

    .cert-download-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .cert-slide {
        flex: 0 0 250px;
        padding: 1rem;
    }

    .cert-info h4 {
        font-size: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-box i {
        font-size: 2rem;
    }
}