/* Complete Certifications Section - Fixed Mobile Card Display */
.certifications .section-content {
    width: calc(100% - var(--section-title-width) - var(--section-gap));
}

.certifications-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    padding-top: 10px;
}

.certifications-viewport {
    display: flex;
    transition: transform 0.4s ease;
    gap: 1.5rem;
}

.certification-card {
    flex: 0 0 calc(33.333% - 1rem);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 2rem 1.5rem 3.5rem 1.5rem;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 320px;
    text-align: left;
    border: 1px solid rgba(85, 194, 218, 0.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.certification-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-color);
}

/* PDF Icon in top-right */
.cert-pdf-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.cert-pdf-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.cert-icon {
    width: 65px;
    height: 65px;
    margin: 0 0 1.2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(85, 194, 218, 0.1);
    border-radius: 12px;
}

.cert-icon svg,
.cert-icon img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 6px;
}

.cert-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: #2c3e50;
    line-height: 1.3;
    text-align: left;
}

.cert-institution {
    font-size: 0.95rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-weight: 600;
    text-align: left;
}

.cert-description {
    font-size: 0.87rem;
    color: #666;
    line-height: 1.5;
    margin-top: 0.5rem;
    text-align: left;
    flex-grow: 1;
}

/* Digital Badge */
.digital-badge {
    position: absolute;
    bottom: 12px;
    right: 18px;
    z-index: 5;
}

.digital-badge img {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(85, 194, 218, 0.25);
    border: 2px solid var(--accent-color);
    background: white;
    padding: 2px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    object-fit: contain;
}

.digital-badge img:hover {
    transform: scale(1.12);
    box-shadow: 0 5px 15px rgba(85, 194, 218, 0.35);
}

/* Carousel Controls */
.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 2.5rem;
}

.carousel-btn {
    background: linear-gradient(135deg, var(--accent-color) 0%, #48b0c5 100%);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(85, 194, 218, 0.3);
}

.carousel-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 20px rgba(85, 194, 218, 0.4);
}

.carousel-btn:disabled {
    background: linear-gradient(135deg, #bdc3c7 0%, #95a5a6 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* RESPONSIVE DESIGN - FIXED */
@media (max-width: 1200px) {
    .certifications .section-content {
        width: calc(100% - var(--section-title-width) - 2rem);
    }
}

@media (max-width: 1024px) {
    .certification-card {
        flex: 0 0 calc(50% - 0.75rem);
        min-height: 300px;
        padding: 1.8rem 1.3rem 3rem 1.3rem;
    }

    .cert-title {
        font-size: 1.1rem;
    }

    .digital-badge {
        bottom: 10px;
        right: 15px;
    }

    .digital-badge img {
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 768px) {
    .certifications .section-title {
        width: 100%;
        margin-bottom: 1.5rem;
    }

    .certifications .section-content {
        width: 100%;
    }

    .certifications-container {
        padding: 0 5px; /* Add small padding to prevent cutoff */
    }

    .certifications-viewport {
        gap: 1rem; /* Reduce gap on mobile */
    }

    .certification-card {
        flex: 0 0 calc(100% - 10px); /* FIXED: Ensure full card visibility with small margin */
        min-height: 280px;
        padding: 1.6rem 1.2rem 2.8rem 1.2rem;
    }

    .cert-title {
        font-size: 1.05rem;
    }

    .cert-description {
        font-size: 0.85rem;
    }

    .digital-badge {
        bottom: 8px;
        right: 12px;
    }

    .digital-badge img {
        width: 36px;
        height: 36px;
    }

    .carousel-controls {
        margin-top: 2rem;
        gap: 1rem;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .certifications-container {
        padding: 0 8px; /* Slightly more padding on very small screens */
    }

    .certifications-viewport {
        gap: 0.8rem;
    }

    .certification-card {
        flex: 0 0 calc(100% - 16px); /* FIXED: Perfect sizing to prevent any cutoff */
        min-height: 260px;
        padding: 1.4rem 1rem 2.5rem 1rem;
    }

    .cert-icon {
        width: 55px;
        height: 55px;
        margin-bottom: 1rem;
    }

    .cert-icon svg,
    .cert-icon img {
        width: 42px;
        height: 42px;
    }

    .cert-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .cert-institution {
        font-size: 0.9rem;
        margin-bottom: 0.8rem;
    }

    .cert-description {
        font-size: 0.82rem;
    }

    .digital-badge {
        bottom: 6px;
        right: 10px;
    }

    .digital-badge img {
        width: 32px;
        height: 32px;
    }

    .cert-pdf-icon {
        top: 12px;
        right: 12px;
    }
}