/* Example Navigation Tabs */
.nav-tabs {
    border: none;
    background: #f8f9fa;
    border-radius: 15px;
    padding: 0.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    width: 100%;
    justify-content: space-between;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.nav-tabs .nav-item {
    flex: 1;
    text-align: center;
    margin: 0;
    padding: 0;
    min-width: 0;
    position: relative;
}

.example-nav-link {
    border: none;
    border-radius: 10px;
    margin: 0 !important;
    padding: 0.75rem 1rem !important;
    font-weight: 700;
    transition: all 0.3s ease;
    color: #6c757d !important;
    background: rgba(102, 126, 234, 0.1) !important;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    width: 100% !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    min-height: 48px;
    line-height: 1.2;
    word-break: keep-all;
    hyphens: none;
    font-size: 1rem;
    text-decoration: none;
}

/* Special styling for the long text button */
.example-nav-link[data-example="4"] {
    font-size: 0.95rem;
    line-height: 1.3;
    word-break: break-word;
    hyphens: auto;
}

/* Responsive improvements for better mobile experience */
@media (max-width: 1200px) {
    .example-nav-link[data-example="4"] {
        font-size: 0.9rem;
        line-height: 1.2;
    }
}

.example-nav-link::first-letter,
.example-nav-link::first-line {
    font-size: inherit;
    line-height: inherit;
}

.example-nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.example-nav-link:hover {
    background: rgba(102, 126, 234, 0.2) !important;
    color: #495057 !important;
    transform: translateY(-2px);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
    text-decoration: none;
}

.example-nav-link:hover::before {
    opacity: 1;
}

.example-nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    border-color: #667eea;
    transform: translateY(-1px);
    z-index: 2;
    text-decoration: none;
}

.example-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: #667eea;
    border-radius: 2px;
    z-index: 3;
}

/* Ensure consistent hover states */
.example-nav-link:hover:not(.active) {
    background: rgba(102, 126, 234, 0.2) !important;
    color: #495057 !important;
    transform: translateY(-2px);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
    z-index: 1;
}

/* Responsive Design for Navigation Tabs */
@media (max-width: 991.98px) {
    /* Navigation tabs improvements for tablet */
    .nav-tabs {
        gap: 0.4rem;
    }
    
    .example-nav-link {
        padding: 0.7rem 0.8rem;
        font-size: 0.95rem;
    }
    
    .example-nav-link[data-example="4"] {
        font-size: 0.85rem;
        line-height: 1.2;
    }
}

@media (max-width: 768px) {
    .nav-tabs {
        padding: 0.25rem;
        gap: 0.25rem;
        margin-bottom: 1.5rem;
        flex-wrap: wrap;
    }
    
    .nav-tabs .nav-item {
        min-width: 0;
        flex: 1;
        min-width: calc(50% - 0.125rem);
    }
    
    .example-nav-link {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        word-break: break-word;
        hyphens: auto;
    }
    
    /* Special handling for the long text button on mobile */
    .example-nav-link[data-example="4"] {
        font-size: 0.75rem;
        padding: 0.6rem 0.3rem;
        line-height: 1.1;
        white-space: normal;
    }
}

@media (max-width: 480px) {
    .nav-tabs {
        padding: 0.2rem;
        gap: 0.2rem;
        flex-direction: column;
    }
    
    .nav-tabs .nav-item {
        min-width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .example-nav-link {
        padding: 0.8rem 0.5rem;
        font-size: 0.9rem;
        min-height: 48px;
        white-space: normal;
        line-height: 1.3;
        word-break: normal;
        hyphens: auto;
    }
    
    .example-nav-link[data-example="4"] {
        font-size: 0.8rem;
        padding: 0.7rem 0.4rem;
    }
    
    .example-nav-link::after {
        display: none; /* Hide the active indicator on very small screens */
    }
}

@media (max-width: 360px) {
    .nav-tabs {
        padding: 0.15rem;
        gap: 0.15rem;
    }
    
    .example-nav-link {
        padding: 0.7rem 0.4rem;
        font-size: 0.8rem;
        min-height: 44px;
    }
    
    .example-nav-link[data-example="4"] {
        font-size: 0.75rem;
        padding: 0.6rem 0.3rem;
    }
}
