.fk-certificate {
    padding: 100px 0;
    background: #fafafa;
    position: relative;
    overflow: hidden;
}

.fk-certificate::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(108, 99, 255, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.fk-certificate::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(46, 196, 182, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.fk-certificate__header {
    max-width: 600px;
    margin: 0 auto 56px;
    position: relative;
    z-index: 1;
}

.fk-certificate__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #6c63ff;
    margin-bottom: 12px;
    padding: 6px 14px;
    background: rgba(108, 99, 255, 0.08);
    border-radius: 20px;
}

.fk-certificate__title {
    font-size: 40px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 16px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.fk-certificate__subtitle {
    font-size: 16px;
    color: #6b7280;
    line-height: 1.7;
}

/* Carousel Container */
.fk-certificate__carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 1;
}

/* Track Wrapper */
.fk-certificate__track-wrapper {
    overflow: hidden;
    flex: 1;
}

/* Track */
.fk-certificate__track {
    display: flex;
    gap: 28px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Cards */
.fk-certificate__card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 0 0 calc((100% - 56px) / 3);
    min-width: 0;
}

.fk-certificate__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.fk-certificate__accent-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--fk-accent, #6c63ff);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.fk-certificate__card:hover .fk-certificate__accent-bar {
    transform: scaleX(1);
}

.fk-certificate__image-wrap {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f1f1f1;
    position: relative;
}

.fk-certificate__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.fk-certificate__card:hover .fk-certificate__image {
    transform: scale(1.08);
}

.fk-certificate__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--fk-accent, #6c63ff) 0%, transparent 60%);
    opacity: 0.15;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.fk-certificate__card:hover .fk-certificate__overlay {
    opacity: 0.25;
}

.fk-certificate__badge {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 5px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.fk-certificate__body {
    padding: 24px 26px 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.fk-certificate__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.fk-certificate__issuer {
    font-size: 13px;
    font-weight: 600;
    color: var(--fk-accent, #6c63ff);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fk-certificate__date {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}

.fk-certificate__name {
    font-size: 19px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
    line-height: 1.4;
    flex: 1;
}

.fk-certificate__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--fk-accent, #6c63ff);
    text-decoration: none;
    transition: gap 0.25s ease, color 0.2s ease;
    margin-top: auto;
}

.fk-certificate__link:hover {
    gap: 12px;
    color: #1a1a1a;
}

.fk-certificate__link svg {
    transition: transform 0.25s ease;
}

.fk-certificate__link:hover svg {
    transform: translateX(2px);
}

/* Navigation Arrows */
.fk-certificate__arrow {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    color: #1a1a1a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.fk-certificate__arrow:hover {
    background: #6c63ff;
    border-color: #6c63ff;
    color: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.3);
}

.fk-certificate__arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.fk-certificate__arrow--prev {
    margin-left: -60px;
}

.fk-certificate__arrow--next {
    margin-right: -60px;
}

/* Pagination Dots */
.fk-certificate__dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.fk-certificate__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d1d5db;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fk-certificate__dot:hover {
    background: #9ca3af;
}

.fk-certificate__dot.active {
    background: #6c63ff;
    width: 30px;
    border-radius: 5px;
}

/* Responsive */
@media (max-width: 1024px) {
    .fk-certificate__card {
        flex: 0 0 calc((100% - 28px) / 2);
    }
}

@media (max-width: 768px) {
    .fk-certificate {
        padding: 70px 0;
    }

    .fk-certificate__title {
        font-size: 32px;
    }

    .fk-certificate__card {
        flex: 0 0 100%;
    }

    .fk-certificate__track {
        gap: 20px;
    }

    .fk-certificate__arrow {
        width: 40px;
        height: 40px;
    }

    .fk-certificate__arrow--prev {
        margin-left: -50px;
    }

    .fk-certificate__arrow--next {
        margin-right: -50px;
    }
}

/* Dark mode overrides: respond to the site's `data-theme="dark"` root attribute */
[data-theme="dark"] .fk-certificate {
    background: var(--bg);
}

[data-theme="dark"] .fk-certificate::before,
[data-theme="dark"] .fk-certificate::after {
    background: transparent;
}

[data-theme="dark"] .fk-certificate__label {
    color: var(--accent);
    background: rgba(96,165,250,0.08);
}

[data-theme="dark"] .fk-certificate__title,
[data-theme="dark"] .fk-certificate__name {
    color: var(--ink);
}

[data-theme="dark"] .fk-certificate__subtitle,
[data-theme="dark"] .fk-certificate__date {
    color: var(--ink2);
}

[data-theme="dark"] .fk-certificate__card {
    background: var(--surface);
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
    border: 1px solid var(--border);
}

[data-theme="dark"] .fk-certificate__image-wrap {
    background: rgba(255,255,255,0.03);
}

[data-theme="dark"] .fk-certificate__badge {
    background: rgba(255,255,255,0.06);
    color: var(--ink);
    backdrop-filter: blur(6px);
}

[data-theme="dark"] .fk-certificate__link {
    color: var(--accent);
}

[data-theme="dark"] .fk-certificate__arrow {
    background: var(--surface);
    border-color: var(--border);
    color: var(--ink);
    box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}

[data-theme="dark"] .fk-certificate__arrow:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #000000;
}
