/* Nordpaa Process Diagram - Frontend Styles */

/* ========================================
   COMMON STYLES FOR ALL LAYOUTS
   ======================================== */

.nordpaa-process-diagram {
    width: 100%;
    max-width: 1400px;
    margin: 40px auto;
    padding: 20px;
    box-sizing: border-box;
}

.nordpaa-process-diagram * {
    box-sizing: border-box;
}

.nordpaa-process-diagram .step-card {
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.nordpaa-process-diagram .step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.nordpaa-process-diagram .step-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.nordpaa-process-diagram .step-description {
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}

.nordpaa-process-diagram .step-description-wrapper {
    position: relative;
}

/* Read More Functionality (Mobile Only) */
@media screen and (max-width: 768px) {
    .nordpaa-process-diagram .step-description.has-read-more.collapsed {
        position: relative;
        overflow: hidden;
        max-height: calc(1.6em * var(--lines, 3));
        transition: max-height 0.4s ease;
    }
    
    .nordpaa-process-diagram .step-description.has-read-more.collapsed::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 2em;
        background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.95));
        pointer-events: none;
    }
    
    .nordpaa-process-diagram .step-description.has-read-more.expanded {
        max-height: none;
    }
    
    .nordpaa-process-diagram .read-more-btn {
        display: inline-block;
        margin-top: 12px;
        padding: 10px 20px;
        background: rgba(0, 0, 0, 0.05);
        border: 2px solid currentColor;
        border-radius: 6px;
        color: inherit;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        position: relative;
        z-index: 10;
    }
    
    .nordpaa-process-diagram .read-more-btn:hover {
        background: currentColor;
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }
    
    .nordpaa-process-diagram .step-description-wrapper.collapsed .read-more-btn {
        display: inline-block;
    }
    
    .nordpaa-process-diagram .step-description-wrapper.expanded .read-more-btn {
        display: none;
    }
}

/* Step Numbers */
.nordpaa-process-diagram .step-number-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: #fff;
    margin-bottom: 15px;
}

.nordpaa-process-diagram .step-number-badge.circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
}

.nordpaa-process-diagram .step-number-badge.square {
    width: 45px;
    height: 45px;
    border-radius: 6px;
}

.nordpaa-process-diagram .step-number-badge.simple {
    background: transparent !important;
    color: inherit;
    font-size: 24px;
}

/* Icons */
.nordpaa-process-diagram .step-icon {
    margin-bottom: 20px;
}

.nordpaa-process-diagram .step-icon img {
    display: block;
    max-width: 100%;
    height: auto;
}

.nordpaa-process-diagram .step-icon.icon-style-normal img {
    max-width: 80px;
    max-height: 80px;
}

.nordpaa-process-diagram .step-icon.icon-style-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    padding: 20px;
}

.nordpaa-process-diagram .step-icon.icon-style-circle img {
    max-width: 60px;
    max-height: 60px;
}

.nordpaa-process-diagram .step-icon.icon-style-background {
    position: relative;
    height: 120px;
    margin-bottom: 20px;
}

.nordpaa-process-diagram .step-icon.icon-style-background img {
    position: absolute;
    top: 0;
    right: 0;
    opacity: 0.15;
    max-width: 150px;
    max-height: 150px;
}

/* ========================================
   HORIZONTAL FLOW LAYOUT
   ======================================== */

.nordpaa-process-diagram.horizontal-flow .process-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
}

.nordpaa-process-diagram.horizontal-flow .process-step {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.nordpaa-process-diagram.horizontal-flow .step-card {
    min-width: 200px;
    max-width: 280px;
    text-align: center;
    position: relative;
}

.nordpaa-process-diagram.horizontal-flow .step-arrow {
    width: 50px;
    height: 80px;
    flex-shrink: 0;
    margin: 0 10px;
}

.nordpaa-process-diagram.horizontal-flow .step-arrow svg {
    width: 100%;
    height: 100%;
}

/* ========================================
   VERTICAL CARDS LAYOUT
   ======================================== */

.nordpaa-process-diagram.vertical-cards .process-timeline {
    position: relative;
    padding-left: 60px;
}

.nordpaa-process-diagram.vertical-cards .timeline-line {
    position: absolute;
    left: 25px;
    top: 0;
    bottom: 0;
    width: 4px;
    opacity: 0.3;
}

.nordpaa-process-diagram.vertical-cards .process-step {
    position: relative;
    margin-bottom: 40px;
    display: flex;
    align-items: flex-start;
}

.nordpaa-process-diagram.vertical-cards .process-step:last-child {
    margin-bottom: 0;
}

.nordpaa-process-diagram.vertical-cards .step-connector {
    position: absolute;
    left: -60px;
    top: 0;
    width: 50px;
    display: flex;
    justify-content: center;
}

.nordpaa-process-diagram.vertical-cards .step-number-badge {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    flex-shrink: 0;
    z-index: 2;
}

.nordpaa-process-diagram.vertical-cards .step-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 4px solid #fff;
    z-index: 2;
}

.nordpaa-process-diagram.vertical-cards .step-card {
    flex: 1;
    display: flex;
    gap: 25px;
}

.nordpaa-process-diagram.vertical-cards .step-icon {
    flex-shrink: 0;
    margin-bottom: 0;
}

.nordpaa-process-diagram.vertical-cards .step-content {
    flex: 1;
}

/* ========================================
   HORIZONTAL SLIDER LAYOUT
   ======================================== */

