/* Certifications grid + modal */
.wpo-certifications-area {
    position: relative;
    overflow: hidden;
}

.wpo-certifications-area .container {
    position: relative;
    z-index: 1;
}

/* Decorative SVG was in document flow (1495px tall) — position like skills section */
.wpo-certifications-area .ab-shape {
    position: absolute;
    left: 0;
    top: -40%;
    z-index: 0;
    pointer-events: none;
    width: 100%;
    max-width: 995px;
}

.wpo-certifications-area .ab-shape svg {
    display: block;
    width: 100%;
    height: auto;
}

.wpo-certifications-area.wpo-certifications-area--home {
    padding-bottom: 70px;
}

.wpo-certifications-area .cert-grid {
    padding-bottom: 0;
}

.wpo-certifications-area .cert-grid .row > [class*="col-"] {
    display: flex;
    margin-bottom: 30px;
}

.wpo-certifications-area .cert-grid .cert-card {
    width: 100%;
    margin-bottom: 0;
}

/* Card typography — explicit spans so work-area green does not override */
.wpo-certifications-area .cert-card__title {
    display: block;
    color: #fff !important;
    font-weight: 700;
    font-size: 17px;
    line-height: 1.35;
    margin-bottom: 8px;
}

.wpo-certifications-area .cert-card__tagline {
    display: block;
    color: #9ca3af !important;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.5;
    margin-top: 0;
}

.wpo-certifications-area .wpo-work-wrap .wpo-work-item.cert-card ul li.position {
    color: inherit;
}

.wpo-certifications-area .cert-card {
    cursor: pointer;
    transition: border-color 0.25s ease, transform 0.25s ease;
    height: 100%;
    overflow: hidden;
}

.wpo-certifications-area .cert-card:hover,
.wpo-certifications-area .cert-card:focus {
    border-color: #59c378 !important;
    transform: translateY(-4px);
    outline: none;
}

/* Brand badge on cards — generic certificate icon */
.wpo-certifications-area .cert-card__brand-slot {
    display: flex;
    justify-content: center;
    margin-bottom: 18px !important;
}

.cert-card__brand-badge--icon {
    background: #1a1a1a;
    border: 1px solid #2e2e2e;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    margin: 0 auto;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cert-card__brand-badge .cert-brand--icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.cert-card__brand-badge .cert-brand__icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4aa86a, #59c378);
    box-shadow: 0 4px 14px rgba(89, 195, 120, 0.35);
}

.cert-card__brand-badge .cert-brand__icon-wrap .fi {
    font-size: 28px;
    line-height: 1;
    color: #ffffff;
}

.cert-card__brand-badge .cert-brand__icon-wrap .fi::before {
    margin: 0;
    color: #ffffff;
}

.cert-card__brand-badge .cert-brand__provider {
    display: none;
}

/* Modal / inline brand row */
.cert-brand {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.cert-panel__head .cert-brand {
    margin-bottom: 12px;
}

.cert-brand__coursera {
    display: block;
    height: 22px;
    width: auto;
    max-width: 110px;
    object-fit: contain;
}

.cert-brand__powered {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cert-brand__powered-label {
    color: #9ca3af;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cert-brand__google {
    display: block;
    height: 18px;
    width: auto;
    max-width: 64px;
    object-fit: contain;
}

.cert-brand__google--solo {
    height: 24px;
    max-width: 80px;
}

.cert-brand__icon-wrap--modal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4aa86a, #59c378);
    box-shadow: 0 2px 10px rgba(89, 195, 120, 0.3);
}

.cert-brand__icon-wrap--modal .fi {
    font-size: 22px;
    color: #ffffff;
}

.cert-brand__icon-wrap--modal .fi::before {
    margin: 0;
    color: #ffffff;
}

.cert-panel__head .cert-brand__provider {
    color: #9ca3af;
    font-size: 14px;
    font-weight: 600;
}

/* Hide default large provider line on cert cards */
.wpo-certifications-area .cert-card ul li.date {
    display: none !important;
}

.wpo-certifications-area .cert-card__brand-slot img {
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-sizing: border-box;
}

.cert-card__trigger {
    color: #fff;
    font-weight: 700;
    font-size: 16px;
}

.cert-card__trigger::before {
    content: "→ ";
}

.cert-view-all {
    text-align: center;
    margin-top: 24px;
    margin-bottom: 0;
}

.cert-view-all .theme-btn {
    display: inline-block;
    border-radius: 50px;
}

body.cert-modal-open {
    overflow: hidden;
}

.cert-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.cert-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.cert-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(4px);
}

.cert-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 780px;
    max-height: min(92vh, 920px);
    overflow-y: auto;
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    padding: 32px 28px 28px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
    z-index: 1;
}

.cert-modal__close {
    position: absolute;
    top: 16px;
    right: 18px;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #9ca3af;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.cert-modal__close:hover {
    color: #fff;
}

