/**
 * Process Steps Widget Styles - CPD Bangladesh
 */

.cpd-process-steps-widget {
    width: 100%;
    background-color: #fff;
    position: relative;
    overflow: hidden;
}

/* Header Section */
.process-steps-header {
    text-align: center;
    margin-bottom: 60px;
    margin-left: auto;
    margin-right: auto;
}

.process-steps-header .section-title {
    margin: 0 0 20px 0;
    font-size: 48px;
    font-weight: 600;
    line-height: 1.25;
    color: #000000;
    letter-spacing: -0.02em;
}

.process-steps-header .section-description {
    margin: 0;
    font-size: 18px;
    line-height: 1.6;
    color: #666666;
}

/* Section Image Styling */
.section-image {
    margin: 30px 0 0 0;
    display: block;
    width: 100%;
    height: auto;
}


.section-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    transition: transform 0.3s ease;
}


/* Container */
.process-steps-container {
    margin: 0 auto;
    position: relative;
}

.process-steps-wrapper {
    position: relative;
    width: 100%;
}

.circular-step{
    padding-bottom: 40px;
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(106, 114, 130, 0.25);
}

.circular-step:last-child{
    border-bottom: none;
}

/* Circular Layout */
.circular-process-container {
    position: relative;
    margin: 0 auto;
}

.center-image {
    z-index: 10;
}

.center-icon {
    font-size: 48px;
    margin-bottom: 10px;
    animation: rotate 20s linear infinite;
}

.center-label {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}

/* Circular Steps */
.circular-step {
}

.circular-step .step-content {
    width: 100%;
    height: 100%;
    transition: all 0.3s ease;
}