.nordpaa-process-diagram.horizontal-slider .slider-wrapper {
    position: relative;
    overflow: hidden;
}

.nordpaa-process-diagram.horizontal-slider .slider-container {
    display: flex;
    transition: transform 0.5s ease;
}

.nordpaa-process-diagram.horizontal-slider .process-slide {
    min-width: 100%;
    padding: 20px;
}

.nordpaa-process-diagram.horizontal-slider .slide-card {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.nordpaa-process-diagram.horizontal-slider .slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 10;
}

.nordpaa-process-diagram.horizontal-slider .slider-nav:hover {
    opacity: 0.9;
    transform: translateY(-50%) scale(1.1);
}

.nordpaa-process-diagram.horizontal-slider .slider-nav.prev {
    left: 20px;
}

.nordpaa-process-diagram.horizontal-slider .slider-nav.next {
    right: 20px;
}

.nordpaa-process-diagram.horizontal-slider .slider-nav svg {
    width: 24px;
    height: 24px;
}

.nordpaa-process-diagram.horizontal-slider .slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.nordpaa-process-diagram.horizontal-slider .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    padding: 0;
}

.nordpaa-process-diagram.horizontal-slider .dot:hover {
    transform: scale(1.2);
}

.nordpaa-process-diagram.horizontal-slider .slider-progress {
    text-align: center;
    margin-top: 20px;
}

.nordpaa-process-diagram.horizontal-slider .progress-text {
    font-size: 18px;
    font-weight: 600;
}

/* ========================================
   CREATIVE PATH LAYOUT
   ======================================== */

.nordpaa-process-diagram.creative-path {
    position: relative;
}

.nordpaa-process-diagram.creative-path .process-path {
    width: 100%;
    height: auto;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
}

.nordpaa-process-diagram.creative-path .process-steps {
    position: relative;
    z-index: 1;
}

.nordpaa-process-diagram.creative-path .process-step {
    margin-bottom: 50px;
    display: flex;
    align-items: center;
}

.nordpaa-process-diagram.creative-path .process-step.side-left {
    justify-content: flex-start;
}

.nordpaa-process-diagram.creative-path .process-step.side-right {
    justify-content: flex-end;
}

.nordpaa-process-diagram.creative-path .step-card {
    max-width: 450px;
    width: 100%;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media screen and (max-width: 1024px) {
    .nordpaa-process-diagram {
        padding: 15px;
    }
    
    /* Horizontal Flow */
    .nordpaa-process-diagram.horizontal-flow .process-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .nordpaa-process-diagram.horizontal-flow .step-arrow {
        transform: rotate(90deg);
        margin: 0;
    }
    
    /* Creative Path */
    .nordpaa-process-diagram.creative-path .process-step {
        justify-content: center !important;
    }
    
    .nordpaa-process-diagram.creative-path .process-path {
        display: none;
    }
}

@media screen and (max-width: 768px) {
    .nordpaa-process-diagram .step-title {
        font-size: 20px;
    }
    
    .nordpaa-process-diagram .step-description {
        font-size: 15px;
    }
    
    /* Vertical Cards */
    .nordpaa-process-diagram.vertical-cards .process-timeline {
        padding-left: 40px;
    }
    
    .nordpaa-process-diagram.vertical-cards .step-connector {
        left: -40px;
    }
    
    .nordpaa-process-diagram.vertical-cards .step-card {
        flex-direction: column;
        gap: 15px;
    }
    
    .nordpaa-process-diagram.vertical-cards .step-icon {
        align-self: center;
    }
    
    /* Slider */
    .nordpaa-process-diagram.horizontal-slider .slide-card {
        min-height: 350px;
    }
    
    .nordpaa-process-diagram.horizontal-slider .slider-nav {
        width: 40px;
        height: 40px;
    }
    
    .nordpaa-process-diagram.horizontal-slider .slider-nav.prev {
        left: 10px;
    }
    
    .nordpaa-process-diagram.horizontal-slider .slider-nav.next {
        right: 10px;
    }
}

@media screen and (max-width: 480px) {
    .nordpaa-process-diagram {
        margin: 20px auto;
        padding: 10px;
    }
    
    .nordpaa-process-diagram .step-title {
        font-size: 18px;
    }
    
    .nordpaa-process-diagram .step-description {
        font-size: 14px;
    }
    
    .nordpaa-process-diagram .step-icon.icon-style-normal img {
        max-width: 60px;
        max-height: 60px;
    }
    
    /* Vertical Cards */
    .nordpaa-process-diagram.vertical-cards .process-timeline {
        padding-left: 30px;
    }
    
    .nordpaa-process-diagram.vertical-cards .step-connector {
        left: -30px;
    }
    
    .nordpaa-process-diagram.vertical-cards .step-number-badge {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .nordpaa-process-diagram.vertical-cards .timeline-line {
        left: 15px;
        width: 3px;
    }
    
    /* Slider */
    .nordpaa-process-diagram.horizontal-slider .slide-card {
        min-height: 300px;
    }
    
    .nordpaa-process-diagram.horizontal-slider .slider-nav {
        width: 35px;
        height: 35px;
    }
}

/* Print Styles */
@media print {
    .nordpaa-process-diagram {
        max-width: 100%;
    }
    
    .nordpaa-process-diagram .step-card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
    
    .nordpaa-process-diagram.horizontal-slider .slider-nav,
    .nordpaa-process-diagram.horizontal-slider .slider-dots {
        display: none;
    }
}
