/* Certification Wrapper & Grid Container */
.cert-wrapper {
    position: relative;
    padding-bottom: 80px;
    background: transparent;
}

.cert-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding-top: 15px;
    padding-bottom: 20px;
    align-items: stretch;
}

/* Premium Certification Card Design */
.cert-card-premium {
    background: #ffffff;
    border: 2px solid #b8c2cc;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: auto;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    scroll-snap-align: start;
    min-width: calc((100% - 40px) / 3);
    max-width: calc((100% - 40px) / 3);
}

.cert-card-premium:hover {
    transform: translateY(-10px);
    border-color: #2563eb;
    box-shadow: 0 20px 40px -10px rgba(37, 99, 235, 0.2);
}

.dark .cert-card-premium {
    background: #1e293b;
    border-color: #475569;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.dark .cert-card-premium:hover {
    border-color: #60a5fa;
    box-shadow: 0 20px 40px -10px rgba(96, 165, 250, 0.25);
}

/* Header Section Styling */
.cert-header-row {
    padding: 15px 20px;
    background: transparent;
    border-bottom: 1px dashed #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dark .cert-header-row {
    background: transparent;
    border-bottom-color: #334155;
}

.cert-icon-box {
    width: 50px;
    height: 50px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.cert-card-premium:hover .cert-icon-box {
    transform: scale(1.1) rotate(-5deg);
}

.cert-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Certification Typography */
.cert-role {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
}

.dark .cert-role {
    color: #f1f5f9;
}

/* Certification List & Item Styling */
.cert-body {
    padding: 5px 0;
    flex-grow: 1;
}

.cert-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cert-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 18px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    border-bottom: 1px solid transparent;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: default;
    color: #475569;
}

.dark .cert-list li {
    color: #cbd5e1;
}

.cert-list li:nth-child(even) {
    background-color: #f8fafc;
}

.dark .cert-list li:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.03);
}

.cert-list li:hover {
    background-color: #eff6ff;
    padding-left: 25px;
    color: #1e293b;
}

.dark .cert-list li:hover {
    background-color: rgba(37, 99, 235, 0.15);
    color: #ffffff;
}

.cert-list-bullet {
    width: 20px;
    height: 20px;
    background: #dbeafe;
    color: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 10px;
    transition: all 0.3s ease;
}

.cert-list li:hover .cert-list-bullet {
    background: #2563eb;
    color: #ffffff;
    transform: scale(1.1);
}

.cert-name {
    flex-grow: 1;
    text-align: left;
}

.cert-view-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: all 0.2s ease;
    font-size: 1rem;
    cursor: pointer;
}

.cert-view-icon:hover {
    color: #2563eb;
    background: #eff6ff;
    transform: scale(1.1);
}

/* Certification Image Modal & Viewer Settings */
.cert-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cert-modal.show {
    display: flex;
    opacity: 1;
}

.cert-modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 90vh;
}

.cert-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 100;
}

.cert-close-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
    transform: rotate(90deg);
}

.gradient-border-box {
    position: relative;
    padding: 2px;
    border-radius: 12px;
    background: #1e293b;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(37, 99, 235, 0.3);
    display: inline-block;
    width: auto;
    height: auto;
}

.gradient-border-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg,
            transparent 0deg,
            #2563eb 90deg,
            transparent 180deg,
            #2563eb 270deg,
            transparent 360deg);
    animation: rotate-border 4s linear infinite;
    z-index: 0;
}

@keyframes rotate-border {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.cert-image-viewport {
    position: relative;
    background: #000;
    border-radius: 10px;
    z-index: 1;
    overflow: hidden;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cert-image-viewport:active {
    cursor: grabbing;
}

.cert-image-viewport img {
    max-height: 80vh;
    max-width: 85vw;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
    transform-origin: center center;
    transition: transform 0.1s linear;
    user-select: none;
    pointer-events: none;
    will-change: transform;
}

.modal-caption {
    margin-top: 12px;
    text-align: center;
    color: #fff;
    z-index: 10;
    pointer-events: none;
}

.modal-caption h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 2px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.modal-caption p {
    font-size: 0.8rem;
    color: #cbd5e1;
    opacity: 0.8;
}

/* Modal Responsive Settings */
@media (max-width: 768px) {
    .cert-close-btn {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
    }

    .cert-image-viewport img {
        max-height: 70vh;
        max-width: 90vw;
    }
}

/* Grid & Slider Configuration Settings */
.cert-wrapper {
    position: relative;
    padding-bottom: 80px;
    background: transparent;
}

.cert-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding-bottom: 20px;
    align-items: stretch;
}

/* Tablet & Mobile Responsive Slider Configuration */
@media (max-width: 1024px) {
    .cert-grid-container {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 20px;
        padding-bottom: 25px;
        scrollbar-width: none;
        grid-template-columns: none;
        align-items: stretch;
    }

    .cert-grid-container::-webkit-scrollbar {
        display: none;
    }

    .cert-card-premium {
        min-width: calc(50% - 15px);
        flex: 0 0 auto;
        scroll-snap-align: start;
    }
}

@media (max-width: 768px) {
    .cert-card-premium {
        min-width: 88vw;
        scroll-snap-align: center;
    }
}

/* Certification Grid Slider Always Mode */
.cert-grid-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 25px;
    scrollbar-width: none;
    align-items: stretch;
}

.cert-grid-container::-webkit-scrollbar {
    display: none;
}

.cert-card-premium {
    background: #ffffff;
    border: 2px solid #b8c2cc;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: calc(33.333% - 14px);
    flex: 0 0 auto;
    scroll-snap-align: start;
}

/* Header & Typography Overrides */
.cert-header-row {
    padding: 15px 20px;
    background: transparent;
    border-bottom: 1px dashed #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dark .cert-header-row {
    border-bottom-color: #334155;
}

.cert-icon-box {
    width: 50px;
    height: 50px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

/* Responsive Grid Adjustments */
@media (max-width: 1024px) {
    .cert-card-premium {
        min-width: calc((100% - 20px) / 2);
        max-width: calc((100% - 20px) / 2);
    }
}

@media (max-width: 768px) {
    .cert-card-premium {
        min-width: 100%;
        max-width: 100%;
        scroll-snap-align: center;
    }
}

/* Pagination Slider Dots Styling */
.cert-dots-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding-bottom: 20px;
}

.cert-slider-dot {
    width: 10px;
    height: 10px;
    background-color: #cbd5e1;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cert-slider-dot.active {
    background-color: #2563eb;
    width: 25px;
    border-radius: 10px;
}

.dark .cert-slider-dot {
    background-color: #475569;
}

.dark .cert-slider-dot.active {
    background-color: #60a5fa;
}