/* Linear Layout */
.linear-process-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.linear-step {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.linear-step .step-content {
    background: #ffffff;
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    height: 100%;
}

.linear-step:hover .step-content {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

/* Grid Layout */
.grid-process-container {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-process-container[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.grid-process-container[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.grid-process-container[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

.grid-process-container[data-columns="5"] {
    grid-template-columns: repeat(5, 1fr);
}

.grid-step .step-content {
    background: #ffffff;
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    height: 100%;
}

.grid-step:hover .step-content {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border-color: #0093CA;
}

/* Step Components */
.step-image {
    overflow: hidden;
}

.step-image img {
    width: auto;
    height:  auto;
    margin: auto;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.3s ease;
    display: block;
}

/* Full width image styling - override default circular styling */
.elementor-repeater-item .step-image[style*="width: full"] {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 15px;
    height: auto;
    min-height: 120px;
    margin: 0 0 20px 0;
}

.elementor-repeater-item .step-image[style*="width: full"] img {
    height: 120px;
    min-height: 120px;
}

/* Auto width image styling - default circular styling */
.elementor-repeater-item .step-image[style*="width: auto"] {
    width: 80px !important;
    max-width: 80px !important;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px auto;
}

.elementor-repeater-item .step-image[style*="width: auto"] img {
    width: 100%;
    height: 100%;
}
.step-text-header{
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.step-icon-wrapper {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: all 0.3s ease;
}
.step-icon-wrapper svg{
    height: 45px;
    width: 45px;
}

.step-icon-wrapper:before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.2;
    transform: scale(0);
    transition: transform 0.3s ease;
}



.step-title {
    margin: 0 0 25px 0;
    color: #000;
    font-size: 32px;
    font-style: normal;
    font-weight: 400;
    line-height: 125%; /* 40px */
}

.step-description {
    color: #000;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 140%; /* 22.4px */
    margin-bottom: 40px;
}

.step-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0093CA;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.step-link:hover {
    color: #006fa3;
    transform: translateX(3px);
}

.step-link i {
    transition: transform 0.3s ease;
}

.step-link:hover i {
    transform: translateX(3px);
}



/* Animations */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.with-animations .process-step {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.with-animations .process-step:nth-child(1) { animation-delay: 0.1s; }
.with-animations .process-step:nth-child(2) { animation-delay: 0.2s; }
.with-animations .process-step:nth-child(3) { animation-delay: 0.3s; }
.with-animations .process-step:nth-child(4) { animation-delay: 0.4s; }
.with-animations .process-step:nth-child(5) { animation-delay: 0.5s; }
.with-animations .process-step:nth-child(6) { animation-delay: 0.6s; }

.with-animations .step-icon-wrapper {
    animation: scaleIn 0.5s ease-out forwards;
    animation-delay: inherit;
}

/* Responsive Design */




/* Focus States for Accessibility */
.step-link:focus {
    outline: 2px solid #0093CA;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Print Styles */
@media print {
    .cpd-process-steps-widget {
        background: none;
        padding: 20px 0;
    }

    .process-step {
        page-break-inside: avoid;
        margin-bottom: 20px;
    }

    .step-content {
        box-shadow: none;
        border: 1px solid #cccccc;
    }

    .step-link {
        color: #000000;
    }

    .step-link i {
        display: none;
    }


}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .step-content {
        border: 2px solid #000000;
    }

    .step-title,
    .step-description {
        color: #000000;
    }

    .step-link {
        color: #000000;
        border-bottom: 1px solid #000000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .process-step,
    .step-content,
    .step-icon-wrapper,
    .step-link,
    .center-icon {
        transition: none;
        animation: none;
    }

    .process-step:hover .step-content {
        transform: none;
    }

    .step-link:hover {
        transform: none;
    }

    .step-link:hover i {
        transform: none;
    }
}

/* RTL Support */
[dir="rtl"] .linear-process-container {
    direction: rtl;
}

[dir="rtl"] .step-link {
    flex-direction: row-reverse;
}

[dir="rtl"] .connecting-line {
    left: -20px;
    right: auto;
}

[dir="rtl"] .connecting-line:after {
    left: -6px;
    right: auto;
    border-left: none;
    border-right: 8px solid #0093CA;
}

[dir="rtl"] .step-number {
    left: -10px;
    right: auto;
}

/* ========================================
   Graph Visualization Styles
   ======================================== */
/* Graph Container Base - Enhanced Responsive */
.step-graph-container {
    position: relative;
    width: 100%;
    height: 600px;
    margin: 20px auto;
    padding: 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #f0f3f8 100%);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.step-graph-container:hover {
    box-shadow: 0 4px 16px rgba(0, 147, 202, 0.15);
    transform: translateY(-2px);
}

.step-graph-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Responsive container sizing */
@media (max-width: 480px) {
    .step-graph-container {
        height: 400px;
        margin: 15px auto;
        border-radius: 6px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .step-graph-container {
        height: 500px;
        margin: 18px auto;
        border-radius: 7px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .step-graph-container {
        height: 550px;
        border-radius: 8px;
    }
}

@media (min-width: 1025px) {
    .step-graph-container {
        height: 600px;
        border-radius: 8px;
    }
}

/* Graph Tooltip - Enhanced Responsive */
.graph-tooltip {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    pointer-events: none;
    opacity: 0;
    display: none;
    transition: all 0.3s ease;
    z-index: 10000;
    white-space: normal;
    border-left: 4px solid #0093CA;
    word-wrap: break-word;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
    font-weight: 500;
    overflow: hidden;
    backdrop-filter: blur(2px);
    max-height: 300px;
    transform: translateY(-10px);
}

.graph-tooltip.visible {
    opacity: 1;
    display: block !important;
    transform: translateY(0);
}

.graph-tooltip:not(.visible) {
    opacity: 0;
    display: none;
    transform: translateY(-10px);
}

/* Enhanced Responsive Tooltip Sizing */
@media (max-width: 480px) {
    .graph-tooltip {
        font-size: 12px;
        padding: 12px 14px;
        border-left-width: 3px;
        border-radius: 6px;
        max-width: 90vw;
    }
}

@media (min-width: 481px) and (max-width: 767px) {
    .graph-tooltip {
        font-size: 13px;
        padding: 13px 16px;
        border-left-width: 3px;
        max-width: 250px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .graph-tooltip {
        font-size: 14px;
        padding: 14px 17px;
        border-left-width: 4px;
        max-width: 280px;
    }
}

@media (min-width: 1024px) {
    .graph-tooltip {
        font-size: 15px;
        padding: 16px 20px;
        border-left-width: 4px;
        max-width: 320px;
    }
}

/* Pie Segment Icons - Responsive & Non-overlapping */
.pie-segment-icon {
    position: absolute;
    min-width: 25px;
    min-height: 25px;
    max-width: 40px;
    max-height: 40px;
    z-index: 6;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
    padding: 3px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: transform 0.2s ease;
}

.pie-segment-icon:hover {
    transform: scale(1.1);
    z-index: 7;
}

.pie-segment-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Enhanced responsive icon sizing */
@media (max-width: 480px) {
    .pie-segment-icon {
        min-width: 20px;
        min-height: 20px;
        max-width: 28px;
        max-height: 28px;
        padding: 2px;
        border-width: 1px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .pie-segment-icon {
        min-width: 22px;
        min-height: 22px;
        max-width: 32px;
        max-height: 32px;
        padding: 2px;
    }
}

@media (min-width: 769px) {
    .pie-segment-icon {
        min-width: 25px;
        min-height: 25px;
        max-width: 40px;
        max-height: 40px;
        padding: 3px;
    }
}

/* Pie Chart Icon Overlay - Responsive */
.pie-chart-icon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    z-index: 10;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    transition: all 0.2s ease;
}

.pie-chart-icon-overlay svg {
    width: 100%;
    height: 100%;
    color: #0093CA;
    fill: currentColor;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.15));
}

.pie-chart-icon-overlay i {
    font-size: 35px;
    color: #0093CA;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.15));
}

.pie-chart-icon-overlay span {
    color: #0093CA;
    font-size: 35px;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.15));
}

/* Responsive icon overlay sizing */
@media (max-width: 480px) {
    .pie-chart-icon-overlay {
        width: 28px;
        height: 28px;
        transform: translate(-50%, -65%);
    }

    .pie-chart-icon-overlay i,
    .pie-chart-icon-overlay span {
        font-size: 28px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .pie-chart-icon-overlay {
        width: 32px;
        height: 32px;
        transform: translate(-50%, -62%);
    }

    .pie-chart-icon-overlay i,
    .pie-chart-icon-overlay span {
        font-size: 32px;
    }
}

@media (min-width: 769px) {
    .pie-chart-icon-overlay {
        width: 35px;
        height: 35px;
        transform: translate(-50%, -60%);
    }

    .pie-chart-icon-overlay i,
    .pie-chart-icon-overlay span {
        font-size: 35px;
    }
}

/* Bar Chart Specific */
.step-graph-container[data-graph-type="bar"] {
    background: linear-gradient(135deg, #fafbfc 0%, #f5f8fc 100%);
}

/* Line Chart Specific */
.step-graph-container[data-graph-type="line"] {
    background: linear-gradient(135deg, #f0f6ff 0%, #f5f9ff 100%);
}

/* Progress Bars Specific */
.step-graph-container[data-graph-type="progress"] {
    height: auto;
    padding: 15px 20px;
    background: transparent;
    box-shadow: none;
}

.progress-bar-item {
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.progress-bar-item:last-child {
    margin-bottom: 0;
}

.progress-bar-label {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}

.progress-bar-value {
    font-weight: 600;
    color: #0093CA;
}

.progress-bar-track {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #0093CA 0%, #0076a3 100%);
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 4px rgba(0, 147, 202, 0.3);
}

.progress-bar-item:hover .progress-bar-fill {
    box-shadow: 0 4px 8px rgba(0, 147, 202, 0.4);
}

/* Pie Chart Specific */
.step-graph-container[data-graph-type="pie"] {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pie-chart-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pie-chart-legend {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 12px;
    max-width: 40%;
}

.pie-legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.pie-legend-item:hover {
    transform: translateX(4px);
}

.pie-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 8px;
}

.pie-legend-label {
    color: #666;
    cursor: pointer;
}

/* Animation for graphs */
@keyframes chartSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-graph-container {
    animation: chartSlideIn 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {

    .pie-chart-legend {
        right: 10px;
        top: 10px;
        font-size: 11px;
        max-width: 50%;
    }

    .progress-bar-item {
        margin-bottom: 12px;
    }

    .progress-bar-label {
        font-size: 12px;
    }
}

@media (max-width: 480px) {

    .pie-chart-legend {
        display: none;
    }

    .progress-bar-item {
        margin-bottom: 10px;
    }

    .progress-bar-label {
        font-size: 11px;
    }
}