.cert-panel[hidden] {
    display: none !important;
}

.cert-panel.is-active {
    display: block;
}

.cert-panel__meta {
    color: #59c378;
    font-size: 14px;
    margin-bottom: 8px;
}

.cert-panel__title {
    color: #fff;
    font-size: clamp(24px, 3.5vw, 32px);
    font-weight: 700;
    margin: 0 0 8px;
}

.cert-panel__tagline {
    color: #9ca3af;
    font-size: 15px;
    margin: 0 0 20px;
}

.cert-panel__image-wrap {
    margin-bottom: 24px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #333;
    background: #1c1c1c;
}

.cert-panel__image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
    background: #fff;
}

.cert-panel__highlight {
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(129, 140, 248, 0.35);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.cert-panel__highlight h3,
.cert-panel__list-wrap h3 {
    color: #a5b4fc;
    font-size: 18px;
    margin: 0 0 10px;
}

.cert-panel__highlight p {
    color: #e5e7eb;
    font-size: 15px;
    line-height: 1.65;
    margin: 0;
}

.cert-panel__list-wrap h3 {
    color: #fff;
    margin-bottom: 16px;
}

.cert-panel__list {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
}

.cert-panel__list li {
    position: relative;
    padding-left: 36px;
    margin-bottom: 14px;
    color: #e5e7eb;
    font-size: 15px;
    line-height: 1.55;
}

.cert-panel__list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cert-panel__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

@media (max-width: 575px) {
    .cert-modal__dialog {
        padding: 28px 20px 22px;
    }

    .cert-panel__actions {
        flex-direction: column;
    }

    .cert-panel__actions .work-exp-btn {
        width: 100%;
    }
}

/* Common partner badge (Coursera × Google, Coursera × IBM, etc.) */
.cert-card__brand-badge--logos {
    width: auto;
    min-width: 0;
    max-width: 100%;
    height: auto;
    min-height: 52px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
}

.cert-brand--badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.cert-brand__badge-common {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
}

.cert-brand__badge-common--card {
    max-height: 28px;
    width: auto;
}

.cert-panel__head .cert-brand__badge-common {
    max-height: 32px;
    width: auto;
}

.cert-brand__provider--card {
    font-size: 0.85rem;
    font-weight: 700;
    color: #f5c518;
}

/* Certifications carousel — index-2.php & about.php (same loop style as Recent Work) */
.wpo-certifications-area--horizontal-scroll {
    overflow: visible;
}

.wpo-certifications-area--horizontal-scroll .container {
    overflow: visible;
}

.cert-grid--carousel {
    margin-bottom: 0;
    padding-bottom: 0;
    overflow: hidden;
}

/* No owl dot pagination on certifications carousel */
.cert-grid--carousel > .owl-dots,
.cert-grid-slide.owl-carousel > .owl-dots,
.cert-grid-slide > .owl-dots,
.cert-grid-slide .owl-dots,
.cert-grid-slide .owl-dots button.owl-dot,
.wpo-certifications-area .owl-dots {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

.cert-grid--carousel .cert-carousel__item {
    padding: 4px 2px;
}

.cert-grid--carousel .cert-carousel__item .cert-card {
    height: 100%;
    min-height: 280px;
    margin-bottom: 0;
}

.cert-grid--carousel .owl-nav {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-top: 28px;
    width: 100%;
}

.cert-grid--carousel .owl-nav button,
.cert-grid--carousel .owl-nav button.owl-prev,
.cert-grid--carousel .owl-nav button.owl-next {
    position: relative;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    width: 50px;
    margin: 0;
    padding: 0;
    line-height: 1;
    text-align: center;
    background: transparent;
    border: 1px solid #59c378;
    color: #59c378;
    border-radius: 50%;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.cert-grid--carousel .owl-nav button:hover,
.cert-grid--carousel .owl-nav button:focus {
    background: #59c378;
    color: #fff;
    outline: none;
    transform: translateY(-2px) !important;
}

.cert-grid--carousel .owl-nav button:active {
    transform: translateY(0) !important;
}

.cert-grid--carousel .owl-nav button .ti,
.cert-grid--carousel .owl-nav button .fi {
    line-height: 1;
}

.profile-edu-cert__block--certs.wpo-certifications-area--horizontal-scroll .cert-view-all,
.wpo-certifications-area--horizontal-scroll .cert-view-all,
.profile-edu-cert__cta-wrap.cert-view-all {
    margin-top: 32px;
}

@media (max-width: 767px) {
    .cert-grid--carousel .owl-nav {
        margin-top: 22px;
        gap: 20px;
    }

    .profile-edu-cert__block--certs.wpo-certifications-area--horizontal-scroll .cert-view-all,
    .profile-edu-cert__cta-wrap.cert-view-all {
        margin-top: 28px;
    }
}

@media (max-width: 575px) {
    .cert-grid--carousel .owl-nav {
        display: none;
    }
}
