/* Base Layout */
.custom-portfolio-wrapper {
    display: flex;
    flex-direction: column;
}

.cp-items-container {
    display: flex;
    flex-direction: column;
}

.cp-item {
    border-bottom: 1px solid transparent; 
    padding: 50px 0;
}

.cp-item:first-child {
    border-top: 1px solid transparent;
}

/* Header Content */
.cp-item-header {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.cp-index {
    min-width: 40px;
}

.cp-image-wrap {
    flex: 0 0 45%;
}

.cp-image-wrap img {
    width: 100%;
    display: block;
    border-radius: 12px;
}

.cp-header-content {
    flex: 1;
}

.cp-project-title p {
    margin: 0;
    padding: 0;
}

/* Stats */
.cp-stats-row {
    display: flex;
    gap: 50px;
    margin: 20px 0 30px 0;
}

.cp-stat-box {
    display: flex;
    flex-direction: column;
    min-width: 120px;
}

.cp-stat-val {
    display: block;
    line-height: 1;
    border-bottom: 1px solid transparent;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.cp-stat-label {
    /* Font style handled in Elementor */
}

.cp-toggle-btn {
    cursor: pointer;
    display: inline-block;
    transition: opacity 0.3s ease;
}

.cp-toggle-btn:hover {
    opacity: 0.7;
}

/* Toggling Mechanisms */
.cp-item-details {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s ease-out;
    padding-left: 70px;
}

.cp-details-inner {
    overflow: hidden;
}

.cp-item.is-active .cp-item-details {
    grid-template-rows: 1fr;
}

.cp-item.is-active .cp-details-inner {
    padding-top: 30px;
}

/* Testimonial Box */
.cp-testimonial {
    padding: 30px 40px;
    margin-top: 40px;
    text-align: center;
}

.cp-quote-icon {
    width: 28px;
    margin-bottom: 15px;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.cp-quote-text {
    margin: 15px 0 20px 0;
}

/* --- Bottom CTA Section --- */
.cp-cta-wrapper {
    display: flex;
    align-items: flex-start;
    padding: 60px 40px;
    margin-top: 50px;
    border-radius: 12px;
}

.cp-cta-left {
    flex: 0 0 30%;
}

.cp-cta-subtitle {
    display: block;
}

.cp-cta-right {
    flex: 1;
}

.cp-cta-title {
    margin: 0 0 30px 0;
    line-height: 1.2;
}

.cp-cta-link-area {
    display: inline-flex;
    align-items: center;
}

.cp-cta-link {
    display: flex;
    align-items: center;
    text-decoration: none !important;
    gap: 20px;
}

.cp-cta-link-text {
    border-bottom: 1px solid transparent; 
    padding-bottom: 2px;
}

.cp-cta-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 4px;
    transition: opacity 0.3s ease;
}

.cp-cta-link:hover .cp-cta-btn-icon {
    opacity: 0.8;
}

.cp-cta-btn-icon i,
.cp-cta-btn-icon svg {
    font-size: 16px;
    width: 1em;
    height: 1em;
}

/* Responsive CTA */
@media (max-width: 768px) {
    .cp-cta-wrapper {
        flex-direction: column;
        gap: 20px;
    }
    .cp-cta-left, .cp-cta-right {
        flex: auto;
        width: 100%;
    }
}