/* ==============================================
   CPT Post Slider for Elementor
   ============================================== */

.cpt-ps-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.cpt-ps-swiper {
    position: relative;
    overflow: hidden;
    padding-bottom: 48px;
    max-width: 100%;
}

/* ----- Card ----- */
.cpt-ps-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    position: relative;
    cursor: pointer;
}

.cpt-ps-card__link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    text-decoration: none;
}

/* Ensure inner links and buttons stay clickable above the overlay */
.cpt-ps-card__title a,
.cpt-ps-card__button {
    position: relative;
    z-index: 2;
}

.cpt-ps-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ----- Image ----- */
.cpt-ps-card__image-wrap {
    position: relative;
    overflow: hidden;
    width: 100%;
    background: #f0f0f0;
}

.cpt-ps-card__image-wrap[style] {
    height: 0;
}

.cpt-ps-card__image-wrap:not([style]) {
    height: auto;
}

.cpt-ps-card__image-wrap[style] .cpt-ps-card__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.cpt-ps-card__image-wrap:not([style]) .cpt-ps-card__image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.cpt-ps-card:hover .cpt-ps-card__image {
    transform: scale(1.05);
}

.cpt-ps-card__image-wrap a {
    display: block;
    line-height: 0;
}

/* ----- Content ----- */
.cpt-ps-card__content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 16px;
}

/* ----- Title ----- */
.cpt-ps-card__title {
    margin: 0 0 8px 0;
    font-size: 1.125rem;
    line-height: 1.4;
}

.cpt-ps-card__title a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cpt-ps-card__title a:hover {
    color: #4361ee;
}

/* ----- Custom Field ----- */
.cpt-ps-card__custom-field {
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 8px;
    color: #4361ee;
}

.cpt-ps-card__custom-field-label {
    font-weight: 600;
    color: #1a1a2e;
}

.cpt-ps-card__custom-field-value ul,
.cpt-ps-card__custom-field-value ol {
    margin: 4px 0;
    padding-left: 1.25em;
}

/* ----- Items WITH icon: hide bullets ----- */
.cpt-ps-card__custom-field-value li.cpt-ps-li-icon {
    margin-bottom: 4px;
    padding: 0 !important;
    padding-left: 0 !important;
    padding-inline-start: 0 !important;
    text-indent: 0 !important;
    line-height: 1.5;
    display: flex !important;
    align-items: center;
    gap: 8px;
    list-style: none !important;
    list-style-type: none !important;
}

.cpt-ps-card__custom-field-value li.cpt-ps-li-icon::before {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
}

.cpt-ps-card__custom-field-value li.cpt-ps-li-icon::marker {
    content: none !important;
    font-size: 0 !important;
}

.cpt-ps-card__custom-field-icon {
    flex-shrink: 0;
    width: 1em;
    text-align: center;
}

/* ----- Items WITHOUT icon: keep normal bullets ----- */
.cpt-ps-card__custom-field-value li.cpt-ps-li-bullet {
    margin-bottom: 2px;
    line-height: 1.5;
}

/* ----- Excerpt ----- */
.cpt-ps-card__excerpt {
    color: #555555;
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 16px;
    flex-grow: 1;
}

/* ----- Button ----- */
.cpt-ps-card__button-wrap {
    margin-top: auto;
}

.cpt-ps-card__button {
    display: inline-block;
    padding: 8px 20px;
    background: #4361ee;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.2s ease, transform 0.2s ease;
    line-height: 1.5;
}

.cpt-ps-card__button:hover {
    background: #3a56d4;
    color: #ffffff;
    transform: translateY(-1px);
}

/* ----- Navigation Arrows ----- */
.cpt-ps-arrow {
    position: absolute;
    top: calc(50% - 24px);
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    padding: 0;
    opacity: 0;
}

.cpt-ps-wrapper:hover .cpt-ps-arrow {
    opacity: 1;
}

.cpt-ps-arrow:hover {
    background: rgba(0, 0, 0, 0.75);
}

.cpt-ps-arrow--prev {
    left: 8px;
}

.cpt-ps-arrow--next {
    right: 8px;
}

.cpt-ps-arrow.swiper-button-disabled {
    opacity: 0.3;
    cursor: default;
}

.cpt-ps-arrow svg {
    flex-shrink: 0;
}

/* ----- Pagination Dots ----- */
.cpt-ps-pagination {
    text-align: center;
    margin-top: 16px;
    position: relative;
    bottom: 0;
}

.cpt-ps-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #cccccc;
    opacity: 1;
    margin: 0 5px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.cpt-ps-pagination .swiper-pagination-bullet-active {
    background: #4361ee;
    transform: scale(1.2);
}

/* ----- Swiper slide equal height ----- */
.cpt-ps-swiper .swiper-wrapper {
    align-items: stretch;
}

.cpt-ps-swiper .swiper-slide {
    height: auto;
}

/* ----- Editor Placeholder ----- */
.cpt-ps-editor-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    text-align: center;
}

.cpt-ps-editor-placeholder__icon {
    font-size: 48px;
    color: #adb5bd;
    margin-bottom: 16px;
}

.cpt-ps-editor-placeholder__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.cpt-ps-editor-placeholder__text {
    color: #6c757d;
    font-size: 0.875rem;
}

/* ----- Responsive ----- */
@media (max-width: 767px) {
    .cpt-ps-arrow {
        width: 32px;
        height: 32px;
    }

    .cpt-ps-arrow svg {
        width: 16px;
        height: 16px;
    }

    .cpt-ps-card__title {
        font-size: 1rem;
    }

    .cpt-ps-card__excerpt {
        font-size: 0.875rem;
    }

    .cpt-ps-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ----- Grid Layout ----- */
.cpt-ps-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
    width: 100% !important;
}

.cpt-ps-grid .cpt-ps-card {
    height: 100%;
    width: 100%;
}

/* ==============================================
   CPT Veld Display Widget
   ============================================== */

.cpt-fd-wrapper {
    width: 100%;
}

.cpt-fd-label {
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.cpt-fd-list ul,
.cpt-fd-list ol {
    margin: 0;
    padding-left: 1.25em;
}

/* Items WITH icon: hide bullets */
.cpt-fd-list li.cpt-fd-li-icon {
    margin-bottom: 8px;
    padding: 0 !important;
    padding-left: 0 !important;
    padding-inline-start: 0 !important;
    text-indent: 0 !important;
    line-height: 1.5;
    display: flex !important;
    align-items: center;
    gap: 10px;
    list-style: none !important;
    list-style-type: none !important;
}

.cpt-fd-list li.cpt-fd-li-icon::before {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
}

.cpt-fd-list li.cpt-fd-li-icon::marker {
    content: none !important;
    font-size: 0 !important;
}

.cpt-fd-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    font-size: 16px;
    color: #4361ee;
    text-align: center;
}

/* Items WITHOUT icon: keep normal bullets */
.cpt-fd-list li.cpt-fd-li-bullet {
    margin-bottom: 8px;
    line-height: 1.5;
}
