/* ========================================
   Case Studies Navigation Optimization
   Previous/Next Page Navigation Styles
   ======================================== */

/* Fix for single column layout - center content properly */
.s_b2_3cont1 .s_b2_3contl.fl {
    width: 100%;
    max-width: 100%;
    padding-right: 0;
    float: none;
}

/* Navigation Article Container */
.s_b2_3contlsx {
    padding-top: 30px;
}

.s_b2_3contlsxnr {
    max-width: 48%;
}

/* Navigation Link Styles */
.s_b2_3contlsxnr a.nav-article {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    font-family: "MontserratLight";
    font-size: 18px;
    color: #333;
    line-height: 1.75;
    transition: all 0.36s;
    text-decoration: none;
}

/* Label (Previous Page / Next Page) */
.s_b2_3contlsxnr .nav-label {
    flex-shrink: 0;
    display: inline-block;
    white-space: nowrap;
}

/* Title Text with Ellipsis */
.s_b2_3contlsxnr .nav-title {
    flex: 1;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* Hover Effects */
.s_b2_3contlsxnr:hover a.nav-article {
    color: #333;
}

.s_b2_3contlsxnr:hover a.nav-article .nav-title {
    color: #e60012;
    text-decoration: underline;
}

/* No hover effect for "No More" links */
.s_b2_3contlsxnr a:not(.nav-article) {
    cursor: default;
}

.s_b2_3contlsxnr:hover a:not(.nav-article) {
    color: #333;
}

/* Right Aligned (Next Page) */
.s_b2_3contlsxnr.fr a.nav-article {
    text-align: right;
    justify-content: flex-end;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .s_b2_3contlsxnr {
        max-width: 47%;
    }
    
    .s_b2_3contlsxnr a.nav-article {
        font-size: 16px;
    }
}

@media screen and (max-width: 768px) {
    .s_b2_3contlsx {
        padding-top: 20px;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    
    .s_b2_3contlsxnr {
        max-width: 100%;
        width: 100%;
        float: none !important;
    }
    
    .s_b2_3contlsxnr a.nav-article {
        font-size: 15px;
        line-height: 1.6;
        flex-wrap: wrap;
    }
    
    .s_b2_3contlsxnr .nav-label {
        width: 100%;
        margin-bottom: 4px;
        font-weight: 600;
    }
    
    .s_b2_3contlsxnr .nav-title {
        width: 100%;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        text-overflow: ellipsis;
        overflow: hidden;
    }
    
    .s_b2_3contlsxnr.fr a.nav-article {
        text-align: left;
        justify-content: flex-start;
    }
}

@media screen and (max-width: 480px) {
    .s_b2_3contlsxnr a.nav-article {
        font-size: 14px;
    }
    
    .s_b2_3contlsxnr .nav-title {
        -webkit-line-clamp: 2;
    }
}

/* Desktop - Show full title on hover with tooltip-like effect */
@media screen and (min-width: 769px) {
    .s_b2_3contlsxnr a.nav-article {
        position: relative;
    }
    
    /* Optional: Create a pseudo-tooltip effect */
    .s_b2_3contlsxnr a.nav-article::after {
        content: attr(title);
        position: absolute;
        bottom: calc(100% + 8px);
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.9);
        color: #fff;
        padding: 8px 12px;
        border-radius: 6px;
        font-size: 14px;
        line-height: 1.4;
        white-space: normal;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s, visibility 0.3s;
        pointer-events: none;
        z-index: 100;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    .s_b2_3contlsxnr.fr a.nav-article::after {
        left: auto;
        right: 0;
    }
    
    .s_b2_3contlsxnr a.nav-article:hover::after {
        opacity: 1;
        visibility: visible;
    }
    
    /* Arrow for tooltip */
    .s_b2_3contlsxnr a.nav-article::before {
        content: '';
        position: absolute;
        bottom: calc(100% + 2px);
        left: 20px;
        border: 6px solid transparent;
        border-top-color: rgba(0, 0, 0, 0.9);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s, visibility 0.3s;
        pointer-events: none;
        z-index: 101;
    }
    
    .s_b2_3contlsxnr.fr a.nav-article::before {
        left: auto;
        right: 20px;
    }
    
    .s_b2_3contlsxnr a.nav-article:hover::before {
        opacity: 1;
        visibility: visible;
    }
}
